line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML5::DOM::Node; |
2
|
3
|
|
|
3
|
|
21
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
96
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
534
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
9
|
|
|
9
|
|
90
|
'""' => sub { $_[0]->html }, |
7
|
1
|
|
|
1
|
|
7547
|
'@{}' => sub { $_[0]->childrenNode->array }, |
8
|
|
|
|
|
|
|
'%{}' => \&__attrHashAccess, |
9
|
193
|
50
|
|
193
|
|
61977
|
'==' => sub { defined $_[1] && $_[0]->isSameNode($_[1]) }, |
10
|
26
|
|
33
|
26
|
|
280
|
'!=' => sub { !defined $_[1] || !$_[0]->isSameNode($_[1]) }, |
11
|
56
|
|
|
56
|
|
18575
|
'bool' => sub { 1 }, |
12
|
3
|
|
|
3
|
|
20
|
fallback => 1; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
35
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# https://developer.mozilla.org/pl/docs/Web/API/Element/nodeType |
15
|
3
|
|
|
3
|
|
432
|
use constant ELEMENT_NODE => 1; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
277
|
|
16
|
3
|
|
|
3
|
|
22
|
use constant ATTRIBUTE_NODE => 2; # not supported |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
213
|
|
17
|
3
|
|
|
3
|
|
17
|
use constant TEXT_NODE => 3; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
180
|
|
18
|
3
|
|
|
3
|
|
19
|
use constant CDATA_SECTION_NODE => 4; # not supported |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
173
|
|
19
|
3
|
|
|
3
|
|
17
|
use constant ENTITY_REFERENCE_NODE => 5; # not supported |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
171
|
|
20
|
3
|
|
|
3
|
|
20
|
use constant ENTITY_NODE => 6; # not supported |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
137
|
|
21
|
3
|
|
|
3
|
|
17
|
use constant PROCESSING_INSTRUCTION_NODE => 7; # not supported |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
171
|
|
22
|
3
|
|
|
3
|
|
59
|
use constant COMMENT_NODE => 8; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
136
|
|
23
|
3
|
|
|
3
|
|
30
|
use constant DOCUMENT_NODE => 9; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
160
|
|
24
|
3
|
|
|
3
|
|
18
|
use constant DOCUMENT_TYPE_NODE => 10; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
128
|
|
25
|
3
|
|
|
3
|
|
37
|
use constant DOCUMENT_FRAGMENT_NODE => 11; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
179
|
|
26
|
3
|
|
|
3
|
|
20
|
use constant NOTATION_NODE => 12; # not supported |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
307
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub __attrHashAccess { |
29
|
7
|
|
|
7
|
|
3884
|
my $self = shift; |
30
|
7
|
|
|
|
|
12
|
my %h; |
31
|
7
|
|
|
|
|
30
|
tie %h, 'HTML5::DOM::Node::_AttrHashAccess', $self; |
32
|
7
|
|
|
|
|
44
|
return \%h; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
package HTML5::DOM::Node::_AttrHashAccess; |
38
|
3
|
|
|
3
|
|
20
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
90
|
|
39
|
3
|
|
|
3
|
|
23
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
512
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub TIEHASH { |
42
|
7
|
|
|
7
|
|
14
|
my $p = shift; |
43
|
7
|
|
|
|
|
59
|
bless \shift, $p |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub EXISTS { |
47
|
1
|
|
|
1
|
|
2
|
defined ${shift()}->attr(shift); |
|
1
|
|
|
|
|
13
|
|
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub DELETE { |
51
|
0
|
|
|
0
|
|
0
|
${shift()}->removeAttr(shift); |
|
0
|
|
|
|
|
0
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub FETCH { |
55
|
6
|
|
|
6
|
|
11
|
${shift()}->attr(shift); |
|
6
|
|
|
|
|
84
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub STORE { |
59
|
0
|
|
|
0
|
|
|
${shift()}->attr(shift, shift); |
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |