NAME
PFT::Content::Entry - Content edited by user.
SYNOPSIS
use PFT::Content::Entry;
my $p = PFT::Content::Entry->new({
tree => $tree,
path => $path,
name => $name,
})
DESCRIPTION
PFT::Content::Entry
is the basetype for all text-based content files. It inherits from PFT::Content::File
and has two specific subtypes: PFT::Content::Blog
(representing an entry with date) and PFT::Content::Page
(representing an entry withouth date).
Methods
- open
-
Open the file, return a file handler. Sets the binmode according to the locale.
- header
-
Reads the header from the page.
Returns undef if the entry is not backed by a file. Croaks if the file does not contain a healty header.
- read
-
Read the page.
In scalar context returns an open file descriptor configured with the correct
binmode
according to the header. In list context returns the header and the same descriptor. Returnsundef
if the file does not exist.Croaks if the header is broken.
- void
-
Evaluates as true if the entry is void, that is if the file does not exist, or if it contains only the header.
- set_header
-
Sets a new header, passed by parameter.
This will rewrite the file. Content will be maintained.
- make_consistent
-
Make page consistent with the filesystem tree.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 43:
=back without =over