blib/lib/HTML/Object/DOM/Element/Map.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 / 10 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 47 CC 2 SCAR 10.0
CC
2
Cov
0%
init
6.0
BEGIN
2.0
areas
2.0
CRAP 2.7
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Element/Map.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::Map;
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 use HTML::Object::DOM::Element::Shared qw( :map );
23 our $VERSION = 'v0.2.0';
24 };
25  
26 use strict;
27 use warnings;
28  
29 sub init
30 {
31 my $self = shift( @_ );
32 $self->{_init_strict_use_sub} = 1;
33 $self->SUPER::init( @_ ) || return( $self->pass_error );
34 $self->{tag} = 'map' if( !CORE::length( "$self->{tag}" ) );
35 return( $self );
36 }
37  
38 # Note: property
39 sub areas : lvalue { return( shift->_set_get_property( 'areas', @_ ) ); }
40  
41 # Note: property name inherited
42  
43 1;
44 # NOTE: POD
45 __END__
46  
47 =encoding utf-8
48  
49 =head1 NAME
50  
51 HTML::Object::DOM::Element::Map - HTML Object DOM Map Class
52  
53 =head1 SYNOPSIS
54  
55 use HTML::Object::DOM::Element::Map;
56 my $map = HTML::Object::DOM::Element::Map->new ||
57 die( HTML::Object::DOM::Element::Map->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 those of the regular object L<HTML::Object::Element> interface it also has available to it by inheritance) for manipulating the layout and presentation of C<map> 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::Map |
71 +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +---------------------------------+
72  
73 =head1 PROPERTIES
74  
75 Inherits properties from its parent L<HTML::Object::DOM::Element>
76  
77 =head2 areas
78  
79 Is a live L<HTML::Object::DOM::Collection> representing the L<<area> elements|HTML::Object::DOM::Element::Area> associated to this <map>.
80  
81 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement/areas>
82  
83 =head2 name
84  
85 Is a string representing the C<<map>> element for referencing it other context. If the id attribute is set, this must have the same value; and it cannot be C<undef> or empty.
86  
87 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement/name>
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/HTMLMapElement>, L<Mozilla documentation on map element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map>
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