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

filter: Statementstmt 93.5% 29 / 31 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 81.8% 9 / 11 Podpod 100% 3 / 3 totaltotal 87.7% 43 / 49 CC 3 SCAR 4.9
CC
3
Cov
89%
init
3.1
color
2.0
noshade
2.0
CRAP 1.6
« lib/HTML/Object/DOM/Element/Head.pm ↑ Summary lib/HTML/Object/DOM/Element/Span.pm »
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 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶ warnings::register_categories( 'HTML::Object' );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶ use parent qw( HTML::Object::DOM::Element );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 2 ▶ use HTML::Object::DOM::Element::Shared qw( :hr );
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 our $VERSION = 'v0.2.0';
24 };
25  
26 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 sub init
30 {
31 1 ▶ my $self = shift( @_ );
Subroutine init: called CC=3 SCAR=11.3
Pod documented
32 1 $self->{_init_strict_use_sub} = 1;
33 1 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 1 1
34 1 ▶ $self->{tag} = 'hr' if( !CORE::length( "$self->{tag}" ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length qq[$self->{"tag"}] 0 1 1
35 1 return( $self );
36 }
37  
38 # Note: property align is inherited
39  
40 # Note: property color
41 0 ▶sub color : lvalue { return( shift->_set_get_property( 'color', @_ ) ); }
Subroutine color: not called CC=1 SCAR=6.9
Pod documented
42  
43 # Note: property noshade
44 0 ▶sub noshade : lvalue { return( shift->_set_get_property({ attribute => 'noshade', is_boolean => 1 }, @_ ) ); }
Subroutine noshade: not called CC=1 SCAR=6.9
Pod documented
45  
46 # Note: property size is inherited
47  
48 # Note: property width is inherited
49  
50 2 1;
51 # NOTE: POD
52 __END__
53  
54 =encoding utf-8
55  
56 =head1 NAME
57  
58 HTML::Object::DOM::Element::HR - HTML Object DOM HR Class
59  
60 =head1 SYNOPSIS
61  
62 use HTML::Object::DOM::Element::HR;
63 my $hr = HTML::Object::DOM::Element::HR->new ||
64 die( HTML::Object::DOM::Element::HR->error, "\n" );
65  
66 =head1 VERSION
67  
68 v0.2.0
69  
70 =head1 DESCRIPTION
71  
72 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.
73  
74 =head1 INHERITANCE
75  
76 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------+
77 | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::HR |
78 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------+
79  
80 =head1 PROPERTIES
81  
82 Inherits properties from its parent L<HTML::Object::DOM::Element>
83  
84 =head2 align
85  
86 Is a string, an enumerated attribute indicating alignment of the rule with respect to the surrounding context.
87  
88 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/align>
89  
90 =head2 color
91  
92 Is a string representing the name of the color of the rule.
93  
94 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/color>
95  
96 =head2 noshade
97  
98 Is a boolean value that sets the rule to have no shading.
99  
100 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/noshade>
101  
102 =head2 size
103  
104 Is a string representing the height of the rule.
105  
106 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/size>
107  
108 =head2 width
109  
110 Is a string representing the width of the rule on the page.
111  
112 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement/width>
113  
114 =head1 METHODS
115  
116 Inherits methods from its parent L<HTML::Object::DOM::Element>
117  
118 =head1 AUTHOR
119  
120 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
121  
122 =head1 SEE ALSO
123  
124 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>
125  
126 =head1 COPYRIGHT & LICENSE
127  
128 Copyright(c) 2022 DEGUEST Pte. Ltd.
129  
130 All rights reserved
131  
132 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
133  
134 =cut
« lib/HTML/Object/DOM/Element/Head.pm ↑ Summary lib/HTML/Object/DOM/Element/Span.pm »