line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::TokeParser::Simple::Token::Declaration; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
23
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
256
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '3.15'; |
6
|
5
|
|
|
5
|
|
22
|
use base 'HTML::TokeParser::Simple::Token'; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
431
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
1
|
925
|
sub is_declaration { 1 } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
1; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__END__ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
HTML::TokeParser::Simple::Token::Declaration - Token.pm declaration class. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use HTML::TokeParser::Simple; |
21
|
|
|
|
|
|
|
my $p = HTML::TokeParser::Simple->new( $somefile ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
while ( my $token = $p->get_token ) { |
24
|
|
|
|
|
|
|
# This prints all text in an HTML doc (i.e., it strips the HTML) |
25
|
|
|
|
|
|
|
next unless $token->is_text; |
26
|
|
|
|
|
|
|
print $token->as_is; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
This is the declaration class for tokens. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 OVERRIDDEN METHODS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 is_declaration |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
C<is_declaration()> will return true if the token is the DTD at the top of the |
38
|
|
|
|
|
|
|
HTML. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |