.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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::Tree::Node 3pm" .TH Pod::Tree::Node 3pm "2019-02-25" "perl v5.28.1" "User Contributed Perl Documentation" .\" 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::Tree::Node \- nodes in a Pod::Tree .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 10 \& $node = Pod::Tree::Node\->root ( \e@paragraphs ); \& $node = Pod::Tree::Node\->code ( $paragraph ); \& $node = Pod::Tree::Node\->verbatim ( $paragraph ); \& $node = Pod::Tree::Node\->command ( $paragraph ); \& $node = Pod::Tree::Node\->ordinary ( $paragraph ); \& $node = Pod::Tree::Node\->letter ( $token ); \& $node = Pod::Tree::Node\->sequence ( $letter, \e@children ); \& $node = Pod::Tree::Node\->text ( $text ); \& $node = Pod::Tree::Node\->target ( $target ); \& $node = Pod::Tree::Node\->link ( $node, $page, $section ); \& \& $node\->is_code and ... \& $node\->is_command and ... \& $node\->is_for and ... \& $node\->is_item and ... \& $node\->is_letter and ... \& $node\->is_list and ... \& $node\->is_ordinary and ... \& $node\->is_pod and ... \& $node\->is_root and ... \& $node\->is_sequence and ... \& $node\->is_text and ... \& $node\->is_verbatim and ... \& $node\->is_link and ... \& \& $node\->is_c_head1 and ... \& $node\->is_c_head2 and ... \& $node\->is_c_head3 and ... \& $node\->is_c_head4 and ... \& $node\->is_c_cut and ... \& $node\->is_c_pod and ... \& $node\->is_c_over and ... \& $node\->is_c_back and ... \& $node\->is_c_item and ... \& $node\->is_c_for and ... \& $node\->is_c_begin and ... \& $node\->is_c_end and ... \& \& $arg = $node\->get_arg ; \& $brackets = $node\->get_brackets ; \& $children = $node\->get_children ; \& $command = $node\->get_command ; \& $domain = $node\->get_domain ; \& $item_type = $node\->get_item_type ; \& $letter = $node\->get_letter ; \& $list_type = $node\->get_list_type ; \& $page = $node\->get_page ; \& $raw = $node\->get_raw ; \& $raw_kids = $node\->get_raw_kids ; \& $section = $node\->get_section ; \& $siblings = $node\->get_siblings ; \& $target = $node\->get_target ; \& $text = $node\->get_text ; \& $type = $node\->get_type ; \& $deep_text = $node\->get_deep_text ; \& \& $node\->force_text($text); \& $node\->force_for; \& $node\->parse_begin (\e@nodes); \& $node\->set_children(\e@children); \& $node\->make_sequences; \& $node\->parse_links; \& $node\->unescape; \& $node\->consolidate; \& $node\->make_lists; \& \& $node\->clone; \& $node\->dump; \& \& Pod::Tree::Node\->set_filename($filename); \& $filename = $node\->get_filename; .Ve .SH "REQUIRES" .IX Header "REQUIRES" Pod::Escapes .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Pod::Tree::Node\*(C'\fR objects are nodes in a tree that represents a \s-1POD.\s0 Applications walk the tree to recover the structure and content of the \s-1POD.\s0 .PP Methods are provided for .IP "\(bu" 4 creating nodes in the tree .IP "\(bu" 4 parsing the \s-1POD\s0 into nodes .IP "\(bu" 4 returning information about nodes .IP "\(bu" 4 walking the tree .SH "TREE STRUCTURE" .IX Header "TREE STRUCTURE" .SS "Root node" .IX Subsection "Root node" The tree descends from a single root node; \&\f(CW\*(C`is_root\*(C'\fR returns true on this node and no other. .PP .Vb 1 \& $children = $root\->get_children .Ve .PP returns a reference to an array of nodes. These nodes represent the \s-1POD.\s0 .SS "Node types" .IX Subsection "Node types" For each node, call \f(CW\*(C`get_type\*(C'\fR to discover the type of the node .PP .Vb 4 \& for $child (@$children) \& { \& $type = $child\->get_type; \& } .Ve .PP \&\fI\f(CI$type\fI\fR will be one of these strings: .IP "'root'" 4 .IX Item "'root'" The node is the root of the tree. .IP "'code'" 4 .IX Item "'code'" The node represents a paragraph that is not part of the \s-1POD.\s0 .IP "'verbatim'" 4 .IX Item "'verbatim'" The node represents a verbatim paragraph. .IP "'ordinary'" 4 .IX Item "'ordinary'" The node represents an ordinary paragraph. .IP "'command'" 4 .IX Item "'command'" The node represents an =command paragraph (but not an =over paragraph). .IP "'sequence'" 4 .IX Item "'sequence'" The node represents an interior sequence. .IP "'target'" 4 .IX Item "'target'" The node represents the target of a link (An L<> markup). .IP "'text'" 4 .IX Item "'text'" The node represents text that contains no interior sequences. .IP "'list'" 4 .IX Item "'list'" The node represents an =over list. .IP "'item'" 4 .IX Item "'item'" The node represents an item in an =over list. .IP "'for'" 4 .IX Item "'for'" The node represents a =for paragraph, or it represents the paragraphs between =begin/=end commands. .PP Here are instructions for walking these node types. .SS "root node" .IX Subsection "root node" Call .PP .Vb 1 \& $children = $node\->get_children .Ve .PP to get a list of nodes representing the \s-1POD.\s0 .SS "code nodes" .IX Subsection "code nodes" A code node contains the text of a paragraph that is not part of the \&\s-1POD,\s0 for example, a paragraph that follows an \f(CW\*(C`=cut\*(C'\fR command. Call .PP .Vb 1 \& $text = $node\->get_text .Ve .PP to recover the text of the paragraph. .SS "verbatim nodes" .IX Subsection "verbatim nodes" A verbatim node contains the text of a verbatim paragraph. Call .PP .Vb 1 \& $text = $node\->get_text .Ve .PP to recover the text of the paragraph. .SS "ordinary nodes" .IX Subsection "ordinary nodes" An ordinary node represents the text of an ordinary paragraph. The text is parsed into a list of text and sequence nodes; these nodes are the children of the ordinary node. Call .PP .Vb 1 \& $children = $node\->get_children .Ve .PP to get a list of the children. Iterate over this list to recover the text of the paragraph. .SS "command nodes" .IX Subsection "command nodes" A command node represents an =command paragraph. Call .PP .Vb 1 \& $command = $node\->get_command; .Ve .PP to recover the name of the command. The name is returned \fIwithout\fR the equals sign. .PP =over paragraphs are represented by list nodes, not command nodes; see \*(L"list nodes\*(R", below. .PP The text of a command paragraph is parsed into a list of text and sequence nodes; these nodes are the children of the command node. Call .PP .Vb 1 \& $children = $node\->get_children; .Ve .PP to get a list of the children. Iterate over this list to recover the text of the paragraph. .SS "sequence nodes" .IX Subsection "sequence nodes" A sequence node represents a single interior sequence (a <> markup). Call .PP .Vb 1 \& $node\->get_letter .Ve .PP to recover the original markup letter. The contents of the markup are parsed into a list of text and sequence nodes; these nodes are the children of the sequence node. Call .PP .Vb 1 \& $node\->get_children .Ve .PP to recover them. .PP Z<> and E<> markups do not generate sequence nodes; these markups are expanded by \f(CW\*(C`Pod::Tree\*(C'\fR when the tree is built. .SS "target nodes" .IX Subsection "target nodes" If a sequence node represents a link (an \f(CW\*(C`L<>\*(C'\fR markup), then .PP .Vb 1 \& is_link $node .Ve .PP returns true and .PP .Vb 1 \& $target = $node\->get_target .Ve .PP returns a node representing the target of the link. .PP \&\f(CW\*(C`Pod::Tree::Node\*(C'\fR can represent targets in two \fIdomains\fR: \f(CW\*(C`POD\*(C'\fR and \f(CW\*(C`HTTP\*(C'\fR. The \f(CW\*(C`POD\*(C'\fR domain represents the .PP .Vb 1 \& L .Ve .PP markups that are described in perlpod. The \f(CW\*(C`HTTP\*(C'\fR domain represents \f(CW\*(C`L<>\*(C'\fR markups that contain a \s-1URL,\s0 e.g. .PP .Vb 1 \& L .Ve .PP Call .PP .Vb 1 \& $domain = $target\->get_domain .Ve .PP to discover the domain of the target. For targets in the \s-1POD\s0 domain, call .PP .Vb 2 \& $page = $target\->get_page; \& $section = $target\->get_section; .Ve .PP to recover the man page and section that the link refers to. For targets in the \s-1HTTP\s0 domain, call .PP .Vb 1 \& $url = $target\->get_page; .Ve .PP to recover the \s-1URL\s0 for the link. .PP \&\fI\f(CI$target\fI\fR is used only for constructing hyper-links; the text to be displayed for the link is recovered by walking the children of \fI\f(CI$node\fI\fR, as for any other interior sequence. .SS "text nodes" .IX Subsection "text nodes" A text node represents text that contains no interior sequences. Call .PP .Vb 1 \& $text = $node\->get_text .Ve .PP to recover the text. .SS "list nodes" .IX Subsection "list nodes" A list node represents an =over list. Call .PP .Vb 1 \& $list_type = $node\->get_list_type; .Ve .PP to discover the type of the list. This will be one of the strings .IP "'bullet'" 4 .IX Item "'bullet'" .PD 0 .IP "'number'" 4 .IX Item "'number'" .IP "'text'" 4 .IX Item "'text'" .PD .PP The type of a list is the type of the first item in the list. .PP The children of a list node are item nodes; each item node represents one item in the list. .PP You can call .PP .Vb 1 \& $node\->get_arg; .Ve .PP to recover the indent value following the =over. .SS "item nodes" .IX Subsection "item nodes" An item node represents one item in an =over list. Call .PP .Vb 1 \& $item_type = $node\->get_item_type; .Ve .PP to discover the type of the item. This will be one of the strings shown above for \*(L"list nodes\*(R". Typically, all the items in a list have the same type, but \f(CW\*(C`Pod::Tree::Node\*(C'\fR doesn't assume this. .PP The children of an item node represent the text of the =item paragraph; this is usually of interest only for 'text' items. Call .PP .Vb 1 \& $children = $node\->get_children .Ve .PP to get a list of the children; these will be sequence and text nodes, as for any other =command paragraph. .PP Each item node also has a list of nodes representing all the paragraphs following it, up to the next =item command, or the end of the list. These nodes are called \fIsiblings\fR of the item node. Call .PP .Vb 1 \& $siblings = $node\->get_siblings .Ve .PP to get a list of sibling nodes. .SS "for nodes" .IX Subsection "for nodes" for nodes represent text that is to be passed to an external formatter. Call .PP .Vb 1 \& $formatter = $node\->get_arg; .Ve .PP to discover the name of the formatter. Call .PP .Vb 1 \& $text = $node\->get_text; .Ve .PP to obtain the text to be passed to the formatter. This will either be the text of an =for command, or all of the text between =begin and =end commands. .SS "Walking the tree" .IX Subsection "Walking the tree" PODs have a recursive structure; therefore, any application that walks a Pod::Tree must also be recursive. See \fIskeleton\fR for an example of the necessary code. .SH "METHODS" .IX Header "METHODS" .SS "Constructors" .IX Subsection "Constructors" These methods construct \f(CW\*(C`Pod::Tree::Node\*(C'\fR objects. They are used to build trees. They aren't necessary to walk trees. .PP .Vb 10 \& $node = root Pod::Tree::Node \e@paragraphs; \& $node = code Pod::Tree::Node $paragraph; \& $node = verbatim Pod::Tree::Node $paragraph; \& $node = command Pod::Tree::Node $paragraph; \& $node = ordinary Pod::Tree::Node $paragraph; \& $node = letter Pod::Tree::Node $token; \& $node = sequence Pod::Tree::Node $letter, \e@children; \& $node = text Pod::Tree::Node $text; \& $node = target Pod::Tree::Node $target; \& $node = link Pod::Tree::Node $node, $page, $section; .Ve .ie n .IP "\fI\f(CI$link\fI\fR = ""Pod::Tree::Node""\->""link""(\fI\f(CI$node\fI\fR, \fI\f(CI$page\fI\fR, \fI\f(CI$section\fI\fR)" 4 .el .IP "\fI\f(CI$link\fI\fR = \f(CWPod::Tree::Node\fR\->\f(CWlink\fR(\fI\f(CI$node\fI\fR, \fI\f(CI$page\fI\fR, \fI\f(CI$section\fI\fR)" 4 .IX Item "$link = Pod::Tree::Node->link($node, $page, $section)" Creates a new sequence node representing an \f(CW\*(C`L<>\*(C'\fR markup. \&\fI\f(CI$node\fI\fR becomes the sole child of the new node. The target of the node is constructed from \fI\f(CI$page\fI\fR and \fI\f(CI$section\fI\fR. .Sp This method isn't used to parse PODs. It is provided for applications that want to create new links in an existing \f(CW\*(C`Pod::Tree\*(C'\fR structure. .SS "Tests" .IX Subsection "Tests" These methods return true iff \fI\f(CI$node\fI\fR has the type indicated by the method name. .PP .Vb 10 \& is_code $node and ... \& is_command $node and ... \& is_for $node and ... \& is_item $node and ... \& is_letter $node and ... \& is_link $node and ... \& is_list $node and ... \& is_ordinary $node and ... \& is_pod $node and ... \& is_root $node and ... \& is_sequence $node and ... \& is_text $node and ... \& is_verbatim $node and ... .Ve .PP \&\f(CW\*(C`is_pod\*(C'\fR returns true for all nodes except code, \f(CW\*(C`=pod\*(C'\fR, and \f(CW\*(C`=cut\*(C'\fR nodes. .PP These methods return true iff \fI\f(CI$node\fI\fR is a command node, and the command is the one indicated by the method name. .PP .Vb 12 \& is_c_head1 $node and ... \& is_c_head2 $node and ... \& is_c_head3 $node and ... \& is_c_head4 $node and ... \& is_c_cut $node and ... \& is_c_pod $node and ... \& is_c_over $node and ... \& is_c_back $node and ... \& is_c_item $node and ... \& is_c_for $node and ... \& is_c_begin $node and ... \& is_c_end $node and ... .Ve .SS "Accessors" .IX Subsection "Accessors" These methods return information about nodes. Most accessors are only relevant for certain types of nodes. .ie n .IP "\fI\f(CI$arg\fI\fR = ""get_arg"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$arg\fI\fR = \f(CWget_arg\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$arg = get_arg $node" Returns the argument of \fI\f(CI$node\fI\fR. This is the number following an =over command, or the name of an external translator for =for, =begin, and =end commands. Only relevant for these four command nodes. .ie n .IP "\fI\f(CI$brackets\fI\fR = ""get_brackets"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$brackets\fI\fR = \f(CWget_brackets\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$brackets = get_brackets $node" Only relevant for for nodes. .Sp If the node represents an =for command, \&\fI@$brackets\fR is a single-element list. The list element is the text of the =for command and its argument, i.e. the name of the external formatter. .Sp If the node represents a =begin/=end construct, \&\fI@$brackets\fR is a two-element list containing the text of the =begin and =end paragraphs. .ie n .IP "\fI\f(CI$children\fI\fR = ""get_children"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$children\fI\fR = \f(CWget_children\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$children = get_children $node" Returns a reference to the list of nodes that are children of \fI\f(CI$node\fI\fR. May be called on any node. The list may be empty. .ie n .IP "\fI\f(CI$command\fI\fR = ""get_command"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$command\fI\fR = \f(CWget_command\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$command = get_command $node" Returns the name of a command, without the equals sign. Only relevant for command nodes. .ie n .IP "\fI\f(CI$domain\fI\fR = ""get_domain"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$domain\fI\fR = \f(CWget_domain\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$domain = get_domain $node" Only relevant for target nodes. Returns the domain of the target. This will be one of the strings .RS 4 .IP "'\s-1HTTP\s0'" 4 .IX Item "'HTTP'" .PD 0 .IP "'\s-1POD\s0'" 4 .IX Item "'POD'" .RE .RS 4 .RE .ie n .IP "\fI\f(CI$item_type\fI\fR = ""get_item_type"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$item_type\fI\fR = \f(CWget_item_type\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$item_type = get_item_type $node" .PD Returns the type of an item node. The type will be one of .RS 4 .IP "'bullet'" 4 .IX Item "'bullet'" .PD 0 .IP "'number'" 4 .IX Item "'number'" .IP "'text'" 4 .IX Item "'text'" .RE .RS 4 .RE .ie n .IP "\fI\f(CI$letter\fI\fR = ""get_letter"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$letter\fI\fR = \f(CWget_letter\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$letter = get_letter $node" .PD Returns the letter that introduces an interior sequence. Only relevant for sequence nodes. .ie n .IP "\fI\f(CI$list_type\fI\fR = ""get_list_type"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$list_type\fI\fR = \f(CWget_list_type\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$list_type = get_list_type $node" Returns the type of a list node. The type of a list node is the type of the first item node in the list. .ie n .IP "\fI\f(CI$page\fI\fR = ""get_page"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$page\fI\fR = \f(CWget_page\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$page = get_page $node" Only relevant for target nodes. For targets in the \f(CW\*(C`POD\*(C'\fR domain, returns the man page that is the target of the link. For targets in the \f(CW\*(C`HTTP\*(C'\fR domain, returns the \s-1URL\s0 that is the target of the link. .ie n .IP "\fI\f(CI$raw\fI\fR = ""get_raw"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$raw\fI\fR = \f(CWget_raw\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$raw = get_raw $node" Returns the original text of a paragraph. Currently provided for command, verbatim, and ordinary paragraphs. .ie n .IP "\fI\f(CI$raw_kids\fI\fR = ""get_raw_kids"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$raw_kids\fI\fR = \f(CWget_raw_kids\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$raw_kids = get_raw_kids $node" Only provided for L<> sequence nodes. Returns a reference to a list of nodes representing the entire text of the L<> sequence, including any part following a vertical bar (|). .Sp The original text of the L<> markup can be reconstructed from this list. .ie n .IP "\fI\f(CI$section\fI\fR = ""get_section"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$section\fI\fR = \f(CWget_section\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$section = get_section $node" Only relevant for target nodes in the \f(CW\*(C`POD\*(C'\fR domain. Returns the section that is the target of a link. .ie n .IP "\fI\f(CI$siblings\fI\fR = ""get_siblings"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$siblings\fI\fR = \f(CWget_siblings\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$siblings = get_siblings $node" Returns the siblings of a node. May be called on any node. Only item nodes have siblings. .ie n .IP "\fI\f(CI$target\fI\fR = ""get_target"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$target\fI\fR = \f(CWget_target\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$target = get_target $node" Returns the target of a node. Only relevant for sequence nodes that represent links (\f(CW\*(C`L<>\*(C'\fR markups). \&\f(CW\*(C`is_link\*(C'\fR returns true on these nodes. .ie n .IP "\fI\f(CI$text\fI\fR = ""get_text"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$text\fI\fR = \f(CWget_text\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$text = get_text $node" Returns the text of a node. \&\fI\f(CI$text\fI\fR will not contain any interior sequences. Only relevant for text nodes. .ie n .IP "\fI\f(CI$type\fI\fR = ""get_type"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$type\fI\fR = \f(CWget_type\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$type = get_type $node" Returns the type of \fI\f(CI$node\fI\fR. May be called on any node. See \*(L"\s-1TREE STRUCTURE\*(R"\s0 for descriptions of the node types. .ie n .IP "\fI\f(CI$deep_text\fI\fR = ""get_deep_text"" \fI\f(CI$node\fI\fR" 4 .el .IP "\fI\f(CI$deep_text\fI\fR = \f(CWget_deep_text\fR \fI\f(CI$node\fI\fR" 4 .IX Item "$deep_text = get_deep_text $node" Recursively walks the children of a node, catenates together the text from each node, and returns all that text as a single string. All interior sequence markups are discarded. .Sp \&\f(CW\*(C`get_deep_text\*(C'\fR is provided as a convenience for applications that want to ignore markups in a \s-1POD\s0 paragraph. .SS "Parsing" .IX Subsection "Parsing" These methods manipulate the tree while it is being built. They aren't necessary to walk the tree. .PP .Vb 9 \& $node\->force_text($text) \& $node\->force_for; \& $node\->parse_begin (\e@nodes); \& $node\->set_children(\e@children); \& $node\->make_sequences; \& $node\->parse_links; \& $node\->unescape; \& $node\->consolidate; \& $node\->make_lists; .Ve .SS "Utility" .IX Subsection "Utility" .ie n .IP "\fI\f(CI$node\fI\fR\->""clone""" 4 .el .IP "\fI\f(CI$node\fI\fR\->\f(CWclone\fR" 4 .IX Item "$node->clone" Returns a deep copy of a node. Only implemented for \f(CW\*(C`text\*(C'\fR and \f(CW\*(C`sequence\*(C'\fR nodes. .ie n .IP "\fI\f(CI$node\fI\fR\->""dump""" 4 .el .IP "\fI\f(CI$node\fI\fR\->\f(CWdump\fR" 4 .IX Item "$node->dump" Returns a string containing a pretty-printed representation of the node. Calling \f(CW\*(C`dump\*(C'\fR on the root node of a tree will show the entire \s-1POD.\s0 .ie n .IP """Pod::Tree::Node""\->""set_filename""(\fI\f(CI$filename\fI\fR)" 4 .el .IP "\f(CWPod::Tree::Node\fR\->\f(CWset_filename\fR(\fI\f(CI$filename\fI\fR)" 4 .IX Item "Pod::Tree::Node->set_filename($filename)" Sets the file name to be reported in error messages. .ie n .IP "\fI\f(CI$filename\fI\fR = $\fInode\fR\->""getfile_name""" 4 .el .IP "\fI\f(CI$filename\fI\fR = $\fInode\fR\->\f(CWgetfile_name\fR" 4 .IX Item "$filename = $node->getfile_name" Returns the file name set by \f(CW\*(C`set_file_name\*(C'\fR. .SH "EXAMPLES" .IX Header "EXAMPLES" The \fIt/\fR directory in the \f(CW\*(C`Pod::Tree\*(C'\fR distribution contains examples of PODs, together with dumps of the trees that \f(CW\*(C`Pod::Tree\*(C'\fR constructs for them. The tree for \f(CW\*(C`t/\*(C'\fR\fIfile\fR\f(CW\*(C`.pod\*(C'\fR is in \f(CW\*(C`t/\*(C'\fR\fIfile\fR\f(CW\*(C`.p_exp\*(C'\fR. .PP \&\f(CW\*(C`Pod::Tree::Node::dump\*(C'\fR is a simple example of code that walks a \s-1POD\s0 tree. .PP \&\fIskeleton\fR is a skeleton application that walks a \s-1POD\s0 tree. .SH "NOTES" .IX Header "NOTES" .IP "\(bu" 4 There is no provision in perlpod for \f(CW\*(C`L<>\*(C'\fR markups to contain URLs, but due to popular demand, this is now supported in \&\f(CW\*(C`Pod::Tree::Node\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1), \f(CW\*(C`Pod::Tree\*(C'\fR .SH "AUTHOR" .IX Header "AUTHOR" Steven McDougall, swmcd@world.std.com .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1999\-2004 by Steven McDougall. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.