Debian Codegraph @

upstream/debian-unstable/man3/Pod::Html::Util.3perl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (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 .\"
57 .IX Title "Pod::Html::Util 3perl"
58 .TH Pod::Html::Util 3perl 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 Pod::Html::Util \- helper functions for Pod\-Html
65 .SH SUBROUTINES
66 .IX Header "SUBROUTINES"
67 \&\fBNote:\fR While these functions are importable on request from
68 \&\fIPod::Html::Util\fR, they are specifically intended for use within (a) the
69 \&\fIPod-Html\fR distribution (modules and test programs) shipped as part of the
70 Perl 5 core and (b) other parts of the core such as the \fIinstallhtml\fR
71 program. These functions may be modified or relocated within the core
72 distribution \-\- or removed entirely therefrom \-\- as the core's needs evolve.
73 Hence, you should not rely on these functions in situations other than those
74 just described.
75 .ie n .SS process_command_line()
76 .el .SS \f(CWprocess_command_line()\fP
77 .IX Subsection "process_command_line()"
78 Process command-line switches (options). Returns a reference to a hash. Will
79 provide usage message if \f(CW\*(C`\-\-help\*(C'\fR switch is present or if parameters are
80 invalid.
81 .PP
82 Calling this subroutine may modify \f(CW@ARGV\fR.
83 .ie n .SS usage()
84 .el .SS \f(CWusage()\fP
85 .IX Subsection "usage()"
86 Display customary Pod::Html usage information on STDERR.
87 .ie n .SS unixify()
88 .el .SS \f(CWunixify()\fP
89 .IX Subsection "unixify()"
90 Ensure that \fIPod::Html\fR's internals and tests handle paths consistently
91 across Unix, Windows and VMS.
92 .ie n .SS relativize_url()
93 .el .SS \f(CWrelativize_url()\fP
94 .IX Subsection "relativize_url()"
95 Convert an absolute URL to one relative to a base URL.
96 Assumes both end in a filename.
97 .ie n .SS html_escape()
98 .el .SS \f(CWhtml_escape()\fP
99 .IX Subsection "html_escape()"
100 Make text safe for HTML.
101 .ie n .SS htmlify()
102 .el .SS \f(CWhtmlify()\fP
103 .IX Subsection "htmlify()"
104 .Vb 1
105 \& htmlify($heading);
106 .Ve
107 .PP
108 Converts a pod section specification to a suitable section specification
109 for HTML. Note that we keep spaces and special characters except
110 \&\f(CW\*(C`", ?\*(C'\fR (Netscape problem) and the hyphen (writer's problem...).
111 .ie n .SS anchorify()
112 .el .SS \f(CWanchorify()\fP
113 .IX Subsection "anchorify()"
114 .Vb 1
115 \& anchorify(@heading);
116 .Ve
117 .PP
118 Similar to \f(CWhtmlify()\fR, but turns non-alphanumerics into underscores. Note
119 that \f(CWanchorify()\fR is not exported by default.
120 .ie n .SS trim_leading_whitespace()
121 .el .SS \f(CWtrim_leading_whitespace()\fP
122 .IX Subsection "trim_leading_whitespace()"
123 Remove any level of indentation (spaces or tabs) from each code block
124 consistently. Adapted from:
125 https://metacpan.org/source/HAARG/MetaCPAN\-Pod\-XHTML\-0.002001/lib/Pod/Simple/Role/StripVerbatimIndent.pm