line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::TokeParser::Simple::Token::Comment; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
24
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
254
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '3.16'; |
6
|
5
|
|
|
5
|
|
22
|
use base 'HTML::TokeParser::Simple::Token'; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
451
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
1
|
488
|
sub is_comment { 1 } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
1; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__END__ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
HTML::TokeParser::Simple::Token::Comment - Token.pm comment 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 class for comment tokens. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
See L<HTML::Parser> for detailed information about comments. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 OVERRIDDEN METHODS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 is_comment |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
C<is_comment()> will return true if the token is the DTD at the top of the |
40
|
|
|
|
|
|
|
HTML. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |