| 1 | package Template::Declare::TagSet::HTML; | ||
| 2 | |||
| 3 | 44 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 44 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 44 | ▶ | use base 'Template::Declare::TagSet'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | #use Smart::Comments; | ||
| 7 | |||
| 8 | 44 | our %AlternateSpelling = ( | |
| 9 | tr => 'row', | ||
| 10 | td => 'cell', | ||
| 11 | base => 'html_base', | ||
| 12 | q => 'quote', | ||
| 13 | time => 'datetime', | ||
| 14 | ); | ||
| 15 | |||
| 16 | 14994 | ▶ | sub get_alternate_spelling { |
|
Subroutine
get_alternate_spelling: called CC=1 SCAR=0.0
Pod
documented
| |||
| 17 | 14994 | my ($self, $tag) = @_; | |
| 18 | 14994 | $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 | 98 | ▶ | sub get_tag_list { |
|
Subroutine
get_tag_list: called CC=1 SCAR=0.0
Pod
documented
| |||
| 31 | 98 | 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 | 54 | ▶ | sub can_combine_empty_tags { |
|
Subroutine
can_combine_empty_tags: called CC=1 SCAR=0.0
Pod
documented
| |||
| 51 | 54 | my ($self, $tag) = @_; | |
| 52 | 54 | $tag | |
| 53 | =~ m{^ (?: base | meta | link | hr | br | param | img | area | input | col ) $}x; | ||
| 54 | } | ||
| 55 | |||
| 56 | 44 | 1; | |
| 57 | __END__ | ||