File Coverage

lib/HTML/Object/DOM/Element/Param.pm
Criterion Covered Total %
statement 22 28 78.5
branch 0 4 0.0
condition n/a
subroutine 8 10 80.0
pod 2 2 100.0
total 32 44 72.7


line stmt bran cond sub pod time code
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     1   1021 use strict;
  1         2  
  1         29  
18 1     1   4 use warnings;
  1         2  
  1         30  
19 1     1   10 use parent qw( HTML::Object::DOM::Element );
  1         2  
  1         3  
20 1     1   62 use vars qw( $VERSION );
  1         2  
  1         43  
21 1     1   6 use HTML::Object::DOM::Element::Shared qw( :param );
  1         1  
  1         135  
22 1     1   19 our $VERSION = 'v0.2.0';
23             };
24              
25 1     1   5 use strict;
  1         2  
  1         37  
26 1     1   5 use warnings;
  1         2  
  1         209  
27              
28             sub init
29             {
30 0     0 1   my $self = shift( @_ );
31 0           $self->{_init_strict_use_sub} = 1;
32 0 0         $self->SUPER::init( @_ ) || return( $self->pass_error );
33 0 0         $self->{tag} = 'param' if( !CORE::length( "$self->{tag}" ) );
34 0           return( $self );
35             }
36              
37             # Note: property name inherited
38              
39             # Note: property type inherited
40              
41             # Note: property value inherited
42              
43             # Note: property valueType
44 0     0 1   sub valueType : lvalue { return( shift->_set_get_property( 'valuetype', @_ ) ); }
45              
46             1;
47             # NOTE: POD
48             __END__
49              
50             =encoding utf-8
51              
52             =head1 NAME
53              
54             HTML::Object::DOM::Element::Param - HTML Object DOM Param Class
55              
56             =head1 SYNOPSIS
57              
58             use HTML::Object::DOM::Element::Param;
59             my $param = HTML::Object::DOM::Element::Param->new ||
60             die( HTML::Object::DOM::Element::Param->error, "\n" );
61              
62             =head1 VERSION
63              
64             v0.2.0
65              
66             =head1 DESCRIPTION
67              
68             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.
69              
70             =head1 INHERITANCE
71              
72             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
73             | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Param |
74             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+
75              
76             =head1 PROPERTIES
77              
78             Inherits properties from its parent L<HTML::Object::DOM::Element>
79              
80             =head2 name
81              
82             Is a string representing the name of the parameter. It reflects the name attribute.
83              
84             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/name>
85              
86             =head2 type
87              
88             Is a string containing the type of the parameter when valueType has the "ref" value. It reflects the type attribute.
89              
90             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/type>
91              
92             =head2 value
93              
94             Is a string representing the value associated to the parameter. It reflects the value attribute.
95              
96             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/value>
97              
98             =head2 valueType
99              
100             Is a string containing the type of the value. It reflects the valuetype attribute and has one of the values: "data", "ref", or "object".
101              
102             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement/valueType>
103              
104             =head1 METHODS
105              
106             Inherits methods from its parent L<HTML::Object::DOM::Element>
107              
108             =head1 AUTHOR
109              
110             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
111              
112             =head1 SEE ALSO
113              
114             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>
115              
116             =head1 COPYRIGHT & LICENSE
117              
118             Copyright(c) 2021 DEGUEST Pte. Ltd.
119              
120             All rights reserved
121              
122             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
123              
124             =cut