Linux command
pod2html 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Convert POD file to HTML
pod2html --infile=[file.pod] --outfile=[file.html]
Convert with a custom HTML title
pod2html --title="[My Module]" --infile=[file.pod] --outfile=[file.html]
Include an external CSS stylesheet
pod2html --css=[style.css] --infile=[file.pod] --outfile=[file.html]
Convert without generating a table of contents
pod2html --noindex --infile=[file.pod] --outfile=[file.html]
Add backlinks from headings back to the top of the page
pod2html --backlink --infile=[file.pod] --outfile=[file.html]
Flush the pod2html cache before conversion
pod2html --flush --infile=[file.pod] --outfile=[file.html]
说明
pod2html converts Perl POD (Plain Old Documentation) source into HTML, resolving L<> hyperlinks and converting POD formatting directives to HTML markup. It can optionally prepend a table of contents built from =head directives and insert backlinks between headings and the top of the document. The utility relies on a cache (by default stored in the working directory) that maps pod names to URLs so that cross-references between pages are resolved efficiently across multiple runs. Use --flush after moving or renaming source pods.
参数
- --infile=_name_
- POD input file. Defaults to STDIN.
- --outfile=_name_
- HTML output file. Defaults to STDOUT.
- --title=_name_
- Set the HTML document title.
- --css=_URL_
- Link to a cascading style sheet.
- --index / --noindex
- Include or omit a table of contents at the top of the HTML output. Enabled by default.
- --backlink / --nobacklink
- Add links from each heading back to the top of the page.
- --header / --noheader
- Emit banner headers and footers derived from the POD NAME section.
- --htmldir=_name_
- Directory used when generating relative cross-references to other HTML files.
- --htmlroot=_URL_
- Base URL for absolute HTML cross-reference links.
- --podpath=_dirs_
- Colon-separated list of directories containing pod files used for resolving L<> links.
- --podroot=_name_
- Base directory for library pod files.
- --cachedir=_name_
- Directory in which pod2html stores its cache. Default: current directory.
- --flush
- Clear the cache before processing.
- --recurse / --norecurse
- Recurse into subdirectories specified by --podpath.
- --quiet / --verbose
- Suppress warnings or show progress messages.
- --poderrors / --nopoderrors
- Include or omit a POD errors section in the output.
FAQ
What is the pod2html command used for?
pod2html converts Perl POD (Plain Old Documentation) source into HTML, resolving L<> hyperlinks and converting POD formatting directives to HTML markup. It can optionally prepend a table of contents built from =head directives and insert backlinks between headings and the top of the document. The utility relies on a cache (by default stored in the working directory) that maps pod names to URLs so that cross-references between pages are resolved efficiently across multiple runs. Use --flush after moving or renaming source pods.
How do I run a basic pod2html example?
Run `pod2html --infile=[file.pod] --outfile=[file.html]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --infile=_name_ do in pod2html?
POD input file. Defaults to STDIN.