Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Pod::Escapes.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::Escapes 3pm"
61 .TH Pod::Escapes 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::Escapes \- for resolving Pod E<...> sequences
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 7
71 \& use Pod::Escapes qw(e2char);
72 \& ...la la la, parsing POD, la la la...
73 \& $text = e2char($e_node\->label);
74 \& unless(defined $text) {
75 \& print "Unknown E sequence \e"", $e_node\->label, "\e"!";
76 \& }
77 \& ...else print/interpolate $text...
78 .Ve
79 .SH DESCRIPTION
80 .IX Header "DESCRIPTION"
81 This module provides things that are useful in decoding
82 Pod E<...> sequences. Presumably, it should be used
83 only by Pod parsers and/or formatters.
84 .PP
85 By default, Pod::Escapes exports none of its symbols. But
86 you can request any of them to be exported.
87 Either request them individually, as with
88 \&\f(CW\*(C`use Pod::Escapes qw(symbolname symbolname2...);\*(C'\fR,
89 or you can do \f(CW\*(C`use Pod::Escapes qw(:ALL);\*(C'\fR to get all
90 exportable symbols.
91 .SH GOODIES
92 .IX Header "GOODIES"
93 .IP e2char($e_content) 4
94 .IX Item "e2char($e_content)"
95 Given a name or number that could appear in a
96 \&\f(CW\*(C`E<name_or_num>\*(C'\fR sequence, this returns the string that
97 it stands for. For example, \f(CWe2char(\*(Aqsol\*(Aq)\fR, \f(CWe2char(\*(Aq47\*(Aq)\fR,
98 \&\f(CWe2char(\*(Aq0x2F\*(Aq)\fR, and \f(CWe2char(\*(Aq057\*(Aq)\fR all return "/",
99 because \f(CW\*(C`E<sol>\*(C'\fR, \f(CW\*(C`E<47>\*(C'\fR, \f(CW\*(C`E<0x2f>\*(C'\fR,
100 and \f(CW\*(C`E<057>\*(C'\fR, all mean "/". If
101 the name has no known value (as with a name of "qacute") or is
102 syntactically invalid (as with a name of "1/4"), this returns undef.
103 .IP e2charnum($e_content) 4
104 .IX Item "e2charnum($e_content)"
105 Given a name or number that could appear in a
106 \&\f(CW\*(C`E<name_or_num>\*(C'\fR sequence, this returns the number of
107 the Unicode character that this stands for. For example,
108 \&\f(CWe2char(\*(Aqsol\*(Aq)\fR, \f(CWe2char(\*(Aq47\*(Aq)\fR,
109 \&\f(CWe2char(\*(Aq0x2F\*(Aq)\fR, and \f(CWe2char(\*(Aq057\*(Aq)\fR all return 47,
110 because \f(CW\*(C`E<sol>\*(C'\fR, \f(CW\*(C`E<47>\*(C'\fR, \f(CW\*(C`E<0x2f>\*(C'\fR,
111 and \f(CW\*(C`E<057>\*(C'\fR, all mean "/", whose Unicode number is 47. If
112 the name has no known value (as with a name of "qacute") or is
113 syntactically invalid (as with a name of "1/4"), this returns undef.
114 .ie n .IP $Name2character{\fIname\fR} 4
115 .el .IP \f(CW$Name2character\fR{\fIname\fR} 4
116 .IX Item "$Name2character{name}"
117 Maps from names (as in \f(CW\*(C`E<\fR\f(CIname\fR\f(CW>\*(C'\fR) like "eacute" or "sol"
118 to the string that each stands for. Note that this does not
119 include numerics (like "64" or "x981c"). Under old Perl versions
120 (before 5.7) you get a "?" in place of characters whose Unicode
121 value is over 255.
122 .ie n .IP $Name2character_number{\fIname\fR} 4
123 .el .IP \f(CW$Name2character_number\fR{\fIname\fR} 4
124 .IX Item "$Name2character_number{name}"
125 Maps from names (as in \f(CW\*(C`E<\fR\f(CIname\fR\f(CW>\*(C'\fR) like "eacute" or "sol"
126 to the Unicode value that each stands for. For example,
127 \&\f(CW$Name2character_number{\*(Aqeacute\*(Aq}\fR is 201, and
128 \&\f(CW$Name2character_number{\*(Aqeacute\*(Aq}\fR is 8364. You get the correct
129 Unicode value, regardless of the version of Perl you\*(Aqre using \-\-
130 which differs from \f(CW%Name2character\fR\*(Aqs behavior under pre\-5.7 Perls.
131 .Sp
132 Note that this hash does not
133 include numerics (like "64" or "x981c").
134 .ie n .IP $Latin1Code_to_fallback{\fIinteger\fR} 4
135 .el .IP \f(CW$Latin1Code_to_fallback\fR{\fIinteger\fR} 4
136 .IX Item "$Latin1Code_to_fallback{integer}"
137 For numbers in the range 160 (0x00A0) to 255 (0x00FF), this maps
138 from the character code for a Latin\-1 character (like 233 for
139 lowercase e\-acute) to the US\-ASCII character that best aproximates
140 it (like "e"). You may find this useful if you are rendering
141 POD in a format that you think deals well only with US\-ASCII
142 characters.
143 .ie n .IP $Latin1Char_to_fallback{\fIcharacter\fR} 4
144 .el .IP \f(CW$Latin1Char_to_fallback\fR{\fIcharacter\fR} 4
145 .IX Item "$Latin1Char_to_fallback{character}"
146 Just as above, but maps from characters (like "\exE9",
147 lowercase e\-acute) to characters (like "e").
148 .ie n .IP $Code2USASCII{\fIinteger\fR} 4
149 .el .IP \f(CW$Code2USASCII\fR{\fIinteger\fR} 4
150 .IX Item "$Code2USASCII{integer}"
151 This maps from US\-ASCII codes (like 32) to the corresponding
152 character (like space, for 32). Only characters 32 to 126 are
153 defined. This is meant for use by \f(CWe2char($x)\fR when it senses
154 that it\*(Aqs running on a non\-ASCII platform (where chr(32) doesn\*(Aqt
155 get you a space \-\- but \f(CW$Code2USASCII\fR{32} will). It\*(Aqs
156 documented here just in case you might find it useful.
157 .SH CAVEATS
158 .IX Header "CAVEATS"
159 On Perl versions before 5.7, Unicode characters with a value
160 over 255 (like lambda or emdash) can\*(Aqt be conveyed. This
161 module does work under such early Perl versions, but in the
162 place of each such character, you get a "?". Latin\-1
163 characters (characters 160\-255) are unaffected.
164 .PP
165 Under EBCDIC platforms, \f(CWe2char($n)\fR may not always be the
166 same as \f(CW\*(C`chr(e2charnum($n))\*(C'\fR, and ditto for
167 \&\f(CW$Name2character{$name}\fR and
168 \&\f(CWchr($Name2character_number{$name})\fR, because the strings are returned as
169 native, and the numbers are returned as Unicode.
170 However, for Perls starting with v5.8, \f(CWe2char($n)\fR is the same as
171 \&\f(CW\*(C`chr(utf8::unicode_to_native(e2charnum($n)))\*(C'\fR, and ditto for
172 \&\f(CW$Name2character{$name}\fR and
173 \&\f(CW\*(C`chr(utf8::unicode_to_native($Name2character_number{$name}))\*(C'\fR.
174 .SH "SEE ALSO"
175 .IX Header "SEE ALSO"
176 Pod::Browser \- a pod web server based on Catalyst.
177 .PP
178 Pod::Checker \- check pod documents for syntax errors.
179 .PP
180 Pod::Coverage \- check if the documentation for a module is comprehensive.
181 .PP
182 perlpod \- description of pod format (for people documenting with pod).
183 .PP
184 perlpodspec \- specification of pod format (for people processing it).
185 .PP
186 Text::Unidecode \- ASCII transliteration of Unicode text.
187 .SH REPOSITORY
188 .IX Header "REPOSITORY"
189 <https://github.com/neilbowers/Pod\-Escapes>
190 .SH "COPYRIGHT AND DISCLAIMERS"
191 .IX Header "COPYRIGHT AND DISCLAIMERS"
192 Copyright (c) 2001\-2004 Sean M. Burke. All rights reserved.
193 .PP
194 This library is free software; you can redistribute it and/or modify
195 it under the same terms as Perl itself.
196 .PP
197 This program is distributed in the hope that it will be useful, but
198 without any warranty; without even the implied warranty of
199 merchantability or fitness for a particular purpose.
200 .PP
201 Portions of the data tables in this module are derived from the
202 entity declarations in the W3C XHTML specification.
203 .PP
204 Currently (October 2001), that\*(Aqs these three:
205 .PP
206 .Vb 3
207 \& http://www.w3.org/TR/xhtml1/DTD/xhtml\-lat1.ent
208 \& http://www.w3.org/TR/xhtml1/DTD/xhtml\-special.ent
209 \& http://www.w3.org/TR/xhtml1/DTD/xhtml\-symbol.ent
210 .Ve
211 .SH AUTHOR
212 .IX Header "AUTHOR"
213 Sean M. Burke \f(CW\*(C`[email protected]\*(C'\fR
214 .PP
215 Now being maintained by Neil Bowers <[email protected]>