Pod::Escapes(3perl)

๐Ÿ’– Pod::Escapes ๐Ÿ’–

okay so bestie, welcome to Pod::Escapes, straight outta the Perl Programmers Reference Guide โœจ this is the little module that figures out what all those cryptic E<...> sequences in your POD actually mean. it's giving translator energy. it's giving "I speak fluent entity reference". ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

Pod::Escapes โ€” for resolving Pod E<...> sequences ๐Ÿ’…


โœจ SYNOPSIS โœจ

use Pod::Escapes qw(e2char);
...la la la, parsing POD, la la la...
$text = e2char($e_node->label);
unless(defined $text) {
  print "Unknown E sequence \"", $e_node->label, "\"!";
}
...else print/interpolate $text...

like. that's it. that's the whole vibe. ๐Ÿ˜Œ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so this module hands you the little tools you need for decoding Pod E<...> sequences. and ngl, it's presumably meant for Pod parsers and/or formatters only โ€” iykyk, if you're just out here writing POD you probably don't need to touch this directly. ๐Ÿ™ˆ

and here's the tea on exports: by default, Pod::Escapes exports none of its symbols. zero. nada. but you can request any of them! either ask for them one at a time, like use Pod::Escapes qw(symbolname symbolname2...);, or go full main-character and do use Pod::Escapes qw(:ALL); to get every exportable symbol in one go. ๐Ÿ‘‘


๐ŸŽ€ GOODIES ๐ŸŽ€

e2char($e_content)

give it a name or a number that could show up in an E<name_or_num> sequence, and it hands you back the string that thing stands for. ๐Ÿ’–

for example: e2char('sol'), e2char('47'), e2char('0x2F'), and e2char('057') all return "/" โ€” because E<sol>, E<47>, E<0x2f>, and E<057> all mean "/". iconic behavior honestly. ๐ŸŒˆ

but if the name has no known value (like a name of "qacute") or it's syntactically invalid (like a name of "1/4"), this returns undef. ๐Ÿ’€ sorry bestie.

e2charnum($e_content)

same deal, but instead of the string it gives you the number of the Unicode character that it stands for. ๐Ÿ”ข

for example: e2char('sol'), e2char('47'), e2char('0x2F'), and e2char('057') all return 47, because E<sol>, E<47>, E<0x2f>, and E<057> all mean "/", whose Unicode number is 47. โœจ

and yeah, same rules as before: if the name has no known value (like a name of "qacute") or is syntactically invalid (like a name of "1/4"), this returns undef. ๐Ÿ˜ญ

$Name2character{name}

this hash maps from names (as in E<name>) like "eacute" or "sol" to the string that each one stands for. ๐Ÿ—บ๏ธ

โš ๏ธ important: this does not include numerics (like "64" or "x981c"). and heads up โ€” under old Perl versions (before 5.7) you get a "?" in place of characters whose Unicode value is over 255. not ideal, but she tries. ๐Ÿ’…

$Name2character_number{name}

this one maps from names (as in E<name>) like "eacute" or "sol" to the Unicode value that each one stands for.

for example, $Name2character_number{'eacute'} is 201, and $Name2character_number{'eacute'} is 8364. ๐Ÿงฎ

and the slay part: you get the correct Unicode value regardless of the version of Perl you're using โ€” which differs from %Name2character's behavior under pre-5.7 Perls. so if you're on ancient Perl, this hash is the one that's got your back. ๐Ÿซถ

also noting: this hash does not include numerics (like "64" or "x981c"). ๐Ÿ™…

$Latin1Code_to_fallback{integer}

for numbers in the range 160 (0x00A0) to 255 (0x00FF), this maps from the character code for a Latin-1 character (like 233 for lowercase e-acute) to the US-ASCII character that best approximates it (like "e"). ๐Ÿ”

this is chef's kiss useful if you're rendering POD in a format that, in your humble opinion, only really deals well with US-ASCII characters. ๐Ÿ‘‘

$Latin1Char_to_fallback{character}

literally just as above, but this time it maps from characters (like "\xE9", lowercase e-acute) to characters (like "e"). ๐Ÿ”„

$Code2USASCII{integer}

this maps from US-ASCII codes (like 32) to the corresponding character (like space, for 32). ๐ŸŒˆ

heads up though: only characters 32 to 126 are defined. this one is meant for use by e2char($x) when it senses that it's running on a non-ASCII platform (where chr(32) doesn't get you a space โ€” but $Code2USASCII{32} will). โœจ

it's documented here just in case you might find it useful. we're doing it for the plot. ๐ŸŽ€


โš ๏ธ CAVEATS โš ๏ธ

okay so the not-so-cute parts, and we're being real about them: ๐Ÿซ 

  • on Perl versions before 5.7, Unicode characters with a value over 255 (like lambda or emdash) can't be conveyed. this module does work under such early Perl versions, but in the place of each such character, you get a "?". ๐Ÿ’€ Latin-1 characters (characters 160-255) are unaffected though, so at least there's that. ๐Ÿซถ
  • under EBCDIC platforms, e2char($n) may not always be the same as chr(e2charnum($n)), and ditto for $Name2character{$name} and chr($Name2character_number{$name}) โ€” because the strings are returned as native, and the numbers are returned as Unicode. different lanes, bestie. however! for Perls starting with v5.8, e2char($n) is the same as chr(utf8::unicode_to_native(e2charnum($n))), and ditto for $Name2character{$name} and chr(utf8::unicode_to_native($Name2character_number{$name})). โœจ

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • Pod::Browser โ€” a pod web server based on Catalyst. ๐ŸŒ
  • Pod::Checker โ€” check pod documents for syntax errors. ๐Ÿ”
  • Pod::Coverage โ€” check if the documentation for a module is comprehensive. ๐Ÿ“š
  • perlpod โ€” description of pod format (for people documenting with pod). โœ๏ธ
  • perlpodspec โ€” specification of pod format (for people processing it). ๐Ÿ“œ
  • Text::Unidecode โ€” ASCII transliteration of Unicode text. ๐Ÿ”ค

๐Ÿ“ฆ REPOSITORY ๐Ÿ“ฆ

<https://github.com/neilbowers/Pod-Escapes> โ€” go say hi, the source is right there ๐Ÿ’–


Copyright (c) 2001-2004 Sean M. Burke. All rights reserved. ๐Ÿซก

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. (translation: no promises, bestie. ๐Ÿ˜ญ)

Portions of the data tables in this module are derived from the entity declarations in the W3C XHTML specification. ๐Ÿ“–

Currently (October 2001), that's these three:

http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent
http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent

๐ŸŒŸ AUTHOR ๐ŸŒŸ

Sean M. Burke "sburke@cpan.org" ๐Ÿ‘‘

Now being maintained by Neil Bowers <neilb@cpan.org> ๐Ÿซถ


aaaand that's the whole page, bestie!! ๐ŸŽ€ this was perl v5.44.0, dated 2026-10-17, and it's Pod::Escapes(3perl) โ€” now go decode some E<...> sequences, you absolute icon ๐Ÿ’…โœจ๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ 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