lib/HTML/Object/DOM/Element/Param.pm

filter: Statementstmt 80.0% 24 / 30 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 2 / 2 totaltotal 73.9% 34 / 46 CC 3 SCAR 13.4
CC
3
Cov
71%
init
12.0
valueType
2.0
BEGIN
1.0
CRAP 3.8
« lib/HTML/Object/DOM/Element/OptGroup.pm ↑ Summary lib/HTML/Object/DOM/Element/Area.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Element/Param.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/12/23
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::Element::Param;
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::Element );
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::DOM::Element::Shared qw( :param );
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=3 SCAR=24.8
Pod documented
32 0 $self->{_init_strict_use_sub} = 1;
33 0 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 0 0
34 0 ▶ $self->{tag} = 'param' if( !CORE::length( "$self->{tag}" ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length qq[$self->{"tag"}] 0 0 0
35 0 return( $self );
36 }
37  
38 # Note: property name inherited
39  
40 # Note: property type inherited
41  
42 # Note: property value inherited
43  
44 # Note: property valueType
45 0 ▶sub valueType : lvalue { return( shift->_set_get_property( 'valuetype', @_ ) ); }
Subroutine valueType: not called CC=1 SCAR=6.9
Pod documented
46  
47 1 1;
48 # NOTE: POD
49 __END__
50  
51 =encoding utf-8
52  
53 =head1 NAME
54  
55 HTML::Object::DOM::Element::Param - HTML Object DOM Param Class
56  
57 =head1 SYNOPSIS
58  
59 use HTML::Object::DOM::Element::Param;
60 my $param = HTML::Object::DOM::Element::Param->new ||
61 die( HTML::Object::DOM::Element::Param->error, "\n" );
62  
63 =head1 VERSION
64  
65 v0.2.0
66  
67 =head1 DESCRIPTION
68  
69 This interface provides special properties (beyond those of the regular L<HTML::Object::Element> object interface it inherits) for manipulating <param> elements, representing a pair of a key and a value that acts as a parameter for an <object> element.
70  
71 =head1 INHERITANCE
72  
73 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
74 | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Param |
75 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
76  
77 =head1 PROPERTIES
78  
79 Inherits properties from its parent L<HTML::Object::DOM::Element>
80  
81 =head2 name
82  
83 Is a string representing the name of the parameter. It reflects the name attribute.
84  
85 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/name>
86  
87 =head2 type
88  
89 Is a string containing the type of the parameter when valueType has the "ref" value. It reflects the type attribute.
90  
91 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/type>
92  
93 =head2 value
94  
95 Is a string representing the value associated to the parameter. It reflects the value attribute.
96  
97 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/value>
98  
99 =head2 valueType
100  
101 Is a string containing the type of the value. It reflects the valuetype attribute and has one of the values: "data", "ref", or "object".
102  
103 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/valueType>
104  
105 =head1 METHODS
106  
107 Inherits methods from its parent L<HTML::Object::DOM::Element>
108  
109 =head1 AUTHOR
110  
111 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
112  
113 =head1 SEE ALSO
114  
115 L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement>, L<Mozilla documentation on param element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/param>
116  
117 =head1 COPYRIGHT & LICENSE
118  
119 Copyright(c) 2021 DEGUEST Pte. Ltd.
120  
121 All rights reserved
122  
123 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
124  
125 =cut
« lib/HTML/Object/DOM/Element/OptGroup.pm ↑ Summary lib/HTML/Object/DOM/Element/Area.pm »