Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Pod::Simple::PullParserTextToken.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "Pod::Simple::PullParserTextToken 3pm"
61 .TH Pod::Simple::PullParserTextToken 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 Pod::Simple::PullParserTextToken \-\- text\-tokens from Pod::Simple::PullParser
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 (See Pod::Simple::PullParser)
71 .SH DESCRIPTION
72 .IX Header "DESCRIPTION"
73 When you do \f(CW$parser\fR\->get_token on a Pod::Simple::PullParser, you might
74 get an object of this class.
75 .PP
76 This is a subclass of Pod::Simple::PullParserToken and inherits all its methods,
77 and adds these methods:
78 .ie n .IP $token\->text 4
79 .el .IP \f(CW$token\fR\->text 4
80 .IX Item "$token->text"
81 This returns the text that this token holds. For example, parsing
82 C<foo> will return a C start\-token, a text\-token, and a C end\-token. And
83 if you want to get the "foo" out of the text\-token, call \f(CW\*(C`$token\->text\*(C'\fR
84 .ie n .IP $token\->text(\fIsomestring\fR) 4
85 .el .IP \f(CW$token\fR\->text(\fIsomestring\fR) 4
86 .IX Item "$token->text(somestring)"
87 This changes the string that this token holds. You probably won\*(Aqt need
88 to do this.
89 .ie n .IP $token\->\fBtext_r()\fR 4
90 .el .IP \f(CW$token\fR\->\fBtext_r()\fR 4
91 .IX Item "$token->text_r()"
92 This returns a scalar reference to the string that this token holds.
93 This can be useful if you don\*(Aqt want to memory\-copy the potentially
94 large text value (well, as large as a paragraph or a verbatim block)
95 as calling \f(CW$token\fR\->text would do.
96 .Sp
97 Or, if you want to alter the value, you can even do things like this:
98 .Sp
99 .Vb 1
100 \& for ( ${ $token\->text_r } ) { # Aliases it with $_ !!
101 \&
102 \& s/ The / the /g; # just for example
103 \&
104 \& if( \*(AqA\*(Aq eq chr(65) ) { # (if in an ASCII world)
105 \& tr/\exA0/ /;
106 \& tr/\exAD//d;
107 \& }
108 \&
109 \& ...or however you want to alter the value...
110 \& (Note that starting with Perl v5.8, you can use, e.g.,
111 \&
112 \& my $nbsp = chr utf8::unicode_to_native(0xA0);
113 \& s/$nbsp/ /g;
114 \&
115 \& to handle the above regardless if it\*(Aqs an ASCII world or not)
116 \& }
117 .Ve
118 .PP
119 You\*(Aqre unlikely to ever need to construct an object of this class for
120 yourself, but if you want to, call
121 \&\f(CW\*(C`Pod::Simple::PullParserTextToken\->new( \fR\f(CItext\fR\f(CW )\*(C'\fR
122 .SH "SEE ALSO"
123 .IX Header "SEE ALSO"
124 Pod::Simple::PullParserToken, Pod::Simple, Pod::Simple::Subclassing
125 .SH SUPPORT
126 .IX Header "SUPPORT"
127 Questions or discussion about POD and Pod::Simple should be sent to the
128 pod\[email protected] mail list. Send an empty email to
129 pod\-people\[email protected] to subscribe.
130 .PP
131 This module is managed in an open GitHub repository,
132 <https://github.com/perl\-pod/pod\-simple/>. Feel free to fork and contribute, or
133 to clone <https://github.com/perl\-pod/pod\-simple.git> and send patches!
134 .PP
135 Patches against Pod::Simple are welcome. Please send bug reports to
136 <bug\-pod\[email protected]>.
137 .SH "COPYRIGHT AND DISCLAIMERS"
138 .IX Header "COPYRIGHT AND DISCLAIMERS"
139 Copyright (c) 2002 Sean M. Burke.
140 .PP
141 This library is free software; you can redistribute it and/or modify it
142 under the same terms as Perl itself.
143 .PP
144 This program is distributed in the hope that it will be useful, but
145 without any warranty; without even the implied warranty of
146 merchantability or fitness for a particular purpose.
147 .SH AUTHOR
148 .IX Header "AUTHOR"
149 Pod::Simple was created by Sean M. Burke <[email protected]>.
150 But don\*(Aqt bother him, he\*(Aqs retired.
151 .PP
152 Pod::Simple is maintained by:
153 .IP \(bu 4
154 Allison Randal \f(CW\*(C`[email protected]\*(C'\fR
155 .IP \(bu 4
156 Hans Dieter Pearcey \f(CW\*(C`[email protected]\*(C'\fR
157 .IP \(bu 4
158 David E. Wheeler \f(CW\*(C`[email protected]\*(C'\fR