blib/lib/HTML5/DOM/Element.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 15 | 86.6 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 5 | 6 | 83.3 |
pod | 0 | 2 | 0.0 |
total | 18 | 25 | 72.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package HTML5::DOM::Element; | ||||||
2 | 3 | 3 | 20 | use strict; | |||
3 | 5 | ||||||
3 | 86 | ||||||
3 | 3 | 3 | 15 | use warnings; | |||
3 | 4 | ||||||
3 | 87 | ||||||
4 | |||||||
5 | 3 | 3 | 14 | use HTML5::DOM::Node; | |||
3 | 6 | ||||||
3 | 54 | ||||||
6 | 3 | 3 | 2092 | use HTML5::DOM::TokenList; | |||
3 | 9 | ||||||
3 | 313 | ||||||
7 | |||||||
8 | our @ISA = ("HTML5::DOM::Node"); | ||||||
9 | |||||||
10 | sub classList { | ||||||
11 | 17 | 17 | 0 | 41252 | return HTML5::DOM::TokenList->new($_[0], "class"); | ||
12 | } | ||||||
13 | |||||||
14 | sub className { | ||||||
15 | 0 | 0 | 0 | my $class = $_[0]->attr("class"); | |||
16 | 0 | 0 | return defined $class ? $class : ""; | ||||
17 | } | ||||||
18 | |||||||
19 | 1; |