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

filter: Statementstmt 86.6% 26 / 30 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 8 / 12 Podpod 100% 5 / 5 totaltotal 80.3% 41 / 51 CC 3 SCAR 5.5
CC
3
Cov
82%
init
3.1
content
2.0
httpEquiv
2.0
CRAP 1.7
« lib/HTML/Object/DOM/Element/Form.pm ↑ Summary lib/HTML/Object/XPath/Root.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Element/Meta.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::Meta;
15 BEGIN
16 {
17 14 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 14 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 14 ▶ warnings::register_categories( 'HTML::Object' );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 14 ▶ use parent qw( HTML::Object::DOM::Element );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 14 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 14 our $VERSION = 'v0.2.0';
23 };
24  
25 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 sub init
29 {
30 54 ▶ my $self = shift( @_ );
Subroutine init: called CC=3 SCAR=11.3
Pod documented
31 54 $self->{_init_strict_use_sub} = 1;
32 54 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 54 54
33 54 ▶ $self->{tag} = 'meta' if( !CORE::length( "$self->{tag}" ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length qq[$self->{"tag"}] 0 54 54
34 54 return( $self );
35 }
36  
37 0 ▶sub content : lvalue { return( shift->_set_get_property( 'content', @_ ) ); }
Subroutine content: not called CC=1 SCAR=6.9
Pod documented
38  
39 0 ▶sub httpEquiv : lvalue { return( shift->_set_get_property( 'httpequiv', @_ ) ); }
Subroutine httpEquiv: not called CC=1 SCAR=6.9
Pod documented
40  
41 0 ▶sub name : lvalue { return( shift->_set_get_property( 'name', @_ ) ); }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
42  
43 0 ▶sub scheme : lvalue { return( shift->_set_get_property( 'scheme', @_ ) ); }
Subroutine scheme: not called CC=1 SCAR=6.9
Pod documented
44  
45 14 1;
46 # NOTE: POD
47 __END__
48  
49 =encoding utf-8
50  
51 =head1 NAME
52  
53 HTML::Object::DOM::Element::Meta - HTML Object DOM Meta Class
54  
55 =head1 SYNOPSIS
56  
57 use HTML::Object::DOM::Element::Meta;
58 my $meta = HTML::Object::DOM::Element::Meta->new ||
59 die( HTML::Object::DOM::Element::Meta->error, "\n" );
60  
61 =head1 VERSION
62  
63 v0.2.0
64  
65 =head1 DESCRIPTION
66  
67 This interface contains descriptive metadata about a document. It inherits all of the properties and methods described in the L<HTML::Object::Element> interface.
68  
69 =head1 INHERITANCE
70  
71 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+
72 | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Meta |
73 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+
74  
75 =head1 PROPERTIES
76  
77 Inherits properties from its parent L<HTML::Object::DOM::Element>
78  
79 =head2 content
80  
81 Gets or sets the value of meta-data property.
82  
83 =head2 httpEquiv
84  
85 Gets or sets the name of an HTTP response header to define for a document.
86  
87 =head2 name
88  
89 Gets or sets the name of a meta-data property to define for a document.
90  
91 =head2 scheme
92  
93 Gets or sets the name of a scheme used to interpret the value of a meta-data property.
94  
95 =head1 METHODS
96  
97 Inherits methods from its parent L<HTML::Object::DOM::Element>
98  
99 =head1 AUTHOR
100  
101 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
102  
103 =head1 SEE ALSO
104  
105 L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement>, L<Mozilla documentation on meta element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta>
106  
107 =head1 COPYRIGHT & LICENSE
108  
109 Copyright(c) 2021 DEGUEST Pte. Ltd.
110  
111 All rights reserved
112  
113 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
114  
115 =cut
« lib/HTML/Object/DOM/Element/Form.pm ↑ Summary lib/HTML/Object/XPath/Root.pm »