Articulate::Item - represent an item
Articulate::Item->new( { meta => {}, content => 'Hello, World!', location => 'zone/public/article/hello-world', } ); # Construction defaults to item if no better option is available Articulate::Construction->construct( { ... } );
An item is a simple storage class for any sort of item which. Items have metadata, content, and a location.
Although it is acceptable to create items using the new class method, it is recommended that you construct items using Articulate::Construction, which will be able to pick an appropriate subclass of item to construct based on the argument you supply, if you have configured it to do so. Such a subclass can have semantically appropriate methods available (see _meta_accessor below for information on how to create these).
new
_meta_accessor
Returns the location of the item, as a location object (see Articulate::Location). Coerces into a location using Articulate::Location::new_location.
Articulate::Location::new_location
Returns the item's metadata, as a hashref.
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.
# 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 Articulate::Syntax to find or assign the relevant field in the metadata.
To install Articulate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Articulate
CPAN shell
perl -MCPAN -e shell install Articulate
For more information on module installation, please visit the detailed CPAN module installation guide.