.\" Automatically generated by Pod::Man 4.11 (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::Abstract::Tree 3pm" .TH Pod::Abstract::Tree 3pm "2020-05-17" "perl v5.30.0" "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::Abstract::Tree \- Manage a level of Pod document tree Nodes. .SH "DESCRIPTION" .IX Header "DESCRIPTION" Pod::Abstract::Tree keeps track of a set of Pod::Abstract::Node elements, and allows manipulation of that list of elements. Elements are stored in an ordered set \- a single node can appear once only in a single document tree, so inserting a node at a point will also remove it from it's previous location. .PP This is an internal class to Pod::Abstract::Node, and should not generally be used externally. .SH "METHODS" .IX Header "METHODS" .SS "detach" .IX Subsection "detach" .Vb 1 \& $tree\->detach($node); .Ve .PP Unparent the \f(CW$node\fR from \f(CW$tree\fR. All other elements will be shifted to fill the empty spot. .SS "push" .IX Subsection "push" Add an element to the end of the node list. .SS "pop" .IX Subsection "pop" Remove an element from the end of the node list. .SS "insert_before" .IX Subsection "insert_before" .Vb 1 \& $tree\->insert_before($target,$node); .Ve .PP Insert \f(CW$node\fR before \f(CW$target\fR. Both must be children of \f(CW$tree\fR .SS "insert_after" .IX Subsection "insert_after" .Vb 1 \& $tree\->insert_after($target,$node); .Ve .PP Insert \f(CW$node\fR after \f(CW$target\fR. Both must be children of \f(CW$tree\fR .SS "unshift" .IX Subsection "unshift" Remove the first node from the node list and return it. .PP Unshift takes linear time \- it has to relocate every other element in id_map so that they stay in line. .SS "children" .IX Subsection "children" Returns the in-order node list. .SS "index_relative" .IX Subsection "index_relative" .Vb 1 \& my $node = $tree\->index_relative($target, $offset); .Ve .PP This method will return a node at an offset of \f(CW$offset\fR (which may be negative) from this tree structure. If there is no such node, undef will be returned. For example, an offset of 1 will give the following element of \f(CW$node\fR. .SH "AUTHOR" .IX Header "AUTHOR" Ben Lilburne .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2009 Ben Lilburne .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.