source: trunk/gsdl/perllib/cpan/HTML/TokeParser/Simple/Token/Text.pm@ 13983

Last change on this file since 13983 was 13983, checked in by lh92, 17 years ago

Added for Realistic Book Project

  • Property svn:keywords set to Author Date Id Revision
File size: 852 bytes
Line 
1package HTML::TokeParser::Simple::Token::Text;
2
3use strict;
4
5use vars qw/ $VERSION $REVISION /;
6$REVISION = '$Id: Text.pm 13983 2007-03-15 01:32:44Z lh92 $';
7$VERSION = '1.0';
8use base 'HTML::TokeParser::Simple::Token';
9
10sub as_is {
11 return shift->[1];
12}
13
14sub is_text { 1 }
15
161;
17
18__END__
19
20=head1 NAME
21
22HTML::TokeParser::Simple::Token::Text - Token.pm text class.
23
24=head1 SYNOPSIS
25
26 use HTML::TokeParser::Simple;
27 my $p = HTML::TokeParser::Simple->new( $somefile );
28
29 while ( my $token = $p->get_token ) {
30 # This prints all text in an HTML doc (i.e., it strips the HTML)
31 next unless $token->is_text;
32 print $token->as_is;
33 }
34
35=head1 DESCRIPTION
36
37This class represents "text" tokens. See the C<HTML::TokeParser::Simple>
38documentation for details.
39
40=head1 OVERRIDDEN METHODS
41
42=over 4
43
44=item * as_is
45
46=item * is_text
47
48=back
49
50=cut
Note: See TracBrowser for help on using the repository browser.