File Coverage

blib/lib/Template/Declare/TagSet/HTML.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 3 3 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             package Template::Declare::TagSet::HTML;
2              
3 44     44   248 use strict;
  44         90  
  44         1895  
4 44     44   241 use warnings;
  44         85  
  44         2733  
5 44     44   543 use base 'Template::Declare::TagSet';
  44         86  
  44         34205  
6             #use Smart::Comments;
7              
8             our %AlternateSpelling = (
9             tr => 'row',
10             td => 'cell',
11             base => 'html_base',
12             q => 'quote',
13             time => 'datetime',
14             );
15              
16             sub get_alternate_spelling {
17 14994     14994 1 19836 my ($self, $tag) = @_;
18 14994         46757 $AlternateSpelling{$tag};
19             }
20              
21             # no need to load CGI, really
22             #sub get_tag_list {
23             # my @tags = map { lc($_) } map { @{$_||[]} }
24             # @CGI::EXPORT_TAGS{
25             # qw/:html2 :html3 :html4 :netscape :form/
26             # };
27             # return [ @tags, qw/form canvas/ ];
28             #}
29              
30             sub get_tag_list {
31 98     98 1 2515 return [qw(
32             h1 h2 h3 h4 h5 h6 p br hr ol ul li dl dt dd menu code var strong em tt
33             u i b blockquote pre img a address cite samp dfn html head base body
34             link nextid title meta kbd start_html end_html input select option
35             comment charset escapehtml div table caption th td tr tr sup sub
36             strike applet param nobr embed basefont style span layer ilayer font
37             frameset frame script small big area map abbr acronym bdo col colgroup
38             del fieldset iframe ins label legend noframes noscript object optgroup
39             q thead tbody tfoot blink fontsize center textfield textarea filefield
40             password_field hidden checkbox checkbox_group submit reset defaults
41             radio_group popup_menu button autoescape scrolling_list image_button
42             start_form end_form startform endform start_multipart_form
43             end_multipart_form isindex tmpfilename uploadinfo url_encoded
44             multipart form canvas section article aside hgroup header footer nav
45             figure figcaption video audio embed mark progress meter time ruby rt
46             rp bdi wbr command details datalist keygen output
47             )]
48             }
49              
50             sub can_combine_empty_tags {
51 54     54 1 172 my ($self, $tag) = @_;
52 54         421 $tag
53             =~ m{^ (?: base | meta | link | hr | br | param | img | area | input | col ) $}x;
54             }
55              
56             1;
57             __END__