1Pod::Simple::PullParserTPeexrtlToPkreong(r3apmmm)ers RePfoedr:e:nSciempGluei:d:ePullParserTextToken(3pm)
2
3
4
6 Pod::Simple::PullParserTextToken -- text-tokens from
7 Pod::Simple::PullParser
8
10 (See Pod::Simple::PullParser)
11
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 end-
22 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
52 "Pod::Simple::PullParserTextToken->new( text )"
53
55 Pod::Simple::PullParserToken, Pod::Simple, Pod::Simple::Subclassing
56
58 Questions or discussion about POD and Pod::Simple should be sent to the
59 pod-people@perl.org mail list. Send an empty email to
60 pod-people-subscribe@perl.org to subscribe.
61
62 This module is managed in an open GitHub repository,
63 http://github.com/theory/pod-simple/ <http://github.com/theory/pod-
64 simple/>. Feel free to fork and contribute, or to clone
65 git://github.com/theory/pod-simple.git <git://github.com/theory/pod-
66 simple.git> and send patches!
67
68 Patches against Pod::Simple are welcome. Please send bug reports to
69 <bug-pod-simple@rt.cpan.org>.
70
72 Copyright (c) 2002 Sean M. Burke.
73
74 This library is free software; you can redistribute it and/or modify it
75 under the same terms as Perl itself.
76
77 This program is distributed in the hope that it will be useful, but
78 without any warranty; without even the implied warranty of
79 merchantability or fitness for a particular purpose.
80
82 Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. But don't
83 bother him, he's retired.
84
85 Pod::Simple is maintained by:
86
87 · Allison Randal "allison@perl.org"
88
89 · Hans Dieter Pearcey "hdp@cpan.org"
90
91 · David E. Wheeler "dwheeler@cpan.org"
92
93
94
95perl v5.12.4 2011-06-P0o7d::Simple::PullParserTextToken(3pm)