NAME

Articulate::Item - represent an item

METHODS

location

Returns the location of the item, as a location object (see Articulate::Location). Coerces into a location using Articulate::Location::loc.

meta

Returns the item's metadata, as a hashref.

content

Returns the item's content. What it might look like depends entirely on the content. Typically this is an unblessed scalar value, but it MAY contain binary data or an Articulate::File object.

_meta_accessor

# In a subclass of Item
sub author { shift->meta_accessor('schema/article/author')->(@_) }

# Then, on that subclass
$article->author('user/alice');
$article->author;

Uses dpath_set or dpath_get from Atticulate::Syntax to find or assign the relevant field in the metadata.