File Coverage

lib/HTML/Object/DOM/Element/HR.pm
Criterion Covered Total %
statement 27 29 93.1
branch 2 4 50.0
condition n/a
subroutine 9 11 81.8
pod 3 3 100.0
total 41 47 87.2


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## HTML Object - ~/lib/HTML/Object/DOM/Element/HR.pm
3             ## Version v0.2.0
4             ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2022/01/06
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::HR;
15             BEGIN
16             {
17 2     2   2129 use strict;
  2         7  
  2         75  
18 2     2   15 use warnings;
  2         4  
  2         77  
19 2     2   13 use parent qw( HTML::Object::DOM::Element );
  2         5  
  2         13  
20 2     2   194 use vars qw( $VERSION );
  2         10  
  2         105  
21 2     2   14 use HTML::Object::DOM::Element::Shared qw( :hr );
  2         4  
  2         326  
22 2     2   54 our $VERSION = 'v0.2.0';
23             };
24              
25 2     2   25 use strict;
  2         24  
  2         61  
26 2     2   22 use warnings;
  2         5  
  2         460  
27              
28             sub init
29             {
30 1     1 1 97 my $self = shift( @_ );
31 1         163 $self->{_init_strict_use_sub} = 1;
32 1 50       13 $self->SUPER::init( @_ ) || return( $self->pass_error );
33 1 50       6 $self->{tag} = 'hr' if( !CORE::length( "$self->{tag}" ) );
34 1         12 return( $self );
35             }
36              
37             # Note: property align is inherited
38              
39             # Note: property color
40 0     0 1   sub color : lvalue { return( shift->_set_get_property( 'color', @_ ) ); }
41              
42             # Note: property noshade
43 0     0 1   sub noshade : lvalue { return( shift->_set_get_property({ attribute => 'noshade', is_boolean => 1 }, @_ ) ); }
44              
45             # Note: property size is inherited
46              
47             # Note: property width is inherited
48              
49             1;
50             # NOTE: POD
51             __END__
52              
53             =encoding utf-8
54              
55             =head1 NAME
56              
57             HTML::Object::DOM::Element::HR - HTML Object DOM HR Class
58              
59             =head1 SYNOPSIS
60              
61             use HTML::Object::DOM::Element::HR;
62             my $hr = HTML::Object::DOM::Element::HR->new ||
63             die( HTML::Object::DOM::Element::HR->error, "\n" );
64              
65             =head1 VERSION
66              
67             v0.2.0
68              
69             =head1 DESCRIPTION
70              
71             This interface provides special properties (beyond those of the L<HTML::Object::DOM::Element> interface it also has available to it by inheritance) for manipulating <hr> elements.
72              
73             =head1 INHERITANCE
74              
75             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------+
76             | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::HR |
77             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------+
78              
79             =head1 PROPERTIES
80              
81             Inherits properties from its parent L<HTML::Object::DOM::Element>
82              
83             =head2 align
84              
85             Is a string, an enumerated attribute indicating alignment of the rule with respect to the surrounding context.
86              
87             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/align>
88              
89             =head2 color
90              
91             Is a string representing the name of the color of the rule.
92              
93             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/color>
94              
95             =head2 noshade
96              
97             Is a boolean value that sets the rule to have no shading.
98              
99             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/noshade>
100              
101             =head2 size
102              
103             Is a string representing the height of the rule.
104              
105             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/size>
106              
107             =head2 width
108              
109             Is a string representing the width of the rule on the page.
110              
111             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/width>
112              
113             =head1 METHODS
114              
115             Inherits methods from its parent L<HTML::Object::DOM::Element>
116              
117             =head1 AUTHOR
118              
119             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
120              
121             =head1 SEE ALSO
122              
123             L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement>, L<Mozilla documentation on hr element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr>
124              
125             =head1 COPYRIGHT & LICENSE
126              
127             Copyright(c) 2022 DEGUEST Pte. Ltd.
128              
129             All rights reserved
130              
131             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
132              
133             =cut