line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Declare::TagSet::HTML; |
2
|
|
|
|
|
|
|
|
3
|
44
|
|
|
44
|
|
219
|
use strict; |
|
44
|
|
|
|
|
4173
|
|
|
44
|
|
|
|
|
1882
|
|
4
|
44
|
|
|
44
|
|
234
|
use warnings; |
|
44
|
|
|
|
|
65
|
|
|
44
|
|
|
|
|
1523
|
|
5
|
44
|
|
|
44
|
|
217
|
use base 'Template::Declare::TagSet'; |
|
44
|
|
|
|
|
60
|
|
|
44
|
|
|
|
|
19353
|
|
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
|
14397
|
my ($self, $tag) = @_; |
18
|
14994
|
|
|
|
|
29094
|
$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
|
2140
|
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
|
139
|
my ($self, $tag) = @_; |
52
|
54
|
|
|
|
|
514
|
$tag |
53
|
|
|
|
|
|
|
=~ m{^ (?: base | meta | link | hr | br | param | img | area | input | col ) $}x; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
__END__ |