blib/lib/HTML/Object/DOM/AudioTrack.pm untested

filter: Statementstmt 0.0% 0 / 41 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 62 CC 3 SCAR 14.6
CC
3
Cov
0%
init
12.0
BEGIN
2.0
enabled
2.0
CRAP 4.3
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/AudioTrack.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/12/29
7 ## Modified 2022/09/18
8 ## All rights reserved.
9 ##
10 ##
11 ## This program is free software; you can redistribute it and/or modify it
12 ## under the same terms as Perl itself.
13 ##----------------------------------------------------------------------------
14 package HTML::Object::DOM::AudioTrack;
15 BEGIN
16 {
17 use strict;
18 use warnings;
19 warnings::register_categories( 'HTML::Object' );
20 use parent qw( HTML::Object::DOM::MediaTrack );
21 use vars qw( $VERSION );
22 use HTML::Object::Exception;
23 our $VERSION = 'v0.2.0';
24 };
25  
26 use strict;
27 use warnings;
28  
29 sub init
30 {
31 my $self = shift( @_ );
32 return( $self->error({
33 message => sprintf( "At least 1 argument required, but only %d passed", scalar( @_ ) ),
34 class => 'HML::Object::TypeError',
35 }) ) if( scalar( @_ ) < 3 );
36 my $kind = shift( @_ );
37 my $label = shift( @_ );
38 my $lang = shift( @_ );
39 return( $self->error({
40 message => "kind argument provided is not a string",
41 class => 'HML::Object::TypeError',
42 }) ) if( $kind !~ /^\w+$/ );
43 # If set, this should be the same as the id in HTML::Object::DOM::Element::Track
44 $self->{id} = undef;
45 $self->{kind} = $kind;
46 $self->{label} = $label;
47 $self->{language} = $lang;
48 $self->{_init_strict_use_sub} = 1;
49 $self->SUPER::init( @_ ) || return( $self->pass_error );
50 return( $self );
51 }
52  
53 # Note: property
54 sub enabled : lvalue { return( shift->_set_get_boolean( 'enabled', @_ ) ); }
55  
56 # Note: property id inherited
57  
58 # Note: property kind inherited
59  
60 # Note: property label inherited
61  
62 # Note: property language inherited
63  
64 # Note: property
65 sub sourceBuffer { return; }
66  
67 1;
68 # NOTE: POD
69 __END__