1Pod::Abstract::Tree(3)User Contributed Perl DocumentationPod::Abstract::Tree(3)
2
3
4

NAME

6       Pod::Abstract::Tree - Manage a level of Pod document tree Nodes.
7

DESCRIPTION

9       Pod::Abstract::Tree keeps track of a set of Pod::Abstract::Node
10       elements, and allows manipulation of that list of elements. Elements
11       are stored in an ordered set - a single node can appear once only in a
12       single document tree, so inserting a node at a point will also remove
13       it from it's previous location.
14
15       This is an internal class to Pod::Abstract::Node, and should not
16       generally be used externally.
17

METHODS

19   detach
20        $tree->detach($node);
21
22       Unparent the $node from $tree. All other elements will be shifted to
23       fill the empty spot.
24
25   push
26       Add an element to the end of the node list.
27
28   pop
29       Remove an element from the end of the node list.
30
31   insert_before
32        $tree->insert_before($target,$node);
33
34       Insert $node before $target. Both must be children of $tree
35
36   insert_after
37        $tree->insert_after($target,$node);
38
39       Insert $node after $target. Both must be children of $tree
40
41   unshift
42       Remove the first node from the node list and return it.
43
44       Unshift takes linear time - it has to relocate every other element in
45       id_map so that they stay in line.
46
47   children
48       Returns the in-order node list.
49
50   index_relative
51        my $node = $tree->index_relative($target, $offset);
52
53       This method will return a node at an offset of $offset (which may be
54       negative) from this tree structure. If there is no such node, undef
55       will be returned. For example, an offset of 1 will give the following
56       element of $node.
57

AUTHOR

59       Ben Lilburne <bnej@mac.com>
60
62       Copyright (C) 2009 Ben Lilburne
63
64       This program is free software; you can redistribute it and/or modify it
65       under the same terms as Perl itself.
66
67
68
69perl v5.30.1                      2020-01-30            Pod::Abstract::Tree(3)
Impressum