NAME
Articulate::Location - represent an item's location
DESCRIPTION
loc ['zone', 'public', 'article', 'hello-world']
loc 'zone/public/article/hello-world' # same thing
An object class which represents an item's location within the Articulate ecosystem. It contains an array of slugs, and stringifies to the 'file path' representation of them.
FUNCTIONS
loc
loc
is a constructor. It takes either a string (in the form of a path) or an arrayref. Either will be stored as an arrayref in the path
attribute.
ATTRIBUTE
path
An arrayref representing the path to the location. This is how the location is actually stored and is used for overloaded array dereferencing.
METHODS
location
$location->location->location # same as $location
This method always returns the object itself. It is useful when you want to allow either an Item or a Location as an argument.
to_file_path
Joins the contents of path
on /
and returns the result. This is used for overloaded stringification.