Pod::S...tToken(3perl)
β¨ Pod::Simple::PullParserTextToken β text-tokens from Pod::Simple::PullParser β¨
okay bestie, welcome to the Perl Programmers Reference Guide π this is the page for Pod::Simple::PullParserTextToken, and yes the manual name is a mouthful, we know, we still love her π
πΈ SYNOPSIS
(See Pod::Simple::PullParser)
no cap, the whole synopsis is just a pointer to her big sister. iconic of her tbh π«Ά
π¦ DESCRIPTION
so here's the tea β β when you go and call $parser->get_token on a Pod::Simple::PullParser, there's a real chance what you get handed back is an object of this class. surprise!! it's giving party favor π
Now, this class is a subclass of Pod::Simple::PullParserToken π which means it inherits every single method from her parent, and then she goes and adds these extra ones on top. main character energy fr fr:
$token->textβ this hands you back the text that this token is holding on to π. like, for example, parsingC<foo>will give you aCstart-token, a text-token, and aCend-token. and if you're trying to get that"foo"out of the text-token? you call"$token->text"and boom, there it is β¨$token->text(somestring)β okay so this one changes the string that this token is holding. lowkey you are probably never gonna need to do this π but it's there if you want it.$token->text_r()β this returns a scalar reference to the string that this token holds π₯. super useful when you don't wanna memory-copy the potentially large text value (and by "potentially large" we mean like, as large as a paragraph or a verbatim block, bestie, that's a chunky girl π) β which is exactly what calling$token->textwould do to you.
or!! if you're feeling brave and you actually wanna alter the value, you can literally do stuff like this:
for ( ${ $token->text_r } ) { # Aliases it with $_ !!
s/ The / the /g; # just for example
if( 'A' eq chr(65) ) { # (if in an ASCII world)
tr/\xA0/ /;
tr/\xAD//d;
}
...or however you want to alter the value...
(Note that starting with Perl v5.8, you can use, e.g.,
my $nbsp = chr utf8::unicode_to_native(0xA0);
s/$nbsp/ /g;
to handle the above regardless if it's an ASCII world or not)
}
β οΈ bestie notice that${ $token->text_r }aliases it with$_β that's the whole trick that makes the substitution work in place. the comment in the original says it loud and clear:# Aliases it with $_ !!π’
You're unlikely to ever need to construct an object of this class for yourself, but if you really wanna, you call:
Pod::Simple::PullParserTextToken->new( text )
you do you, queen π
π SEE ALSO
Pod::Simple::PullParserTokenPod::SimplePod::Simple::Subclassing
π«Ά SUPPORT
got questions? want to discuss POD and Pod::Simple with the girlies? send them over to the pod-people@perl.org mail list π and if you wanna subscribe, just send a totally empty email to pod-people-subscribe@perl.org β empty, bestie, like your inbox after a good unsubscribe spree β¨
This module is managed in an open GitHub repository, <https://github.com/perl-pod/pod-simple/>. Feel free to fork and contribute, or clone <https://github.com/perl-pod/pod-simple.git> and send patches! π no gatekeeping here.
Patches against Pod::Simple are welcome π₯Ή and please send bug reports to <bug-pod-simple@rt.cpan.org> β we want the tea, fr fr.
π COPYRIGHT AND DISCLAIMERS
Copyright (c) 2002 Sean M. Burke. π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. π yeah she said it, no promises, that's the deal.
π AUTHOR
Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. But don't bother him, he's retired ποΈ respect the rest era.
Pod::Simple is maintained by:
- Allison Randal
"allison@perl.org" - Hans Dieter Pearcey
"hdp@cpan.org" - David E. Wheeler
"dwheeler@cpan.org"
and that's the whole page, bestie!! π¦ screaming, crying, throwing up over how cute this token class is. this was Pod::S...tToken(3perl) from perl v5.44.0, dated 2026-10-17 β go forth and pull them tokens πβ¨π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms