NAME

Net::Fluidinfo::HasPath - Role for resources that have a path

SYNOPSIS

$namespace->path;
$tag->path

DESCRIPTION

Net::Fluidinfo::HasPath is a role consumed by Net::Fluidinfo::Namespace and Net::Fluidinfo::Tag. They have in common that they have a path.

Consumers of this role must respond to parent.

USAGE

Instance Methods

$resource->path

The path of this resource in Fluidinfo. For example "fxn/rating".

This attribute can either be set, or lazily computed from the parent of the resource and its name.

$resource->name

The last segment of the path. A tag with path "fxn/rating" has "rating" as name.

This attribute can either be set, or lazily computed from the path.

$resource->path_of_parent

The path of the parent resource if there's one, an empty string otherwise.

AUTHOR

Xavier Noria (FXN), <fxn@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2011 Xavier Noria

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.