NAME
Angerwhale::Content::FinalizedItem - read-only processed comment/article
DESCRIPTION
After filters are applied, it's a good idea to hide the internal details of the article/comment from the rest of the program. This class wraps the article in a clean read-only interface (except for comment-posting, etc.; you can write that way).
METHODS
isa
Lies on ISA checks so that a Finalized item looks like a Angerwhale::Content::Article
if it's an article, or looks like a Angerwhale::Content::Comment
if it's a comment.
new($item)
Wraps $item (an Angerwhale::Content::Item
) to make it read-only.
get_metadatum($name)
Reads named metadatdum.
get
Overriding Class::Accessor's version for a few special cases.
Normal case: get named data via get_metadatum
. Special case: formatted body (html and text).
mini
Returns true if the article is a mini article. Allows you to set status also.
id
Returns the UUID of the item.
compare
Compares two items, based on creation_time.
children
Returns arrayref of comments attached to this Item.
comments
(backcompat)
Returns array of comments attached to this item, or false if there are no comments.
categories
Returns the list of categories this item is in.
add_comment
Attach a comment to this item.
raw_text
Return raw unformatted data.
tags
Return list of tags.
tag_count
Returns number of tags this article/comment has.
add_tag(@tags)
Add a list of tags to the entry.