Xavier Noria


Net::Fluidinfo::Tag - Fluidinfo tags


 use Net::Fluidinfo::Tag;

 # create
 $tag = Net::Fluidinfo::Tag->new(
    fin         => $fin,
    description => $description,
    indexed     => 1,
    path        => $path

 # get, optionally fetching descrition
 $tag = Net::Fluidinfo::Tag->get($fin, $path, description => 1);

 # update

 # delete


Net::Fluidinfo::Tag models Fluidinfo tags.



Net::Fluidinfo::Tag is a subclass of Net::Fluidinfo::Base.


Net::Fluidinfo::Tag consumes the roles Net::Fluidinfo::HasObject, and Net::Fluidinfo::HasPath.

Class methods


Constructs a new tag. The constructor accepts these parameters:

fin (required)

An instance of Net::Fluidinfo.

description (optional)

A description of this tag.

indexed (required)

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.

namespace (optional, but dependent)

The namespace you want to put this tag into. An instance of Net::Fluidinfo::Namespace representing an existing namespace in Fluidinfo.

name (optional, but dependent)

The name of the tag, which is the rightmost segment of its path. The name of "fxn/rating" is "rating".

path (optional, but dependent)

The path of the tag, for example "fxn/rating".

The description attribute is not required because Fluidinfo allows fetching tags without their description. It must be defined when creating or updating tags though.

The attributes namespace, path, and 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 namespace and name, or just path.

This constructor is only useful for creating new tags in Fluidinfo. Existing tags are fetched with get.

Net::Fluidinfo::Tag->get($fin, $path, %opts)

Retrieves the tag with path $path from Fluidinfo. Options are:

description (optional, default false)

Tells get whether you want to fetch the description.

Net::Fluidinfo provides a convenience shortcut for this method.

Net::Fluidinfo::Tag->equal_paths($path1, $path2)

Determines whether $path1 and $path2 are the same in Fluidinfo. The basic rule is that the username fragment is case-insensitive, and the rest is not.

Instance Methods


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.


Fluidinfo high-level description


Fluidinfo API documentation


Fluidinfo API specification



Xavier Noria (FXN), <fxn@cpan.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.