File Coverage

blib/lib/HTML/Tags.pm
Criterion Covered Total %
statement 14 14 100.0
branch 1 2 50.0
condition 1 2 50.0
subroutine 5 5 100.0
pod 0 1 0.0
total 21 24 87.5


line stmt bran cond sub pod time code
1             package HTML::Tags;
2              
3 2     2   437 use strict;
  2         4  
  2         58  
4 2     2   10 use warnings FATAL => 'all';
  2         5  
  2         79  
5 2     2   619 use XML::Tags ();
  2         6  
  2         408  
6              
7             my @HTML_TAGS = qw(
8             a
9             abbr
10             address
11             area
12             article
13             aside
14             audio
15             b
16             base
17             bb
18             bdo
19             blockquote
20             body
21             br
22             button
23             canvas
24             caption
25             cite
26             code
27             col
28             colgroup
29             command
30             datagrid
31             datalist
32             dd
33             del
34             details
35             dialog
36             dfn
37             div
38             dl
39             dt
40             em
41             embed
42             eventsource
43             fieldset
44             figure
45             footer
46             form
47             h1
48             h2
49             h3
50             h4
51             h5
52             h6
53             head
54             header
55             hr
56             html
57             i
58             iframe
59             img
60             input
61             ins
62             kbd
63             label
64             legend
65             li
66             link
67             mark
68             map
69             menu
70             meta
71             meter
72             nav
73             noscript
74             object
75             ol
76             optgroup
77             option
78             output
79             p
80             param
81             pre
82             progress
83             q
84             ruby
85             rp
86             rt
87             samp
88             script
89             section
90             select
91             small
92             source
93             span
94             strong
95             style
96             sub
97             sup
98             table
99             tbody
100             td
101             textarea
102             tfoot
103             th
104             thead
105             time
106             title
107             tr
108             ul
109             var
110             video
111             );
112              
113             sub import {
114 6     6   31 my ($class, @rest) = @_;
115 6 50       20 my $opts = ref($rest[0]) eq 'HASH' ? shift(@rest) : {};
116 6   50     34 ($opts->{into_level}||=1)++;
117 6         25 XML::Tags->import($opts, @HTML_TAGS, @rest);
118             }
119              
120 3     3 0 9 sub to_html_string { XML::Tags::to_xml_string(@_) }
121              
122             1;