.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Pod::Html::Util 3perl" .TH Pod::Html::Util 3perl 2024-01-12 "perl v5.38.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Pod::Html::Util \- helper functions for Pod\-Html .SH SUBROUTINES .IX Header "SUBROUTINES" \&\fBNote:\fR While these functions are importable on request from \&\fIPod::Html::Util\fR, they are specifically intended for use within (a) the \&\fIPod-Html\fR distribution (modules and test programs) shipped as part of the Perl 5 core and (b) other parts of the core such as the \fIinstallhtml\fR program. These functions may be modified or relocated within the core distribution \-\- or removed entirely therefrom \-\- as the core's needs evolve. Hence, you should not rely on these functions in situations other than those just described. .ie n .SS process_command_line() .el .SS \f(CWprocess_command_line()\fP .IX Subsection "process_command_line()" Process command-line switches (options). Returns a reference to a hash. Will provide usage message if \f(CW\*(C`\-\-help\*(C'\fR switch is present or if parameters are invalid. .PP Calling this subroutine may modify \f(CW@ARGV\fR. .ie n .SS usage() .el .SS \f(CWusage()\fP .IX Subsection "usage()" Display customary Pod::Html usage information on STDERR. .ie n .SS unixify() .el .SS \f(CWunixify()\fP .IX Subsection "unixify()" Ensure that \fIPod::Html\fR's internals and tests handle paths consistently across Unix, Windows and VMS. .ie n .SS relativize_url() .el .SS \f(CWrelativize_url()\fP .IX Subsection "relativize_url()" Convert an absolute URL to one relative to a base URL. Assumes both end in a filename. .ie n .SS html_escape() .el .SS \f(CWhtml_escape()\fP .IX Subsection "html_escape()" Make text safe for HTML. .ie n .SS htmlify() .el .SS \f(CWhtmlify()\fP .IX Subsection "htmlify()" .Vb 1 \& htmlify($heading); .Ve .PP Converts a pod section specification to a suitable section specification for HTML. Note that we keep spaces and special characters except \&\f(CW\*(C`", ?\*(C'\fR (Netscape problem) and the hyphen (writer's problem...). .ie n .SS anchorify() .el .SS \f(CWanchorify()\fP .IX Subsection "anchorify()" .Vb 1 \& anchorify(@heading); .Ve .PP Similar to \f(CWhtmlify()\fR, but turns non-alphanumerics into underscores. Note that \f(CWanchorify()\fR is not exported by default. .ie n .SS trim_leading_whitespace() .el .SS \f(CWtrim_leading_whitespace()\fP .IX Subsection "trim_leading_whitespace()" Remove any level of indentation (spaces or tabs) from each code block consistently. Adapted from: https://metacpan.org/source/HAARG/MetaCPAN\-Pod\-XHTML\-0.002001/lib/Pod/Simple/Role/StripVerbatimIndent.pm