The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PFT::Map - Map of a PFT site

SYNOPSIS

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

DESCRIPTION

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…).

Properties

nodes

List of the nodes

tree

The associated content tree

pages

List of page nodes

months

List of month nodes

tags

List of tag nodes

dump

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.

Methods

node_of

Given a PFT::Content::Base (or any subclass) object, returns the associated node, or undef if such node does not exist.

recent_blog

The N most recent blog nodes.

The number N is given as parameter, and defaults to 1. The method returns up to N nodes, ordered by date, from most to least recent.

recent_months

The N most recent months node.

The number N is given as parameter, and defaults to 1. The method returns up to N nodes, ordered by date, from most to least recent.