Pod::Simple::PullParserTextToken(3p)

Pod::Simple::PullParserTextToken3p

Usage

(See Pod::Simple::PullParser)

Overview

When you do $parser->get_token on a Pod::Simple::PullParser, you might get an object of this class.

This is a subclass of Pod::Simple::PullParserToken and inherits all its methods, and adds these methods:

$token->text

This returns the text that this token holds. For example, parsing C<foo> will return a C start-token, a text-token, and a C end-token. And if you want to get the "foo" out of the text-token, call "$token->text"

$token->text(somestring)

This changes the string that this token holds. You probably won't need to do this.

$token->text_r()

This returns a scalar reference to the string that this token holds. This can be useful if you don't want to memory-copy the potentially large text value (well, as large as a paragraph or a verbatim block) as calling $token->text would do.

Or, if you want to alter the value, you can even do things 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)
  }

You're unlikely to ever need to construct an object of this class for yourself, but if you want to, call "Pod::Simple::PullParserTextToken->new( text )"

Support

Questions or discussion about POD and Pod::Simple should be sent to the [email protected] mail list. Send an empty email to [email protected] to subscribe.

This module is managed in an open GitHub repository, <https://github.com/perl-pod/pod-simple/>. Feel free to fork and contribute, or to clone <https://github.com/perl-pod/pod-simple.git> and send patches!

Patches against Pod::Simple are welcome. Please send bug reports to <[email protected]>.

Releases

32 releases since OpenBSD 5.0; the text changed 20 times.

  1. 5.0–5.3
  2. 5.4–5.5
  3. 5.6
  4. 5.7
  5. 5.8–5.9
  6. 6.0
  7. 6.1
  8. 6.2
  9. 6.3–6.4
  10. 6.5
  11. 6.6
  12. 6.7
  13. 6.8
  14. 6.9–7.2
  15. 7.3
  16. 7.4
  17. 7.5
  18. 7.6
  19. 7.7–7.8
  20. 7.9
  21. 8.0

Author

Pod::Simple was created by Sean M. Burke <[email protected]>. But don't bother him, he's retired.

Pod::Simple is maintained by:

•

Allison Randal "[email protected]"

•

Hans Dieter Pearcey "[email protected]"

•

David E. Wheeler "[email protected]"

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's man source.