PFT::Map - Map of a PFT site
my $tree = PFT::Content->new($basedir); PFT::Map->new($tree);
The map of a PFT site allows to navigate the site content.
This can be useful for compiling the site or determining properties of the site (e.g. dangling links, important pages…).
List of the nodes
List of the mnemonic ids.
map $m->id_to_node($_), $m->ids
is equivalent to
$m->nodes
The associated content tree
List of page nodes
List of month nodes
List of tag nodes
The PFT::Map::Index object associated to this map.
It handles the unique identifiers of content items and can be used to query the map.
# TODO: move forward this description, as method
Dump of the nodes in a easy-to-display form, that is a list of dictionaries.
This method is used mainly or solely for testing.
Given a PFT::Content::Base (or any subclass) object, returns the associated node, or undef if such node does not exist.
Given a unique mnemonic id (as in PFT::Content::Node::id) returns the associated node, or undef if there is no such node.
PFT::Content::Node::id
undef
Getter for the most N recent blog nodes. Accepts N as strictly positive integer parameter.
In list context returns the N most recent blog nodes, ordered by date, from most to least recent. Less than N nodes will be returned if N is greater than the number of available entries.
In scalar context returns the N-th to last entry. For N equal to zero the most recent entry is returned.
Getter for the most N recent month nodes. Accepts N as strictly positive integer parameter.
In list context returns the N most recent month nodes, ordered by date, from most to least recent. Less than N nodes will be returned if N is greater than the number of available entries.
In scalar context returns the N-th to last entry. For N equal to zero the most recent entry is returned. The undef value is returned if there are less then N available.
Checker for blog history.
Returns a boolean value telling if the site contains at least one blog entry.
To install PFT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PFT
CPAN shell
perl -MCPAN -e shell install PFT
For more information on module installation, please visit the detailed CPAN module installation guide.