| 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 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 1 | ▶ | warnings::register_categories( 'HTML::Object' ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 1 | ▶ | use parent qw( HTML::Object::DOM::MediaTrack ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 1 | ▶ | use vars qw( $VERSION ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 1 | ▶ | use HTML::Object::Exception; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 1 | our $VERSION = 'v0.2.0'; | |||||||||
| 24 | }; | ||||||||||
| 25 | |||||||||||
| 26 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 28 | |||||||||||
| 29 | sub init | ||||||||||
| 30 | { | ||||||||||
| 31 | 0 | ▶ | my $self = shift( @_ ); | ||||||||
|
Subroutine
init: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||
| 32 | 0 | ▶ | return( $self->error({ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | message => sprintf( "At least 1 argument required, but only %d passed", scalar( @_ ) ), | ||||||||||
| 34 | class => 'HML::Object::TypeError', | ||||||||||
| 35 | }) ) if( scalar( @_ ) < 3 ); | ||||||||||
| 36 | 0 | my $kind = shift( @_ ); | |||||||||
| 37 | 0 | my $label = shift( @_ ); | |||||||||
| 38 | 0 | my $lang = shift( @_ ); | |||||||||
| 39 | 0 | ▶ | return( $self->error({ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | 0 | $self->{id} = undef; | |||||||||
| 45 | 0 | $self->{kind} = $kind; | |||||||||
| 46 | 0 | $self->{label} = $label; | |||||||||
| 47 | 0 | $self->{language} = $lang; | |||||||||
| 48 | 0 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 49 | 0 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 50 | 0 | return( $self ); | |||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | # Note: property | ||||||||||
| 54 | 0 | ▶ | sub enabled : lvalue { return( shift->_set_get_boolean( 'enabled', @_ ) ); } | ||||||||
|
Subroutine
enabled: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 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 | 0 | ▶ | sub sourceBuffer { return; } | ||||||||
|
Subroutine
sourceBuffer: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 66 | |||||||||||
| 67 | 1 | 1; | |||||||||
| 68 | # NOTE: POD | ||||||||||
| 69 | __END__ | ||||||||||