1PFT::Map(3)           User Contributed Perl Documentation          PFT::Map(3)
2
3
4

NAME

6       PFT::Map - Map of a PFT site
7

SYNOPSIS

9           my $tree = PFT::Content->new($basedir);
10           PFT::Map->new($tree);
11

DESCRIPTION

13       The map of a PFT site allows to navigate the site content.
14
15       This can be useful for compiling the site or determining properties of
16       the site (e.g. dangling links, important pages…).
17
18   Properties
19       nodes
20           List of the nodes
21
22       ids List of the mnemonic ids.
23
24               map $m->id_to_node($_), $m->ids
25
26           is equivalent to
27
28               $m->nodes
29
30       tree
31           The associated content tree
32
33       pages
34           List of page nodes
35
36       months
37           List of month nodes
38
39       tags
40           List of tag nodes
41
42       index
43           The PFT::Map::Index object associated to this map.
44
45           It handles the unique identifiers of content items and can be used
46           to query the map.
47
48       dump
49           # TODO: move forward this description, as method
50
51           Dump of the nodes in a easy-to-display form, that is a list of
52           dictionaries.
53
54           This method is used mainly or solely for testing.
55
56   Methods
57       node_of
58           Given a PFT::Content::Base (or any subclass) object, returns the
59           associated node, or undef if such node does not exist.
60
61       id_to_node
62           Given a unique mnemonic id (as in "PFT::Content::Node::id") returns
63           the associated node, or "undef" if there is no such node.
64
65       blog_recent
66           Getter for the most N recent blog nodes. Accepts N as strictly
67           positive integer parameter.
68
69           In list context returns the N most recent blog nodes, ordered by
70           date, from most to least recent. Less than N nodes will be returned
71           if N is greater than the number of available entries.
72
73           In scalar context returns the N-th to last entry. For N equal to
74           zero the most recent entry is returned.
75
76       months_recent
77           Getter for the most N recent month nodes.  Accepts N as strictly
78           positive integer parameter.
79
80           In list context returns the N most recent month nodes, ordered by
81           date, from most to least recent. Less than N nodes will be returned
82           if N is greater than the number of available entries.
83
84           In scalar context returns the N-th to last entry. For N equal to
85           zero the most recent entry is returned. The "undef" value is
86           returned if there are less then N available.
87
88       blog_exists
89           Checker for blog history.
90
91           Returns a boolean value telling if the site contains at least one
92           blog entry.
93
94
95
96perl v5.36.0                      2022-07-22                       PFT::Map(3)
Impressum