1Pod::Simple::PullParserUTseexrtTCooknetnr(i3b)uted PerlPDoodc:u:mSeinmtpaltei:o:nPullParserTextToken(3)
2
3
4

NAME

6       Pod::Simple::PullParserTextToken -- text-tokens from Pod::Simple::Pull‐
7       Parser
8

SYNOPSIS

10       (See Pod::Simple::PullParser)
11

DESCRIPTION

13       When you do $parser->get_token on a Pod::Simple::PullParser, you might
14       get an object of this class.
15
16       This is a subclass of Pod::Simple::PullParserToken and inherits all its
17       methods, and adds these methods:
18
19       $token->text
20           This returns the text that this token holds.  For example, parsing
21           C<foo> will return a C start-token, a text-token, and a C
22           end-token.  And if you want to get the "foo" out of the text-token,
23           call "$token->text"
24
25       $token->text(somestring)
26           This changes the string that this token holds.  You probably won't
27           need to do this.
28
29       $token->text_r()
30           This returns a scalar reference to the string that this token
31           holds.  This can be useful if you don't want to memory-copy the
32           potentially large text value (well, as large as a paragraph or a
33           verbatim block) as calling $token->text would do.
34
35           Or, if you want to alter the value, you can even do things like
36           this:
37
38             for ( ${  $token->text_r  } ) {  # Aliases it with $_ !!
39
40               s/ The / the /g; # just for example
41
42               if( 'A' eq chr(65) ) {  # (if in an ASCII world)
43                 tr/\xA0/ /;
44                 tr/\xAD//d;
45               }
46
47               ...or however you want to alter the value...
48             }
49
50       You're unlikely to ever need to construct an object of this class for
51       yourself, but if you want to, call "Pod::Simple::PullParserTextTo‐
52       ken->new( text )"
53

SEE ALSO

55       Pod::Simple::PullParserToken, Pod::Simple, Pod::Simple::Subclassing
56
58       Copyright (c) 2002 Sean M. Burke.  All rights reserved.
59
60       This library is free software; you can redistribute it and/or modify it
61       under the same terms as Perl itself.
62
63       This program is distributed in the hope that it will be useful, but
64       without any warranty; without even the implied warranty of mer‐
65       chantability or fitness for a particular purpose.
66

AUTHOR

68       Sean M. Burke "sburke@cpan.org"
69
70
71
72perl v5.8.8                       2003-11-02Pod::Simple::PullParserTextToken(3)
Impressum