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, parsing C<foo> will give you a C start-token, a text-token, and a C end-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->text would 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::PullParserToken
  • Pod::Simple
  • Pod::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 (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