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

NAME

6       Pod::Simple::PullParserTextToken -- text-tokens from
7       Pod::Simple::PullParser
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 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               (Note that starting with Perl v5.8, you can use, e.g.,
49
50                   my $nbsp = chr utf8::unicode_to_native(0xA0);
51                   s/$nbsp/ /g;
52
53               to handle the above regardless if it's an ASCII world or not)
54             }
55
56       You're unlikely to ever need to construct an object of this class for
57       yourself, but if you want to, call
58       "Pod::Simple::PullParserTextToken->new( text )"
59

SEE ALSO

61       Pod::Simple::PullParserToken, Pod::Simple, Pod::Simple::Subclassing
62

SUPPORT

64       Questions or discussion about POD and Pod::Simple should be sent to the
65       pod-people@perl.org mail list. Send an empty email to
66       pod-people-subscribe@perl.org to subscribe.
67
68       This module is managed in an open GitHub repository,
69       <https://github.com/perl-pod/pod-simple/>. Feel free to fork and
70       contribute, or to clone <git://github.com/perl-pod/pod-simple.git> and
71       send patches!
72
73       Patches against Pod::Simple are welcome. Please send bug reports to
74       <bug-pod-simple@rt.cpan.org>.
75
77       Copyright (c) 2002 Sean M. Burke.
78
79       This library is free software; you can redistribute it and/or modify it
80       under the same terms as Perl itself.
81
82       This program is distributed in the hope that it will be useful, but
83       without any warranty; without even the implied warranty of
84       merchantability or fitness for a particular purpose.
85

AUTHOR

87       Pod::Simple was created by Sean M. Burke <sburke@cpan.org>.  But don't
88       bother him, he's retired.
89
90       Pod::Simple is maintained by:
91
92       ·   Allison Randal "allison@perl.org"
93
94       ·   Hans Dieter Pearcey "hdp@cpan.org"
95
96       ·   David E. Wheeler "dwheeler@cpan.org"
97
98
99
100perl v5.30.0                      2019-07-26Pod::Simple::PullParserTextToken(3)
Impressum