blib/lib/Template/Declare/TagSet/HTML.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
get_alternate_spelling
2.0
get_tag_list
2.0
can_combine_empty_tags
2.0
CRAP 2.0
1 package Template::Declare::TagSet::HTML;
2  
3 use strict;
4 use warnings;
5 use base 'Template::Declare::TagSet';
6 #use Smart::Comments;
7  
8 our %AlternateSpelling = (
9 tr => 'row',
10 td => 'cell',
11 base => 'html_base',
12 q => 'quote',
13 );
14  
15 sub get_alternate_spelling {
16 my ($self, $tag) = @_;
17 $AlternateSpelling{$tag};
18 }
19  
20 # no need to load CGI, really
21 #sub get_tag_list {
22 # my @tags = map { lc($_) } map { @{$_||[]} }
23 # @CGI::EXPORT_TAGS{
24 # qw/:html2 :html3 :html4 :netscape :form/
25 # };
26 # return [ @tags, qw/form canvas/ ];
27 #}
28  
29 sub get_tag_list {
30 return [qw(
31 h1 h2 h3 h4 h5 h6 p br hr ol ul li dl dt dd menu code var strong em tt
32 u i b blockquote pre img a address cite samp dfn html head base body
33 link nextid title meta kbd start_html end_html input select option
34 comment charset escapehtml div table caption th td tr tr sup sub
35 strike applet param nobr embed basefont style span layer ilayer font
36 frameset frame script small big area map abbr acronym bdo col colgroup
37 del fieldset iframe ins label legend noframes noscript object optgroup
38 q thead tbody tfoot blink fontsize center textfield textarea filefield
39 password_field hidden checkbox checkbox_group submit reset defaults
40 radio_group popup_menu button autoescape scrolling_list image_button
41 start_form end_form startform endform start_multipart_form
42 end_multipart_form isindex tmpfilename uploadinfo url_encoded
43 multipart form canvas
44 )]
45 }
46  
47 sub can_combine_empty_tags {
48 my ($self, $tag) = @_;
49 $tag
50 =~ m{^ (?: base | meta | link | hr | br | param | img | area | input | col ) $}x;
51 }
52  
53 1;
54 __END__