CINXE.COM
Pod::InputObjects - objects representing POD input paragraphs, commands, etc. - 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::InputObjects - objects representing POD input paragraphs, commands, etc. - 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::InputObjects"> <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.8.2</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/Pod::InputObjects">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1/Pod::InputObjects">5.40.1</a> <a class="dropdown-item" href="/5.40.0/Pod::InputObjects">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3/Pod::InputObjects">5.38.3</a> <a class="dropdown-item" href="/5.38.2/Pod::InputObjects">5.38.2</a> <a class="dropdown-item" href="/5.38.1/Pod::InputObjects">5.38.1</a> <a class="dropdown-item" href="/5.38.0/Pod::InputObjects">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/Pod::InputObjects">5.36.3</a> <a class="dropdown-item" href="/5.36.2/Pod::InputObjects">5.36.2</a> <a class="dropdown-item" href="/5.36.1/Pod::InputObjects">5.36.1</a> <a class="dropdown-item" href="/5.36.0/Pod::InputObjects">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/Pod::InputObjects">5.34.3</a> <a class="dropdown-item" href="/5.34.2/Pod::InputObjects">5.34.2</a> <a class="dropdown-item" href="/5.34.1/Pod::InputObjects">5.34.1</a> <a class="dropdown-item" href="/5.34.0/Pod::InputObjects">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/Pod::InputObjects">5.32.1</a> <a class="dropdown-item" href="/5.32.0/Pod::InputObjects">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/Pod::InputObjects">5.30.3</a> <a class="dropdown-item" href="/5.30.2/Pod::InputObjects">5.30.2</a> <a class="dropdown-item" href="/5.30.1/Pod::InputObjects">5.30.1</a> <a class="dropdown-item" href="/5.30.0/Pod::InputObjects">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/Pod::InputObjects">5.28.3</a> <a class="dropdown-item" href="/5.28.2/Pod::InputObjects">5.28.2</a> <a class="dropdown-item" href="/5.28.1/Pod::InputObjects">5.28.1</a> <a class="dropdown-item" href="/5.28.0/Pod::InputObjects">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/Pod::InputObjects">5.26.3</a> <a class="dropdown-item" href="/5.26.2/Pod::InputObjects">5.26.2</a> <a class="dropdown-item" href="/5.26.1/Pod::InputObjects">5.26.1</a> <a class="dropdown-item" href="/5.26.0/Pod::InputObjects">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/Pod::InputObjects">5.24.4</a> <a class="dropdown-item" href="/5.24.3/Pod::InputObjects">5.24.3</a> <a class="dropdown-item" href="/5.24.2/Pod::InputObjects">5.24.2</a> <a class="dropdown-item" href="/5.24.1/Pod::InputObjects">5.24.1</a> <a class="dropdown-item" href="/5.24.0/Pod::InputObjects">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/Pod::InputObjects">5.22.4</a> <a class="dropdown-item" href="/5.22.3/Pod::InputObjects">5.22.3</a> <a class="dropdown-item" href="/5.22.2/Pod::InputObjects">5.22.2</a> <a class="dropdown-item" href="/5.22.1/Pod::InputObjects">5.22.1</a> <a class="dropdown-item" href="/5.22.0/Pod::InputObjects">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/Pod::InputObjects">5.20.3</a> <a class="dropdown-item" href="/5.20.2/Pod::InputObjects">5.20.2</a> <a class="dropdown-item" href="/5.20.1/Pod::InputObjects">5.20.1</a> <a class="dropdown-item" href="/5.20.0/Pod::InputObjects">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/Pod::InputObjects">5.18.4</a> <a class="dropdown-item" href="/5.18.3/Pod::InputObjects">5.18.3</a> <a class="dropdown-item" href="/5.18.2/Pod::InputObjects">5.18.2</a> <a class="dropdown-item" href="/5.18.1/Pod::InputObjects">5.18.1</a> <a class="dropdown-item" href="/5.18.0/Pod::InputObjects">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/Pod::InputObjects">5.16.3</a> <a class="dropdown-item" href="/5.16.2/Pod::InputObjects">5.16.2</a> <a class="dropdown-item" href="/5.16.1/Pod::InputObjects">5.16.1</a> <a class="dropdown-item" href="/5.16.0/Pod::InputObjects">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/Pod::InputObjects">5.14.4</a> <a class="dropdown-item" href="/5.14.3/Pod::InputObjects">5.14.3</a> <a class="dropdown-item" href="/5.14.2/Pod::InputObjects">5.14.2</a> <a class="dropdown-item" href="/5.14.1/Pod::InputObjects">5.14.1</a> <a class="dropdown-item" href="/5.14.0/Pod::InputObjects">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/Pod::InputObjects">5.12.5</a> <a class="dropdown-item" href="/5.12.4/Pod::InputObjects">5.12.4</a> <a class="dropdown-item" href="/5.12.3/Pod::InputObjects">5.12.3</a> <a class="dropdown-item" href="/5.12.2/Pod::InputObjects">5.12.2</a> <a class="dropdown-item" href="/5.12.1/Pod::InputObjects">5.12.1</a> <a class="dropdown-item" href="/5.12.0/Pod::InputObjects">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/Pod::InputObjects">5.10.1</a> <a class="dropdown-item" href="/5.10.0/Pod::InputObjects">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/Pod::InputObjects">5.8.9</a> <a class="dropdown-item" href="/5.8.8/Pod::InputObjects">5.8.8</a> <a class="dropdown-item" href="/5.8.7/Pod::InputObjects">5.8.7</a> <a class="dropdown-item" href="/5.8.6/Pod::InputObjects">5.8.6</a> <a class="dropdown-item" href="/5.8.5/Pod::InputObjects">5.8.5</a> <a class="dropdown-item" href="/5.8.4/Pod::InputObjects">5.8.4</a> <a class="dropdown-item" href="/5.8.3/Pod::InputObjects">5.8.3</a> <a class="dropdown-item active" href="/5.8.2/Pod::InputObjects">5.8.2</a> <a class="dropdown-item" href="/5.8.1/Pod::InputObjects">5.8.1</a> <a class="dropdown-item" href="/5.8.0/Pod::InputObjects">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/Pod::InputObjects">5.6.2</a> <a class="dropdown-item" href="/5.6.1/Pod::InputObjects">5.6.1</a> <a class="dropdown-item" href="/5.6.0/Pod::InputObjects">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/Pod::InputObjects">5.005_04</a> <a class="dropdown-item" href="/5.005_03/Pod::InputObjects">5.005_03</a> <a class="dropdown-item" href="/5.005_02/Pod::InputObjects">5.005_02</a> <a class="dropdown-item" href="/5.005_01/Pod::InputObjects">5.005_01</a> <a class="dropdown-item" href="/5.005/Pod::InputObjects">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::InputObjects">blead</a> <a class="dropdown-item" href="/5.41.10/Pod::InputObjects">5.41.10</a> <a class="dropdown-item" href="/5.41.9/Pod::InputObjects">5.41.9</a> <a class="dropdown-item" href="/5.41.8/Pod::InputObjects">5.41.8</a> <a class="dropdown-item" href="/5.41.7/Pod::InputObjects">5.41.7</a> <a class="dropdown-item" href="/5.41.6/Pod::InputObjects">5.41.6</a> <a class="dropdown-item" href="/5.41.5/Pod::InputObjects">5.41.5</a> <a class="dropdown-item" href="/5.41.4/Pod::InputObjects">5.41.4</a> <a class="dropdown-item" href="/5.41.3/Pod::InputObjects">5.41.3</a> <a class="dropdown-item" href="/5.41.2/Pod::InputObjects">5.41.2</a> <a class="dropdown-item" href="/5.41.1/Pod::InputObjects">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1-RC1/Pod::InputObjects">5.40.1-RC1</a> <a class="dropdown-item" href="/5.40.0-RC2/Pod::InputObjects">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/Pod::InputObjects">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/Pod::InputObjects">5.39.10</a> <a class="dropdown-item" href="/5.39.9/Pod::InputObjects">5.39.9</a> <a class="dropdown-item" href="/5.39.8/Pod::InputObjects">5.39.8</a> <a class="dropdown-item" href="/5.39.7/Pod::InputObjects">5.39.7</a> <a class="dropdown-item" href="/5.39.6/Pod::InputObjects">5.39.6</a> <a class="dropdown-item" href="/5.39.5/Pod::InputObjects">5.39.5</a> <a class="dropdown-item" href="/5.39.4/Pod::InputObjects">5.39.4</a> <a class="dropdown-item" href="/5.39.3/Pod::InputObjects">5.39.3</a> <a class="dropdown-item" href="/5.39.2/Pod::InputObjects">5.39.2</a> <a class="dropdown-item" href="/5.39.1/Pod::InputObjects">5.39.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3-RC1/Pod::InputObjects">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.8.2/perl">Perl</a> <a class="dropdown-item" href="/5.8.2/perlintro">Intro</a> <a class="dropdown-item" href="/5.8.2/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.8.2/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.8.2/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.2/perlop">Operators</a> <a class="dropdown-item" href="/5.8.2/functions">Functions</a> <a class="dropdown-item" href="/5.8.2/variables">Variables</a> <a class="dropdown-item" href="/5.8.2/modules">Modules</a> <a class="dropdown-item" href="/5.8.2/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.2/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.8.2/perlcommunity">Community</a> <a class="dropdown-item" href="/5.8.2/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.8.2/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.8.2/Pod::InputObjects">Pod::InputObjects</a> <div id="more"> (<a href="/5.8.2/Pod::InputObjects.txt">source</a>, <a href="https://metacpan.org/pod/Pod::InputObjects">CPAN</a>) </div> <div id="moduleversion">version 1.14</div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.8.2. <a href="/Pod::InputObjects">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="#REQUIRES">REQUIRES</a> </li> <li> <a class="text-decoration-none" href="#EXPORTS">EXPORTS</a> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> </li> <li> <a class="text-decoration-none" href="#Pod::Paragraph">Pod::Paragraph</a> <ul> <li> <a class="text-decoration-none" href="#Pod::Paragraph-%3Enew()">Pod::Paragraph->new()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Ecmd_name()">$pod_para->cmd_name()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Etext()">$pod_para->text()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Eraw_text()">$pod_para->raw_text()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Ecmd_prefix()">$pod_para->cmd_prefix()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Ecmd_separator()">$pod_para->cmd_separator()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Eparse_tree()">$pod_para->parse_tree()</a> </li> <li> <a class="text-decoration-none" href="#$pod_para-%3Efile_line()">$pod_para->file_line()</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#Pod::InteriorSequence">Pod::InteriorSequence</a> <ul> <li> <a class="text-decoration-none" href="#Pod::InteriorSequence-%3Enew()">Pod::InteriorSequence->new()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Ecmd_name()">$pod_seq->cmd_name()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Eprepend()">$pod_seq->prepend()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Eappend()">$pod_seq->append()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Enested()">$pod_seq->nested()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Eraw_text()">$pod_seq->raw_text()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Eleft_delimiter()">$pod_seq->left_delimiter()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Eright_delimiter()">$pod_seq->right_delimiter()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Eparse_tree()">$pod_seq->parse_tree()</a> </li> <li> <a class="text-decoration-none" href="#$pod_seq-%3Efile_line()">$pod_seq->file_line()</a> </li> <li> <a class="text-decoration-none" href="#Pod::InteriorSequence::DESTROY()">Pod::InteriorSequence::DESTROY()</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#Pod::ParseTree">Pod::ParseTree</a> <ul> <li> <a class="text-decoration-none" href="#Pod::ParseTree-%3Enew()">Pod::ParseTree->new()</a> </li> <li> <a class="text-decoration-none" href="#$ptree-%3Etop()">$ptree->top()</a> </li> <li> <a class="text-decoration-none" href="#$ptree-%3Echildren()">$ptree->children()</a> </li> <li> <a class="text-decoration-none" href="#$ptree-%3Eprepend()">$ptree->prepend()</a> </li> <li> <a class="text-decoration-none" href="#$ptree-%3Eappend()">$ptree->append()</a> </li> <li> <a class="text-decoration-none" href="#$ptree-%3Eraw_text()">$ptree->raw_text()</a> </li> <li> <a class="text-decoration-none" href="#Pod::ParseTree::DESTROY()">Pod::ParseTree::DESTROY()</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#SEE-ALSO">SEE ALSO</a> </li> <li> <a class="text-decoration-none" href="#AUTHOR">AUTHOR</a> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>Pod::InputObjects - objects representing POD input paragraphs, commands, etc.</p> <h1 id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">#</a>SYNOPSIS</h1> <pre><code>use Pod::InputObjects;</code></pre> <h1 id="REQUIRES"><a class="permalink" href="#REQUIRES">#</a>REQUIRES</h1> <p>perl5.004, Carp</p> <h1 id="EXPORTS"><a class="permalink" href="#EXPORTS">#</a>EXPORTS</h1> <p>Nothing.</p> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <p>This module defines some basic input objects used by <b>Pod::Parser</b> when reading and parsing POD text from an input source. The following objects are defined:</p> <ul> <p>package <b>Pod::Paragraph</b></p> <p>An object corresponding to a paragraph of POD input text. It may be a plain paragraph, a verbatim paragraph, or a command paragraph (see <a href="/5.8.2/perlpod">perlpod</a>).</p> <p>package <b>Pod::InteriorSequence</b></p> <p>An object corresponding to an interior sequence command from the POD input text (see <a href="/5.8.2/perlpod">perlpod</a>).</p> <p>package <b>Pod::ParseTree</b></p> <p>An object corresponding to a tree of parsed POD text. Each "node" in a parse-tree (or <i>ptree</i>) is either a text-string or a reference to a <b>Pod::InteriorSequence</b> object. The nodes appear in the parse-tree in the order in which they were parsed from left-to-right.</p> </ul> <p>Each of these input objects are described in further detail in the sections which follow.</p> <h1 id="Pod::Paragraph"><a class="permalink" href="#Pod::Paragraph">#</a><a id="Pod"></a><b>Pod::Paragraph</b></h1> <p>An object representing a paragraph of POD input text. It has the following methods/attributes:</p> <h2 id="Pod::Paragraph->new()"><a class="permalink" href="#Pod::Paragraph-%3Enew()">#</a><a id="Pod1"></a><a id="Pod::Paragraph-new"></a>Pod::Paragraph-><b>new()</b></h2> <pre><code>my $pod_para1 = Pod::Paragraph->new(-text => $text); my $pod_para2 = Pod::Paragraph->new(-name => $cmd, -text => $text); my $pod_para3 = new Pod::Paragraph(-text => $text); my $pod_para4 = new Pod::Paragraph(-name => $cmd, -text => $text); my $pod_para5 = Pod::Paragraph->new(-name => $cmd, -text => $text, -file => $filename, -line => $line_number);</code></pre> <p>This is a class method that constructs a <code>Pod::Paragraph</code> object and returns a reference to the new paragraph object. It may be given one or two keyword arguments. The <code>-text</code> keyword indicates the corresponding text of the POD paragraph. The <code>-name</code> keyword indicates the name of the corresponding POD command, such as <code>head1</code> or <code>item</code> (it should <i>not</i> contain the <code>=</code> prefix); this is needed only if the POD paragraph corresponds to a command paragraph. The <code>-file</code> and <code>-line</code> keywords indicate the filename and line number corresponding to the beginning of the paragraph</p> <h2 id="$pod_para->cmd_name()"><a class="permalink" href="#$pod_para-%3Ecmd_name()">#</a><a id="cmd_name"></a><a id="pod_para-cmd_name"></a>$pod_para-><b>cmd_name()</b></h2> <pre><code>my $para_cmd = $pod_para->cmd_name();</code></pre> <p>If this paragraph is a command paragraph, then this method will return the name of the command (<i>without</i> any leading <code>=</code> prefix).</p> <h2 id="$pod_para->text()"><a class="permalink" href="#$pod_para-%3Etext()">#</a><a id="text"></a><a id="pod_para-text"></a>$pod_para-><b>text()</b></h2> <pre><code>my $para_text = $pod_para->text();</code></pre> <p>This method will return the corresponding text of the paragraph.</p> <h2 id="$pod_para->raw_text()"><a class="permalink" href="#$pod_para-%3Eraw_text()">#</a><a id="raw_text"></a><a id="pod_para-raw_text"></a>$pod_para-><b>raw_text()</b></h2> <pre><code>my $raw_pod_para = $pod_para->raw_text();</code></pre> <p>This method will return the <i>raw</i> text of the POD paragraph, exactly as it appeared in the input.</p> <h2 id="$pod_para->cmd_prefix()"><a class="permalink" href="#$pod_para-%3Ecmd_prefix()">#</a><a id="cmd_prefix"></a><a id="pod_para-cmd_prefix"></a>$pod_para-><b>cmd_prefix()</b></h2> <pre><code>my $prefix = $pod_para->cmd_prefix();</code></pre> <p>If this paragraph is a command paragraph, then this method will return the prefix used to denote the command (which should be the string "=" or "==").</p> <h2 id="$pod_para->cmd_separator()"><a class="permalink" href="#$pod_para-%3Ecmd_separator()">#</a><a id="cmd_separator"></a><a id="pod_para-cmd_separator"></a>$pod_para-><b>cmd_separator()</b></h2> <pre><code>my $separator = $pod_para->cmd_separator();</code></pre> <p>If this paragraph is a command paragraph, then this method will return the text used to separate the command name from the rest of the paragraph (if any).</p> <h2 id="$pod_para->parse_tree()"><a class="permalink" href="#$pod_para-%3Eparse_tree()">#</a><a id="parse_tree"></a><a id="pod_para-parse_tree"></a>$pod_para-><b>parse_tree()</b></h2> <pre><code>my $ptree = $pod_parser->parse_text( $pod_para->text() ); $pod_para->parse_tree( $ptree ); $ptree = $pod_para->parse_tree();</code></pre> <p>This method will get/set the corresponding parse-tree of the paragraph's text.</p> <h2 id="$pod_para->file_line()"><a class="permalink" href="#$pod_para-%3Efile_line()">#</a><a id="file_line"></a><a id="pod_para-file_line"></a>$pod_para-><b>file_line()</b></h2> <pre><code>my ($filename, $line_number) = $pod_para->file_line(); my $position = $pod_para->file_line();</code></pre> <p>Returns the current filename and line number for the paragraph object. If called in a list context, it returns a list of two elements: first the filename, then the line number. If called in a scalar context, it returns a string containing the filename, followed by a colon (':'), followed by the line number.</p> <h1 id="Pod::InteriorSequence"><a class="permalink" href="#Pod::InteriorSequence">#</a><a id="Pod2"></a><b>Pod::InteriorSequence</b></h1> <p>An object representing a POD interior sequence command. It has the following methods/attributes:</p> <h2 id="Pod::InteriorSequence->new()"><a class="permalink" href="#Pod::InteriorSequence-%3Enew()">#</a><a id="Pod3"></a><a id="Pod::InteriorSequence-new"></a>Pod::InteriorSequence-><b>new()</b></h2> <pre><code>my $pod_seq1 = Pod::InteriorSequence->new(-name => $cmd -ldelim => $delimiter); my $pod_seq2 = new Pod::InteriorSequence(-name => $cmd, -ldelim => $delimiter); my $pod_seq3 = new Pod::InteriorSequence(-name => $cmd, -ldelim => $delimiter, -file => $filename, -line => $line_number); my $pod_seq4 = new Pod::InteriorSequence(-name => $cmd, $ptree); my $pod_seq5 = new Pod::InteriorSequence($cmd, $ptree);</code></pre> <p>This is a class method that constructs a <code>Pod::InteriorSequence</code> object and returns a reference to the new interior sequence object. It should be given two keyword arguments. The <code>-ldelim</code> keyword indicates the corresponding left-delimiter of the interior sequence (e.g. '<'). The <code>-name</code> keyword indicates the name of the corresponding interior sequence command, such as <code>I</code> or <code>B</code> or <code>C</code>. The <code>-file</code> and <code>-line</code> keywords indicate the filename and line number corresponding to the beginning of the interior sequence. If the <code>$ptree</code> argument is given, it must be the last argument, and it must be either string, or else an array-ref suitable for passing to <b>Pod::ParseTree::new</b> (or it may be a reference to a Pod::ParseTree object).</p> <h2 id="$pod_seq->cmd_name()"><a class="permalink" href="#$pod_seq-%3Ecmd_name()">#</a><a id="cmd_name1"></a><a id="pod_seq-cmd_name"></a>$pod_seq-><b>cmd_name()</b></h2> <pre><code>my $seq_cmd = $pod_seq->cmd_name();</code></pre> <p>The name of the interior sequence command.</p> <h2 id="$pod_seq->prepend()"><a class="permalink" href="#$pod_seq-%3Eprepend()">#</a><a id="prepend"></a><a id="pod_seq-prepend"></a>$pod_seq-><b>prepend()</b></h2> <pre><code>$pod_seq->prepend($text); $pod_seq1->prepend($pod_seq2);</code></pre> <p>Prepends the given string or parse-tree or sequence object to the parse-tree of this interior sequence.</p> <h2 id="$pod_seq->append()"><a class="permalink" href="#$pod_seq-%3Eappend()">#</a><a id="append"></a><a id="pod_seq-append"></a>$pod_seq-><b>append()</b></h2> <pre><code>$pod_seq->append($text); $pod_seq1->append($pod_seq2);</code></pre> <p>Appends the given string or parse-tree or sequence object to the parse-tree of this interior sequence.</p> <h2 id="$pod_seq->nested()"><a class="permalink" href="#$pod_seq-%3Enested()">#</a><a id="nested"></a><a id="pod_seq-nested"></a>$pod_seq-><b>nested()</b></h2> <pre><code>$outer_seq = $pod_seq->nested || print "not nested";</code></pre> <p>If this interior sequence is nested inside of another interior sequence, then the outer/parent sequence that contains it is returned. Otherwise <code>undef</code> is returned.</p> <h2 id="$pod_seq->raw_text()"><a class="permalink" href="#$pod_seq-%3Eraw_text()">#</a><a id="raw_text1"></a><a id="pod_seq-raw_text"></a>$pod_seq-><b>raw_text()</b></h2> <pre><code>my $seq_raw_text = $pod_seq->raw_text();</code></pre> <p>This method will return the <i>raw</i> text of the POD interior sequence, exactly as it appeared in the input.</p> <h2 id="$pod_seq->left_delimiter()"><a class="permalink" href="#$pod_seq-%3Eleft_delimiter()">#</a><a id="left_delimiter"></a><a id="pod_seq-left_delimiter"></a>$pod_seq-><b>left_delimiter()</b></h2> <pre><code>my $ldelim = $pod_seq->left_delimiter();</code></pre> <p>The leftmost delimiter beginning the argument text to the interior sequence (should be "<").</p> <h2 id="$pod_seq->right_delimiter()"><a class="permalink" href="#$pod_seq-%3Eright_delimiter()">#</a><a id="right_delimiter"></a><a id="pod_seq-right_delimiter"></a>$pod_seq-><b>right_delimiter()</b></h2> <p>The rightmost delimiter beginning the argument text to the interior sequence (should be ">").</p> <h2 id="$pod_seq->parse_tree()"><a class="permalink" href="#$pod_seq-%3Eparse_tree()">#</a><a id="parse_tree1"></a><a id="pod_seq-parse_tree"></a>$pod_seq-><b>parse_tree()</b></h2> <pre><code>my $ptree = $pod_parser->parse_text($paragraph_text); $pod_seq->parse_tree( $ptree ); $ptree = $pod_seq->parse_tree();</code></pre> <p>This method will get/set the corresponding parse-tree of the interior sequence's text.</p> <h2 id="$pod_seq->file_line()"><a class="permalink" href="#$pod_seq-%3Efile_line()">#</a><a id="file_line1"></a><a id="pod_seq-file_line"></a>$pod_seq-><b>file_line()</b></h2> <pre><code>my ($filename, $line_number) = $pod_seq->file_line(); my $position = $pod_seq->file_line();</code></pre> <p>Returns the current filename and line number for the interior sequence object. If called in a list context, it returns a list of two elements: first the filename, then the line number. If called in a scalar context, it returns a string containing the filename, followed by a colon (':'), followed by the line number.</p> <h2 id="Pod::InteriorSequence::DESTROY()"><a class="permalink" href="#Pod::InteriorSequence::DESTROY()">#</a><a id="Pod4"></a><a id="Pod::InteriorSequence::DESTROY"></a>Pod::InteriorSequence::<b>DESTROY()</b></h2> <p>This method performs any necessary cleanup for the interior-sequence. If you override this method then it is <b>imperative</b> that you invoke the parent method from within your own method, otherwise <i>interior-sequence storage will not be reclaimed upon destruction!</i></p> <h1 id="Pod::ParseTree"><a class="permalink" href="#Pod::ParseTree">#</a><a id="Pod5"></a><b>Pod::ParseTree</b></h1> <p>This object corresponds to a tree of parsed POD text. As POD text is scanned from left to right, it is parsed into an ordered list of text-strings and <b>Pod::InteriorSequence</b> objects (in order of appearance). A <b>Pod::ParseTree</b> object corresponds to this list of strings and sequences. Each interior sequence in the parse-tree may itself contain a parse-tree (since interior sequences may be nested).</p> <h2 id="Pod::ParseTree->new()"><a class="permalink" href="#Pod::ParseTree-%3Enew()">#</a><a id="Pod6"></a><a id="Pod::ParseTree-new"></a>Pod::ParseTree-><b>new()</b></h2> <pre><code>my $ptree1 = Pod::ParseTree->new; my $ptree2 = new Pod::ParseTree; my $ptree4 = Pod::ParseTree->new($array_ref); my $ptree3 = new Pod::ParseTree($array_ref);</code></pre> <p>This is a class method that constructs a <code>Pod::Parse_tree</code> object and returns a reference to the new parse-tree. If a single-argument is given, it must be a reference to an array, and is used to initialize the root (top) of the parse tree.</p> <h2 id="$ptree->top()"><a class="permalink" href="#$ptree-%3Etop()">#</a><a id="top"></a><a id="ptree-top"></a>$ptree-><b>top()</b></h2> <pre><code>my $top_node = $ptree->top(); $ptree->top( $top_node ); $ptree->top( @children );</code></pre> <p>This method gets/sets the top node of the parse-tree. If no arguments are given, it returns the topmost node in the tree (the root), which is also a <b>Pod::ParseTree</b>. If it is given a single argument that is a reference, then the reference is assumed to a parse-tree and becomes the new top node. Otherwise, if arguments are given, they are treated as the new list of children for the top node.</p> <h2 id="$ptree->children()"><a class="permalink" href="#$ptree-%3Echildren()">#</a><a id="children"></a><a id="ptree-children"></a>$ptree-><b>children()</b></h2> <p>This method gets/sets the children of the top node in the parse-tree. If no arguments are given, it returns the list (array) of children (each of which should be either a string or a <b>Pod::InteriorSequence</b>. Otherwise, if arguments are given, they are treated as the new list of children for the top node.</p> <h2 id="$ptree->prepend()"><a class="permalink" href="#$ptree-%3Eprepend()">#</a><a id="prepend1"></a><a id="ptree-prepend"></a>$ptree-><b>prepend()</b></h2> <p>This method prepends the given text or parse-tree to the current parse-tree. If the first item on the parse-tree is text and the argument is also text, then the text is prepended to the first item (not added as a separate string). Otherwise the argument is added as a new string or parse-tree <i>before</i> the current one.</p> <h2 id="$ptree->append()"><a class="permalink" href="#$ptree-%3Eappend()">#</a><a id="append1"></a><a id="ptree-append"></a>$ptree-><b>append()</b></h2> <p>This method appends the given text or parse-tree to the current parse-tree. If the last item on the parse-tree is text and the argument is also text, then the text is appended to the last item (not added as a separate string). Otherwise the argument is added as a new string or parse-tree <i>after</i> the current one.</p> <h2 id="$ptree->raw_text()"><a class="permalink" href="#$ptree-%3Eraw_text()">#</a><a id="raw_text2"></a><a id="ptree-raw_text"></a>$ptree-><b>raw_text()</b></h2> <pre><code>my $ptree_raw_text = $ptree->raw_text();</code></pre> <p>This method will return the <i>raw</i> text of the POD parse-tree exactly as it appeared in the input.</p> <h2 id="Pod::ParseTree::DESTROY()"><a class="permalink" href="#Pod::ParseTree::DESTROY()">#</a><a id="Pod7"></a><a id="Pod::ParseTree::DESTROY"></a>Pod::ParseTree::<b>DESTROY()</b></h2> <p>This method performs any necessary cleanup for the parse-tree. If you override this method then it is <b>imperative</b> that you invoke the parent method from within your own method, otherwise <i>parse-tree storage will not be reclaimed upon destruction!</i></p> <h1 id="SEE-ALSO"><a class="permalink" href="#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1> <p>See <a href="/5.8.2/Pod::Parser">Pod::Parser</a>, <a href="/5.8.2/Pod::Select">Pod::Select</a></p> <h1 id="AUTHOR"><a class="permalink" href="#AUTHOR">#</a>AUTHOR</h1> <p>Brad Appleton <bradapp@enteract.com></p> <div class="pod-errors"><p>1 POD Error</p><div class="pod-errors-detail"><p>The following errors were encountered while parsing the POD:</p><dl><dt><a class="permalink" href="">#</a>Around line 41:</dt><dd><p>You can't have =items (as at line 54) unless the first thing after the =over is an =item</p></dd></dl></div></div> </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>