File Coverage

lib/HTML/Object/DOM/Element/Map.pm
Criterion Covered Total %
statement 22 28 78.5
branch 0 4 0.0
condition n/a
subroutine 8 10 80.0
pod 2 2 100.0
total 32 44 72.7


line stmt bran cond sub pod time code
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 1     1   1003 use strict;
  1         9  
  1         45  
18 1     1   8 use warnings;
  1         8  
  1         38  
19 1     1   8 use parent qw( HTML::Object::DOM::Element );
  1         2  
  1         9  
20 1     1   71 use vars qw( $VERSION );
  1         2  
  1         46  
21 1     1   16 use HTML::Object::DOM::Element::Shared qw( :map );
  1         2  
  1         119  
22 1     1   19 our $VERSION = 'v0.2.0';
23             };
24              
25 1     1   19 use strict;
  1         2  
  1         20  
26 1     1   6 use warnings;
  1         2  
  1         143  
27              
28             sub init
29             {
30 0     0 1   my $self = shift( @_ );
31 0           $self->{_init_strict_use_sub} = 1;
32 0 0         $self->SUPER::init( @_ ) || return( $self->pass_error );
33 0 0         $self->{tag} = 'map' if( !CORE::length( "$self->{tag}" ) );
34 0           return( $self );
35             }
36              
37             # Note: property
38 0     0 1   sub areas : lvalue { return( shift->_set_get_property( 'areas', @_ ) ); }
39              
40             # Note: property name inherited
41              
42             1;
43             # NOTE: POD
44             __END__
45              
46             =encoding utf-8
47              
48             =head1 NAME
49              
50             HTML::Object::DOM::Element::Map - HTML Object DOM Map Class
51              
52             =head1 SYNOPSIS
53              
54             use HTML::Object::DOM::Element::Map;
55             my $map = HTML::Object::DOM::Element::Map->new ||
56             die( HTML::Object::DOM::Element::Map->error, "\n" );
57              
58             =head1 VERSION
59              
60             v0.2.0
61              
62             =head1 DESCRIPTION
63              
64             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.
65              
66             =head1 INHERITANCE
67              
68             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +---------------------------------+
69             | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Map |
70             +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +---------------------------------+
71              
72             =head1 PROPERTIES
73              
74             Inherits properties from its parent L<HTML::Object::DOM::Element>
75              
76             =head2 areas
77              
78             Is a live L<HTML::Object::DOM::Collection> representing the L<<area> elements|HTML::Object::DOM::Element::Area> associated to this <map>.
79              
80             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement/areas>
81              
82             =head2 name
83              
84             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.
85              
86             See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLMapElement/name>
87              
88             =head1 METHODS
89              
90             Inherits methods from its parent L<HTML::Object::DOM::Element>
91              
92             =head1 AUTHOR
93              
94             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
95              
96             =head1 SEE ALSO
97              
98             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>
99              
100             =head1 COPYRIGHT & LICENSE
101              
102             Copyright(c) 2021 DEGUEST Pte. Ltd.
103              
104             All rights reserved
105              
106             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
107              
108             =cut