NAME

Angerwhale::Content::Item - abstract base class for Content Items

METHODS

id

return the UUID of this item

store_attribute

Store a piece of metadata

_add_tag(tag,count)

Internal method for adding a (tag,count) pair to the metadata area. Needed so that:

FOO => 2
fOo => 3

Results in:

foo => 5

Make sure you call this method with character data, not bytes

XXX: people are calling this with count=undef. Why?

store_data

Rewrite the data section of this item

children

Return (or set; INTERNAL USE ONLY) reference to the list of children. When setting, returns nothing.

You can set children to a coderef that is passed $self and returns an arrayref of children. This will be cached. (This is to replace Scalar::Defer for lazily-filtering children, BTW.)

Note: your subclass needs to implement _children, which returns a raw array of Items.

This is messy. Ugh.

METHODS YOU SHOULD IMPLEMENT

add_comment

See Angerwhale::Content::Filesytem::Item for now