PFT::Co...t::Entry(3)

πŸ“¦ version 1.4.1, in fedora 43, fedora 44

πŸ’– PFT::Content::Entry πŸ’–

okay so bestie, welcome to the PFT::Content::Entry page from the User Contributed Perl Documentation β€” yes it's a Perl manpage, yes it's giving vintage, and yes we're gonna read it together like it's a group chat. pull up a chair 🫢


✨ NAME ✨

PFT::Content::Entry β€” content edited by user. that's it, that's the whole vibe. a file that you touched. main character energy fr πŸ’…


✨ SYNOPSIS ✨

use PFT::Content::Entry;

my $p = PFT::Content::Entry->new({
    tree => $tree,
    path => $path,
    name => $name,
})

look at that constructor. so clean. so demure. it takes a tree, a path, and a name, and it just works ✨


✨ DESCRIPTION ✨

so PFT::Content::Entry is the basetype for all text-based content files. every text-y content thing in this whole system? it's a descendant of this. it's the mother of the group chat. πŸ‘‘

it inherits from PFT::Content::File, and it has two specific subtypes that are lowkey its whole personality:

  • PFT::Content::Blog β€” representing an entry with a date πŸ“…
  • PFT::Content::Page β€” representing an entry without a date πŸ™ˆ (yes, the original really does spell it "withouth", iconic typo, we love her)

🌸 Methods 🌸

πŸŽ€ open

Open the file, and hand you back a file handler. it also sets the binmode according to the locale, because we are respectful of encodings in this house 🫢

Reads the header from the page.

  • Returns undef if the entry isn't backed by a file (no file, no header, no problem πŸ’€)
  • Croaks if the file doesn't contain a healthy header β€” and ngl, if your header isn't healthy you deserve to hear about it 😭

πŸŽ€ read

Read the page.

  • In scalar context it returns an open file descriptor, configured with the correct binmode according to the header
  • In list context it returns the header and that same descriptor
  • Returns undef if the file doesn't exist
it croaks if the header is broken. so like… don't have a broken header. or do, and get yelled at. your call bestie πŸ’€

πŸŽ€ void

Evaluates as true if the entry is void β€” meaning the file does not exist, or it contains only the header. empty girlies. header-only girlies. they're all void here ✨

πŸŽ€ set_header

Sets a new header, passed by parameter.

heads up: this will rewrite the file. the content will be maintained, so no casualties, but still β€” it's writing to your file, be normal about it πŸ™ˆ

πŸŽ€ make_consistent

Make the page consistent with the filesystem tree. alignment. harmony. self-care. 🌈


πŸ’€ POD ERRORS πŸ’€

not me having to tell you this but β€” hey! the above document had some coding errors, which are explained below:

Around line 43:

=back without =over

yeah. a =back with no =over to back. it's giving orphaned formatting directive. it's giving "who raised you". we still love her though πŸ’œ


okay that's the whole page, you ate that reading session fr fr πŸ“

perl v5.42.0 Β· 2025-07-25 Β· from the User Contributed Perl Documentation β€” this manpage was served fresh on that date and you just devoured it. no cap. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from