File Coverage

blib/lib/Markapl/Tags.pm
Criterion Covered Total %
statement 8 10 80.0
branch n/a
condition n/a
subroutine 4 6 66.6
pod 2 4 50.0
total 14 20 70.0


line stmt bran cond sub pod time code
1             package Markapl::Tags;
2              
3 22     22   115 use strict;
  22         40  
  22         746  
4 22     22   113 use warnings;
  22         44  
  22         5999  
5              
6             our $VERSION = "0.01";
7              
8             sub w3c_html4 {
9 0     0 1 0 qw(
10             a abbr acronym address applet area b base basefont bdo big
11             blockquote body br button caption center cite code col colgroup
12             dd del dfn dir div dl dt em fieldset font form frame frameset
13             h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex
14             kbd label legend li link map menu meta noframes noscript object
15             ol optgroup option p param pre q s samp script select small
16             span strike strong style sub sup table tbody td textarea tfoot
17             th thead title tr tt u ul var
18             );
19             }
20              
21             sub html4_perl_common {
22 0     0 0 0 qw(link map q s sub tr);
23             }
24              
25             sub html {
26             # removed common ones. add replacements
27 29     29 1 1895 qw(
28             a abbr acronym address applet area b base basefont bdo big
29             blockquote body br button caption center cite code col colgroup
30             dd del dfn dir div dl dt em fieldset font form frame frameset
31             h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex
32             kbd label legend li menu meta noframes noscript object
33             ol optgroup option p param pre samp script select small
34             span strike strong style sup table tbody td textarea tfoot
35             th thead title tt u ul var
36              
37             base html_link html_map html_q html_s html_sub html_tr
38             cell row
39             );
40             }
41              
42             sub html_inline {
43 109     109 0 504 qw( base link meta isindex img br hr wbr
44             input area param embed bgsound spacer
45             basefont col frame );
46             }
47              
48             1;
49              
50             =head1 NAME
51              
52             Markapl::Tags - List of tags.
53              
54             =head1 DESCRIPTION
55              
56             This module is used internally to get a list of HTML tags. However,
57             Markapl users may call Chtml> to retrieve the list of
58             supported html tags. (Or even modify it)
59              
60             Invoke C too see the full list of tag names.
61              
62             =head1 FUNCTIONS
63              
64             =over 4
65              
66             =item html
67              
68             Return the list of supported html tags. The following tags are in the
69             returned list but they are not standard html tags:
70              
71             html_link html_map html_q html_s html_sub html_tr cell row
72              
73             Because their corresponding html tag names conflicts with perl builtin
74             functions.
75              
76             =item w3c_html4
77              
78             Return the list of standard html tag names. This is just here for
79             references.
80              
81             =back
82              
83             =head1 AUTHOR
84              
85             Kang-min Liu C<< >>
86              
87             =head1 LICENCE AND COPYRIGHT
88              
89             Copyright (c) 2008, Kang-min Liu C<< >>.
90              
91             This is free software, licensed under:
92              
93             The MIT (X11) License
94              
95             =head1 DISCLAIMER OF WARRANTY
96              
97             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
98             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
99             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
100             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
101             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
102             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
103             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
104             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
105             NECESSARY SERVICING, REPAIR, OR CORRECTION.
106              
107             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
108             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
109             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
110             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
111             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
112             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
113             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
114             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
115             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
116             SUCH DAMAGES.