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

filter: Statementstmt 75.0% 21 / 28 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 100% 3 / 3 totaltotal 68.8% 31 / 45 CC 3 SCAR 13.7
CC
3
Cov
66%
init
12.0
cite
2.0
dateTime
2.0
CRAP 3.9
« lib/HTML/Object/DOM/Element/Option.pm ↑ Summary lib/HTML/Object/DOM/Element/TextArea.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Element/Mod.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2022/01/10
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::Mod;
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 our $VERSION = 'v0.2.0';
23 };
24  
25 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 sub init
29 {
30 0 ▶ my $self = shift( @_ );
Subroutine init: not called CC=3 SCAR=24.8
Pod documented
31 0 $self->{_init_strict_use_sub} = 1;
32 0 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 0 0
33 0 ▶ $self->{tag} = 'mod' if( !CORE::length( "$self->{tag}" ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length qq[$self->{"tag"}] 0 0 0
34 0 return( $self );
35 }
36  
37 # Note: property cite
38 0 ▶sub cite : lvalue { return( shift->_set_get_property( 'cite', @_ ) ); }
Subroutine cite: not called CC=1 SCAR=6.9
Pod documented
39  
40 # Note: property dateTime
41 0 ▶sub dateTime : lvalue { return( shift->_set_get_property({ attribute => 'datetime', is_datetime => 1 }, @_ ) ); }
Subroutine dateTime: 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::Mod - HTML Object DOM Mod Class
52  
53 =head1 SYNOPSIS
54  
55 use HTML::Object::DOM::Element::Mod;
56 my $mod = HTML::Object::DOM::Element::Mod->new ||
57 die( HTML::Object::DOM::Element::Mod->error, "\n" );
58  
59 =head1 VERSION
60  
61 v0.2.0
62  
63 =head1 DESCRIPTION
64  
65 This interface provides special properties (beyond the regular methods and properties available through the L<HTML::Object::DOM::Element> interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>.
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::Mod |
71 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +---------------------------------+
72  
73 =head1 PROPERTIES
74  
75 Inherits properties from its parent L<HTML::Object::DOM::Element>
76  
77 =head2 cite
78  
79 Is a string reflecting the cite HTML attribute, containing a URI of a resource explaining the change.
80  
81 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement/cite>
82  
83 =head2 dateTime
84  
85 Is a string reflecting the datetime HTML attribute, containing a date-and-time string representing a timestamp for the change.
86  
87 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLModElement/dateTime>
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/HTMLModElement>, L<Mozilla documentation on mod element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mod>
100  
101 =head1 COPYRIGHT & LICENSE
102  
103 Copyright(c) 2022 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/Option.pm ↑ Summary lib/HTML/Object/DOM/Element/TextArea.pm »