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

filter: Statementstmt 0.0% 0 / 30 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 52 CC 2 SCAR 9.6
CC
2
Cov
0%
init
6.0
BEGIN
2.0
content
2.0
CRAP 2.6
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 use strict;
18 use warnings;
19 warnings::register_categories( 'HTML::Object' );
20 use parent qw( HTML::Object::DOM::Element );
21 use vars qw( $VERSION );
22 our $VERSION = 'v0.2.0';
23 };
24  
25 use strict;
26 use warnings;
27  
28 sub init
29 {
30 my $self = shift( @_ );
31 $self->{_init_strict_use_sub} = 1;
32 $self->SUPER::init( @_ ) || return( $self->pass_error );
33 $self->{tag} = 'meta' if( !CORE::length( "$self->{tag}" ) );
34 return( $self );
35 }
36  
37 sub content : lvalue { return( shift->_set_get_property( 'content', @_ ) ); }
38  
39 sub httpEquiv : lvalue { return( shift->_set_get_property( 'httpequiv', @_ ) ); }
40  
41 sub name : lvalue { return( shift->_set_get_property( 'name', @_ ) ); }
42  
43 sub scheme : lvalue { return( shift->_set_get_property( 'scheme', @_ ) ); }
44  
45 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