CINXE.COM
Pod::ParseUtils - helpers for POD parsing and conversion - Perldoc Browser
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Pod::ParseUtils - helpers for POD parsing and conversion - Perldoc Browser</title> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser"> <link rel="canonical" href="https://perldoc.perl.org/Pod::ParseUtils"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" /> <style> body { background: #f4f4f5; color: #020202; } .navbar-dark { background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%); background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%); background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0); background-repeat: repeat-x; } .navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-nav .nav-link:focus { color: #fff } .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 } #wrapperlicious { margin: 0 auto; font: 0.9em 'Helvetica Neue', Helvetica, sans-serif; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0; } #wrapperlicious h1 { font-size: 1.5em } #wrapperlicious h2 { font-size: 1.3em } #wrapperlicious h3 { font-size: 1.1em } #wrapperlicious h4 { font-size: 0.9em } #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3, #wrapperlicious h4, #wrapperlicious dt { color: #020202; margin-top: 1em; margin-bottom: 1em; position: relative; font-weight: bold; } #wrapperlicious a { color: inherit; text-decoration: underline } #wrapperlicious #toc { text-decoration: none } #wrapperlicious a:hover { color: #2a2a2a } #wrapperlicious a img { border: 0 } #wrapperlicious :not(pre) > code { color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; font: 0.9em Consolas, Menlo, Monaco, monospace; padding: 0.3em; } #wrapperlicious dd { margin: 0; margin-left: 2em; } #wrapperlicious dt { color: #2a2a2a; font-weight: bold; margin-left: 0.9em; } #wrapperlicious p { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious li > p { margin-bottom: 0; margin-top: 0; } #wrapperlicious pre { border: 1px solid #c1c1c1; border-radius: 3px; font: 100% Consolas, Menlo, Monaco, monospace; margin-bottom: 1em; margin-top: 1em; } #wrapperlicious pre > code { display: block; background-color: #f6f6f6; font: 0.9em Consolas, Menlo, Monaco, monospace; line-height: 1.5em; text-align: left; white-space: pre; padding: 1em; } #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious ul { list-style-type: square; } #wrapperlicious ul ul { margin-bottom: 0px; margin-top: 0px; } #footer { font-size: 0.8em; padding-top: 0.5em; text-align: center; } #more { display: inline; font-size: 0.8em; } #perldocdiv { background-color: #fff; border: 1px solid #c1c1c1; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin-left: auto; margin-right: auto; padding: 3em; padding-top: 1em; max-width: 960px; } #moduleversion { float: right } #wrapperlicious .leading-notice { font-style: italic; padding-left: 1em; margin-top: 1em; margin-bottom: 1em; } #wrapperlicious .permalink { display: none; left: -0.75em; position: absolute; padding-right: 0.25em; text-decoration: none; } #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink, #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink, #wrapperlicious dt:hover .permalink { display: block; } </style> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KVNWBNT5FB'); gtag('config', 'UA-50555-3'); </script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="/"><img src="/images/perl_camel_30.png" width="30" height="30" class="d-inline-block align-top" alt="Perl Camel Logo"> Perldoc Browser</a> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.28.3</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/Pod::ParseUtils">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1/Pod::ParseUtils">5.40.1</a> <a class="dropdown-item" href="/5.40.0/Pod::ParseUtils">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3/Pod::ParseUtils">5.38.3</a> <a class="dropdown-item" href="/5.38.2/Pod::ParseUtils">5.38.2</a> <a class="dropdown-item" href="/5.38.1/Pod::ParseUtils">5.38.1</a> <a class="dropdown-item" href="/5.38.0/Pod::ParseUtils">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/Pod::ParseUtils">5.36.3</a> <a class="dropdown-item" href="/5.36.2/Pod::ParseUtils">5.36.2</a> <a class="dropdown-item" href="/5.36.1/Pod::ParseUtils">5.36.1</a> <a class="dropdown-item" href="/5.36.0/Pod::ParseUtils">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/Pod::ParseUtils">5.34.3</a> <a class="dropdown-item" href="/5.34.2/Pod::ParseUtils">5.34.2</a> <a class="dropdown-item" href="/5.34.1/Pod::ParseUtils">5.34.1</a> <a class="dropdown-item" href="/5.34.0/Pod::ParseUtils">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/Pod::ParseUtils">5.32.1</a> <a class="dropdown-item" href="/5.32.0/Pod::ParseUtils">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/Pod::ParseUtils">5.30.3</a> <a class="dropdown-item" href="/5.30.2/Pod::ParseUtils">5.30.2</a> <a class="dropdown-item" href="/5.30.1/Pod::ParseUtils">5.30.1</a> <a class="dropdown-item" href="/5.30.0/Pod::ParseUtils">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item active" href="/5.28.3/Pod::ParseUtils">5.28.3</a> <a class="dropdown-item" href="/5.28.2/Pod::ParseUtils">5.28.2</a> <a class="dropdown-item" href="/5.28.1/Pod::ParseUtils">5.28.1</a> <a class="dropdown-item" href="/5.28.0/Pod::ParseUtils">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/Pod::ParseUtils">5.26.3</a> <a class="dropdown-item" href="/5.26.2/Pod::ParseUtils">5.26.2</a> <a class="dropdown-item" href="/5.26.1/Pod::ParseUtils">5.26.1</a> <a class="dropdown-item" href="/5.26.0/Pod::ParseUtils">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/Pod::ParseUtils">5.24.4</a> <a class="dropdown-item" href="/5.24.3/Pod::ParseUtils">5.24.3</a> <a class="dropdown-item" href="/5.24.2/Pod::ParseUtils">5.24.2</a> <a class="dropdown-item" href="/5.24.1/Pod::ParseUtils">5.24.1</a> <a class="dropdown-item" href="/5.24.0/Pod::ParseUtils">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/Pod::ParseUtils">5.22.4</a> <a class="dropdown-item" href="/5.22.3/Pod::ParseUtils">5.22.3</a> <a class="dropdown-item" href="/5.22.2/Pod::ParseUtils">5.22.2</a> <a class="dropdown-item" href="/5.22.1/Pod::ParseUtils">5.22.1</a> <a class="dropdown-item" href="/5.22.0/Pod::ParseUtils">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/Pod::ParseUtils">5.20.3</a> <a class="dropdown-item" href="/5.20.2/Pod::ParseUtils">5.20.2</a> <a class="dropdown-item" href="/5.20.1/Pod::ParseUtils">5.20.1</a> <a class="dropdown-item" href="/5.20.0/Pod::ParseUtils">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/Pod::ParseUtils">5.18.4</a> <a class="dropdown-item" href="/5.18.3/Pod::ParseUtils">5.18.3</a> <a class="dropdown-item" href="/5.18.2/Pod::ParseUtils">5.18.2</a> <a class="dropdown-item" href="/5.18.1/Pod::ParseUtils">5.18.1</a> <a class="dropdown-item" href="/5.18.0/Pod::ParseUtils">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/Pod::ParseUtils">5.16.3</a> <a class="dropdown-item" href="/5.16.2/Pod::ParseUtils">5.16.2</a> <a class="dropdown-item" href="/5.16.1/Pod::ParseUtils">5.16.1</a> <a class="dropdown-item" href="/5.16.0/Pod::ParseUtils">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/Pod::ParseUtils">5.14.4</a> <a class="dropdown-item" href="/5.14.3/Pod::ParseUtils">5.14.3</a> <a class="dropdown-item" href="/5.14.2/Pod::ParseUtils">5.14.2</a> <a class="dropdown-item" href="/5.14.1/Pod::ParseUtils">5.14.1</a> <a class="dropdown-item" href="/5.14.0/Pod::ParseUtils">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/Pod::ParseUtils">5.12.5</a> <a class="dropdown-item" href="/5.12.4/Pod::ParseUtils">5.12.4</a> <a class="dropdown-item" href="/5.12.3/Pod::ParseUtils">5.12.3</a> <a class="dropdown-item" href="/5.12.2/Pod::ParseUtils">5.12.2</a> <a class="dropdown-item" href="/5.12.1/Pod::ParseUtils">5.12.1</a> <a class="dropdown-item" href="/5.12.0/Pod::ParseUtils">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/Pod::ParseUtils">5.10.1</a> <a class="dropdown-item" href="/5.10.0/Pod::ParseUtils">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/Pod::ParseUtils">5.8.9</a> <a class="dropdown-item" href="/5.8.8/Pod::ParseUtils">5.8.8</a> <a class="dropdown-item" href="/5.8.7/Pod::ParseUtils">5.8.7</a> <a class="dropdown-item" href="/5.8.6/Pod::ParseUtils">5.8.6</a> <a class="dropdown-item" href="/5.8.5/Pod::ParseUtils">5.8.5</a> <a class="dropdown-item" href="/5.8.4/Pod::ParseUtils">5.8.4</a> <a class="dropdown-item" href="/5.8.3/Pod::ParseUtils">5.8.3</a> <a class="dropdown-item" href="/5.8.2/Pod::ParseUtils">5.8.2</a> <a class="dropdown-item" href="/5.8.1/Pod::ParseUtils">5.8.1</a> <a class="dropdown-item" href="/5.8.0/Pod::ParseUtils">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/Pod::ParseUtils">5.6.2</a> <a class="dropdown-item" href="/5.6.1/Pod::ParseUtils">5.6.1</a> <a class="dropdown-item" href="/5.6.0/Pod::ParseUtils">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/Pod::ParseUtils">5.005_04</a> <a class="dropdown-item" href="/5.005_03/Pod::ParseUtils">5.005_03</a> <a class="dropdown-item" href="/5.005_02/Pod::ParseUtils">5.005_02</a> <a class="dropdown-item" href="/5.005_01/Pod::ParseUtils">5.005_01</a> <a class="dropdown-item" href="/5.005/Pod::ParseUtils">5.005</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-dev"> <a class="dropdown-item" href="/blead/Pod::ParseUtils">blead</a> <a class="dropdown-item" href="/5.41.10/Pod::ParseUtils">5.41.10</a> <a class="dropdown-item" href="/5.41.9/Pod::ParseUtils">5.41.9</a> <a class="dropdown-item" href="/5.41.8/Pod::ParseUtils">5.41.8</a> <a class="dropdown-item" href="/5.41.7/Pod::ParseUtils">5.41.7</a> <a class="dropdown-item" href="/5.41.6/Pod::ParseUtils">5.41.6</a> <a class="dropdown-item" href="/5.41.5/Pod::ParseUtils">5.41.5</a> <a class="dropdown-item" href="/5.41.4/Pod::ParseUtils">5.41.4</a> <a class="dropdown-item" href="/5.41.3/Pod::ParseUtils">5.41.3</a> <a class="dropdown-item" href="/5.41.2/Pod::ParseUtils">5.41.2</a> <a class="dropdown-item" href="/5.41.1/Pod::ParseUtils">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1-RC1/Pod::ParseUtils">5.40.1-RC1</a> <a class="dropdown-item" href="/5.40.0-RC2/Pod::ParseUtils">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/Pod::ParseUtils">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/Pod::ParseUtils">5.39.10</a> <a class="dropdown-item" href="/5.39.9/Pod::ParseUtils">5.39.9</a> <a class="dropdown-item" href="/5.39.8/Pod::ParseUtils">5.39.8</a> <a class="dropdown-item" href="/5.39.7/Pod::ParseUtils">5.39.7</a> <a class="dropdown-item" href="/5.39.6/Pod::ParseUtils">5.39.6</a> <a class="dropdown-item" href="/5.39.5/Pod::ParseUtils">5.39.5</a> <a class="dropdown-item" href="/5.39.4/Pod::ParseUtils">5.39.4</a> <a class="dropdown-item" href="/5.39.3/Pod::ParseUtils">5.39.3</a> <a class="dropdown-item" href="/5.39.2/Pod::ParseUtils">5.39.2</a> <a class="dropdown-item" href="/5.39.1/Pod::ParseUtils">5.39.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3-RC1/Pod::ParseUtils">5.38.3-RC1</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-nav"> <a class="dropdown-item" href="/5.28.3/perl">Perl</a> <a class="dropdown-item" href="/5.28.3/perlintro">Intro</a> <a class="dropdown-item" href="/5.28.3/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.28.3/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.28.3/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/perlop">Operators</a> <a class="dropdown-item" href="/5.28.3/functions">Functions</a> <a class="dropdown-item" href="/5.28.3/variables">Variables</a> <a class="dropdown-item" href="/5.28.3/modules">Modules</a> <a class="dropdown-item" href="/5.28.3/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.28.3/perlcommunity">Community</a> <a class="dropdown-item" href="/5.28.3/perlhist">History</a> </div> </li> </ul> <ul class="navbar-nav"> <script> function set_expand (expand) { var perldocdiv = document.getElementById('perldocdiv'); var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width'); var expanded = (width == '' || width == 'none') ? true : false; if (expand === null) { expand = !expanded; } if ((expand && !expanded) || (!expand && expanded)) { perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px'); var button_classlist = document.getElementById('content-expand-button').classList; if (expand) { button_classlist.add('btn-light'); button_classlist.remove('btn-outline-light'); } else { button_classlist.add('btn-outline-light'); button_classlist.remove('btn-light'); } } return expand; } function toggle_expand () { var expand = set_expand(null); document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC'; } function read_expand () { return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { if (read_expand()) { set_expand(true); } }); } else if (read_expand()) { set_expand(true); } </script> <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-4" onclick="toggle_expand()">Expand</button> </ul> <form class="form-inline" method="get" action="/5.28.3/search"> <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search" value=""> </form> </div> </nav> <div id="wrapperlicious" class="container-fluid"> <div id="perldocdiv"> <div id="links"> <a href="/5.28.3/Pod::ParseUtils">Pod::ParseUtils</a> <div id="more"> (<a href="/5.28.3/Pod::ParseUtils.txt">source</a>, <a href="https://metacpan.org/pod/Pod::ParseUtils">CPAN</a>) </div> <div id="moduleversion">version 1.63</div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.28.3. <a href="/Pod::ParseUtils">View the latest version</a> </div> <h1><a id="toc">CONTENTS</a></h1> <ul> <li> <a class="text-decoration-none" href="#NAME">NAME</a> </li> <li> <a class="text-decoration-none" href="#SYNOPSIS">SYNOPSIS</a> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> <ul> <li> <a class="text-decoration-none" href="#Pod::List">Pod::List</a> </li> <li> <a class="text-decoration-none" href="#Pod::Hyperlink">Pod::Hyperlink</a> </li> <li> <a class="text-decoration-none" href="#Pod::Cache">Pod::Cache</a> </li> <li> <a class="text-decoration-none" href="#Pod::Cache::Item">Pod::Cache::Item</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#AUTHOR">AUTHOR</a> </li> <li> <a class="text-decoration-none" href="#SEE-ALSO">SEE ALSO</a> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>Pod::ParseUtils - helpers for POD parsing and conversion</p> <h1 id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">#</a>SYNOPSIS</h1> <pre><code>use Pod::ParseUtils; my $list = new Pod::List; my $link = Pod::Hyperlink->new('Pod::Parser');</code></pre> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <p><b>NOTE: This module is considered legacy; modern Perl releases (5.18 and higher) are going to remove Pod-Parser from core and use <a href="/5.28.3/Pod-Simple">Pod-Simple</a> for all things POD.</b></p> <p><b>Pod::ParseUtils</b> contains a few object-oriented helper packages for POD parsing and processing (i.e. in POD formatters and translators).</p> <h2 id="Pod::List"><a class="permalink" href="#Pod::List">#</a><a id="Pod"></a>Pod::List</h2> <p><b>Pod::List</b> can be used to hold information about POD lists (written as =over ... =item ... =back) for further processing. The following methods are available:</p> <dl> <dt id="Pod::List->new()"><a class="permalink" href="#Pod::List-%3Enew()">#</a><a id="Pod1"></a><a id="Pod::List-new"></a>Pod::List->new()</dt> <dd> <p>Create a new list object. Properties may be specified through a hash reference like this:</p> <pre><code>my $list = Pod::List->new({ -start => $., -indent => 4 });</code></pre> <p>See the individual methods/properties for details.</p> </dd> <dt id="$list->file()"><a class="permalink" href="#$list-%3Efile()">#</a><a id="file"></a><a id="list-file"></a>$list->file()</dt> <dd> <p>Without argument, retrieves the file name the list is in. This must have been set before by either specifying <b>-file</b> in the <b>new()</b> method or by calling the <b>file()</b> method with a scalar argument.</p> </dd> <dt id="$list->start()"><a class="permalink" href="#$list-%3Estart()">#</a><a id="start"></a><a id="list-start"></a>$list->start()</dt> <dd> <p>Without argument, retrieves the line number where the list started. This must have been set before by either specifying <b>-start</b> in the <b>new()</b> method or by calling the <b>start()</b> method with a scalar argument.</p> </dd> <dt id="$list->indent()"><a class="permalink" href="#$list-%3Eindent()">#</a><a id="indent"></a><a id="list-indent"></a>$list->indent()</dt> <dd> <p>Without argument, retrieves the indent level of the list as specified in <code>=over n</code>. This must have been set before by either specifying <b>-indent</b> in the <b>new()</b> method or by calling the <b>indent()</b> method with a scalar argument.</p> </dd> <dt id="$list->type()"><a class="permalink" href="#$list-%3Etype()">#</a><a id="type"></a><a id="list-type"></a>$list->type()</dt> <dd> <p>Without argument, retrieves the list type, which can be an arbitrary value, e.g. <code>OL</code>, <code>UL</code>, ... when thinking the HTML way. This must have been set before by either specifying <b>-type</b> in the <b>new()</b> method or by calling the <b>type()</b> method with a scalar argument.</p> </dd> <dt id="$list->rx()"><a class="permalink" href="#$list-%3Erx()">#</a><a id="rx"></a><a id="list-rx"></a>$list->rx()</dt> <dd> <p>Without argument, retrieves a regular expression for simplifying the individual item strings once the list type has been determined. Usage: E.g. when converting to HTML, one might strip the leading number in an ordered list as <code><OL></code> already prints numbers itself. This must have been set before by either specifying <b>-rx</b> in the <b>new()</b> method or by calling the <b>rx()</b> method with a scalar argument.</p> </dd> <dt id="$list->item()"><a class="permalink" href="#$list-%3Eitem()">#</a><a id="item"></a><a id="list-item"></a>$list->item()</dt> <dd> <p>Without argument, retrieves the array of the items in this list. The items may be represented by any scalar. If an argument has been given, it is pushed on the list of items.</p> </dd> <dt id="$list->parent()"><a class="permalink" href="#$list-%3Eparent()">#</a><a id="parent"></a><a id="list-parent"></a>$list->parent()</dt> <dd> <p>Without argument, retrieves information about the parent holding this list, which is represented as an arbitrary scalar. This must have been set before by either specifying <b>-parent</b> in the <b>new()</b> method or by calling the <b>parent()</b> method with a scalar argument.</p> </dd> <dt id="$list->tag()"><a class="permalink" href="#$list-%3Etag()">#</a><a id="tag"></a><a id="list-tag"></a>$list->tag()</dt> <dd> <p>Without argument, retrieves information about the list tag, which can be any scalar. This must have been set before by either specifying <b>-tag</b> in the <b>new()</b> method or by calling the <b>tag()</b> method with a scalar argument.</p> </dd> </dl> <h2 id="Pod::Hyperlink"><a class="permalink" href="#Pod::Hyperlink">#</a><a id="Pod2"></a>Pod::Hyperlink</h2> <p><b>Pod::Hyperlink</b> is a class for manipulation of POD hyperlinks. Usage:</p> <pre><code>my $link = Pod::Hyperlink->new('alternative text|page/"section in page"');</code></pre> <p>The <b>Pod::Hyperlink</b> class is mainly designed to parse the contents of the <code>L<...></code> sequence, providing a simple interface for accessing the different parts of a POD hyperlink for further processing. It can also be used to construct hyperlinks.</p> <dl> <dt id="Pod::Hyperlink->new()"><a class="permalink" href="#Pod::Hyperlink-%3Enew()">#</a><a id="Pod3"></a><a id="Pod::Hyperlink-new"></a>Pod::Hyperlink->new()</dt> <dd> <p>The <b>new()</b> method can either be passed a set of key/value pairs or a single scalar value, namely the contents of a <code>L<...></code> sequence. An object of the class <code>Pod::Hyperlink</code> is returned. The value <code>undef</code> indicates a failure, the error message is stored in <code>$@</code>.</p> </dd> <dt id="$link->parse($string)"><a class="permalink" href="#$link-%3Eparse($string)">#</a><a id="parse"></a><a id="link-parse-string"></a>$link->parse($string)</dt> <dd> <p>This method can be used to (re)parse a (new) hyperlink, i.e. the contents of a <code>L<...></code> sequence. The result is stored in the current object. Warnings are stored in the <b>warnings</b> property. E.g. sections like <code>L<open(2)></code> are deprecated, as they do not point to Perl documents. <code>L<DBI::foo(3p)></code> is wrong as well, the manpage section can simply be dropped.</p> </dd> <dt id="$link->markup($string)"><a class="permalink" href="#$link-%3Emarkup($string)">#</a><a id="markup"></a><a id="link-markup-string"></a>$link->markup($string)</dt> <dd> <p>Set/retrieve the textual value of the link. This string contains special markers <code>P<></code> and <code>Q<></code> that should be expanded by the translator's interior sequence expansion engine to the formatter-specific code to highlight/activate the hyperlink. The details have to be implemented in the translator.</p> </dd> <dt id="$link->text()"><a class="permalink" href="#$link-%3Etext()">#</a><a id="text"></a><a id="link-text"></a>$link->text()</dt> <dd> <p>This method returns the textual representation of the hyperlink as above, but without markers (read only). Depending on the link type this is one of the following alternatives (the + and * denote the portions of the text that are marked up):</p> <pre><code class="plaintext">+perl+ L<perl> *$|* in +perlvar+ L<perlvar/$|> *OPTIONS* in +perldoc+ L<perldoc/"OPTIONS"> *DESCRIPTION* L<"DESCRIPTION"></code></pre> </dd> <dt id="$link->warning()"><a class="permalink" href="#$link-%3Ewarning()">#</a><a id="warning"></a><a id="link-warning"></a>$link->warning()</dt> <dd> <p>After parsing, this method returns any warnings encountered during the parsing process.</p> </dd> <dt id="$link->file()"><a class="permalink" href="#$link-%3Efile()">#</a><a id="file1"></a><a id="link-file"></a>$link->file()</dt> <dd> </dd> <dt id="$link->line()"><a class="permalink" href="#$link-%3Eline()">#</a><a id="line"></a><a id="link-line"></a>$link->line()</dt> <dd> <p>Just simple slots for storing information about the line and the file the link was encountered in. Has to be filled in manually.</p> </dd> <dt id="$link->page()"><a class="permalink" href="#$link-%3Epage()">#</a><a id="page"></a><a id="link-page"></a>$link->page()</dt> <dd> <p>This method sets or returns the POD page this link points to.</p> </dd> <dt id="$link->node()"><a class="permalink" href="#$link-%3Enode()">#</a><a id="node"></a><a id="link-node"></a>$link->node()</dt> <dd> <p>As above, but the destination node text of the link.</p> </dd> <dt id="$link->alttext()"><a class="permalink" href="#$link-%3Ealttext()">#</a><a id="alttext"></a><a id="link-alttext"></a>$link->alttext()</dt> <dd> <p>Sets or returns an alternative text specified in the link.</p> </dd> <dt id="$link->type()"><a class="permalink" href="#$link-%3Etype()">#</a><a id="type1"></a><a id="link-type"></a>$link->type()</dt> <dd> <p>The node type, either <code>section</code> or <code>item</code>. As an unofficial type, there is also <code>hyperlink</code>, derived from e.g. <code>L<http://perl.com></code></p> </dd> <dt id="$link->link()"><a class="permalink" href="#$link-%3Elink()">#</a><a id="link"></a><a id="link-link"></a>$link->link()</dt> <dd> <p>Returns the link as contents of <code>L<></code>. Reciprocal to <b>parse()</b>.</p> </dd> </dl> <h2 id="Pod::Cache"><a class="permalink" href="#Pod::Cache">#</a><a id="Pod4"></a>Pod::Cache</h2> <p><b>Pod::Cache</b> holds information about a set of POD documents, especially the nodes for hyperlinks. The following methods are available:</p> <dl> <dt id="Pod::Cache->new()"><a class="permalink" href="#Pod::Cache-%3Enew()">#</a><a id="Pod5"></a><a id="Pod::Cache-new"></a>Pod::Cache->new()</dt> <dd> <p>Create a new cache object. This object can hold an arbitrary number of POD documents of class Pod::Cache::Item.</p> </dd> <dt id="$cache->item()"><a class="permalink" href="#$cache-%3Eitem()">#</a><a id="item1"></a><a id="cache-item"></a>$cache->item()</dt> <dd> <p>Add a new item to the cache. Without arguments, this method returns a list of all cache elements.</p> </dd> <dt id="$cache->find_page($name)"><a class="permalink" href="#$cache-%3Efind_page($name)">#</a><a id="find_page"></a><a id="cache-find_page-name"></a>$cache->find_page($name)</dt> <dd> <p>Look for a POD document named <code>$name</code> in the cache. Returns the reference to the corresponding Pod::Cache::Item object or undef if not found.</p> </dd> </dl> <h2 id="Pod::Cache::Item"><a class="permalink" href="#Pod::Cache::Item">#</a><a id="Pod6"></a>Pod::Cache::Item</h2> <p><b>Pod::Cache::Item</b> holds information about individual POD documents, that can be grouped in a Pod::Cache object. It is intended to hold information about the hyperlink nodes of POD documents. The following methods are available:</p> <dl> <dt id="Pod::Cache::Item->new()"><a class="permalink" href="#Pod::Cache::Item-%3Enew()">#</a><a id="Pod7"></a><a id="Pod::Cache::Item-new"></a>Pod::Cache::Item->new()</dt> <dd> <p>Create a new object.</p> </dd> <dt id="$cacheitem->page()"><a class="permalink" href="#$cacheitem-%3Epage()">#</a><a id="page1"></a><a id="cacheitem-page"></a>$cacheitem->page()</dt> <dd> <p>Set/retrieve the POD document name (e.g. "Pod::Parser").</p> </dd> <dt id="$cacheitem->description()"><a class="permalink" href="#$cacheitem-%3Edescription()">#</a><a id="description"></a><a id="cacheitem-description"></a>$cacheitem->description()</dt> <dd> <p>Set/retrieve the POD short description as found in the <code>=head1 NAME</code> section.</p> </dd> <dt id="$cacheitem->path()"><a class="permalink" href="#$cacheitem-%3Epath()">#</a><a id="path"></a><a id="cacheitem-path"></a>$cacheitem->path()</dt> <dd> <p>Set/retrieve the POD file storage path.</p> </dd> <dt id="$cacheitem->file()"><a class="permalink" href="#$cacheitem-%3Efile()">#</a><a id="file2"></a><a id="cacheitem-file"></a>$cacheitem->file()</dt> <dd> <p>Set/retrieve the POD file name.</p> </dd> <dt id="$cacheitem->nodes()"><a class="permalink" href="#$cacheitem-%3Enodes()">#</a><a id="nodes"></a><a id="cacheitem-nodes"></a>$cacheitem->nodes()</dt> <dd> <p>Add a node (or a list of nodes) to the document's node list. Note that the order is kept, i.e. start with the first node and end with the last. If no argument is given, the current list of nodes is returned in the same order the nodes have been added. A node can be any scalar, but usually is a pair of node string and unique id for the <code>find_node</code> method to work correctly.</p> </dd> <dt id="$cacheitem->find_node($name)"><a class="permalink" href="#$cacheitem-%3Efind_node($name)">#</a><a id="find_node"></a><a id="cacheitem-find_node-name"></a>$cacheitem->find_node($name)</dt> <dd> <p>Look for a node or index entry named <code>$name</code> in the object. Returns the unique id of the node (i.e. the second element of the array stored in the node array) or undef if not found.</p> </dd> <dt id="$cacheitem->idx()"><a class="permalink" href="#$cacheitem-%3Eidx()">#</a><a id="idx"></a><a id="cacheitem-idx"></a>$cacheitem->idx()</dt> <dd> <p>Add an index entry (or a list of them) to the document's index list. Note that the order is kept, i.e. start with the first node and end with the last. If no argument is given, the current list of index entries is returned in the same order the entries have been added. An index entry can be any scalar, but usually is a pair of string and unique id.</p> </dd> </dl> <h1 id="AUTHOR"><a class="permalink" href="#AUTHOR">#</a>AUTHOR</h1> <p>Please report bugs using <a href="http://rt.cpan.org">http://rt.cpan.org</a>.</p> <p>Marek Rouchal <marekr@cpan.org>, borrowing a lot of things from <a href="/5.28.3/pod2man">pod2man</a> and <a href="/5.28.3/pod2roff">pod2roff</a> as well as other POD processing tools by Tom Christiansen, Brad Appleton and Russ Allbery.</p> <p><b>Pod::ParseUtils</b> is part of the <a href="/5.28.3/Pod::Parser">Pod::Parser</a> distribution.</p> <h1 id="SEE-ALSO"><a class="permalink" href="#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1> <p><a href="/5.28.3/pod2man">pod2man</a>, <a href="/5.28.3/pod2roff">pod2roff</a>, <a href="/5.28.3/Pod::Parser">Pod::Parser</a>, <a href="/5.28.3/Pod::Checker">Pod::Checker</a>, <a href="/5.28.3/pod2html">pod2html</a></p> </div> <div id="footer"> <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p> <p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> <script src="/js/highlight.pack.js"></script> <script>hljs.highlightAll();</script> </body> </html>