lib/HTML/Object/DOM/Element/OptGroup.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
label
2.0
BEGIN
1.0
CRAP 3.8
« lib/HTML/Object/DOM/Element/Menu.pm ↑ Summary lib/HTML/Object/DOM/Element/Param.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Element/OptGroup.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::OptGroup;
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( :optgroup );
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} = 'optgroup' 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 disabled inherited
39  
40 # Note: property label
41 0 ▶sub label : lvalue { return( shift->_set_get_property( 'label', @_ ) ); }
Subroutine label: not called CC=1 SCAR=6.9
Pod documented
42  
43 1 1;
44 # NOTE: POD
45 __END__
46  
47 =encoding utf-8
48  
49 =head1 NAME
50  
51 HTML::Object::DOM::Element::OptGroup - HTML Object DOM OptGroup Class
52  
53 =head1 SYNOPSIS
54  
55 use HTML::Object::DOM::Element::OptGroup;
56 my $group = HTML::Object::DOM::Element::OptGroup->new ||
57 die( HTML::Object::DOM::Element::OptGroup->error, "\n" );
58  
59 =head1 VERSION
60  
61 v0.2.0
62  
63 =head1 DESCRIPTION
64  
65 This interface provides special properties and methods (beyond the regular L<HTML::Object::Element> object interface they also have available to them by inheritance) for manipulating the layout and presentation of C<<optgroup>> elements.
66  
67 =head1 INHERITANCE
68  
69 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------------+
70 | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::OptGroup |
71 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +--------------------------------------+
72  
73 =head1 PROPERTIES
74  
75 Inherits properties from its parent L<HTML::Object::DOM::Element>
76  
77 =head2 disabled
78  
79 Is a boolean value representing whether or not the whole list of children C<<option>> is disabled (true) or not (false).
80  
81 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptGroupElement/disabled>
82  
83 =head2 label
84  
85 Is a string representing the label for the group.
86  
87 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptGroupElement/label>
88  
89 =head1 METHODS
90  
91 Inherits methods from its parent L<HTML::Object::DOM::Element>
92  
93 =head1 AUTHOR
94  
95 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
96  
97 =head1 SEE ALSO
98  
99 L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptGroupElement>, L<Mozilla documentation on optgroup element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup>
100  
101 =head1 COPYRIGHT & LICENSE
102  
103 Copyright(c) 2021 DEGUEST Pte. Ltd.
104  
105 All rights reserved
106  
107 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
108  
109 =cut
« lib/HTML/Object/DOM/Element/Menu.pm ↑ Summary lib/HTML/Object/DOM/Element/Param.pm »