Net::Fluidinfo::Tag - Fluidinfo tags
use Net::Fluidinfo::Tag; # create $tag = Net::Fluidinfo::Tag->new( fin => $fin, description => $description, indexed => 1, path => $path ); $tag->create; # get, optionally fetching descrition $tag = Net::Fluidinfo::Tag->get($fin, $path, description => 1); $tag->namespace; # update $tag->description($new_description); $tag->update; # delete $tag->delete;
Net::Fluidinfo::Tag models Fluidinfo tags.
Net::Fluidinfo::Tag is a subclass of Net::Fluidinfo::Base.
Constructs a new tag. The constructor accepts these parameters:
An instance of Net::Fluidinfo.
A description of this tag.
A flag that tells Fluidinfo whether this tag should be indexed. This attribute mirrors the Fluidinfo API, but please note that Fluidinfo currently ignores its value, nowadays all tags are indexed.
The namespace you want to put this tag into. An instance of Net::Fluidinfo::Namespace representing an existing namespace in Fluidinfo.
The name of the tag, which is the rightmost segment of its path. The name of "fxn/rating" is "rating".
The path of the tag, for example "fxn/rating".
description attribute is not required because Fluidinfo allows fetching tags without their description. It must be defined when creating or updating tags though.
name are mutually dependent. Ultimately tag creation has to be able to send the path of the namespace and the name of the tag to Fluidinfo. So you can set
name, or just
This constructor is only useful for creating new tags in Fluidinfo. Existing tags are fetched with
Retrieves the tag with path
$path from Fluidinfo. Options are:
get whether you want to fetch the description.
Net::Fluidinfo provides a convenience shortcut for this method.
$path2 are the same in Fluidinfo. The basic rule is that the username fragment is case-insensitive, and the rest is not.
Creates the tag in Fluidinfo. Please note that tags are created on the fly by Fluidinfo if they do not exist.
Creating a tag by hand may be useful for example if you want to change the inherited permissions right away. That may be interesting if you are going to store sensitive data that would be by default readable. Other than that, it is recommended that you let Fluidinfo create tags as needed.
Updates the tag in Fluidinfo. Only the description can be modified.
Deletes the tag in Fluidinfo.
Gets/sets the description of the tag.
Note that you need to set the
description flag when you fetch a tag for this attribute to be initialized.
A flag, indicates whether this tag is indexed in Fluidinfo.
This predicate mirrors the Fluidinfo API. Nowadays all tags are indexed, so this predicate returns always true.
The namespace the tag belongs to, as an instance of Net::Fluidinfo::Namespace. This attribute is lazy loaded.
The name of the tag.
The path of the tag.
Xavier Noria (FXN), <firstname.lastname@example.org>
Copyright (C) 2009-2012 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.