Net::FluidDB::Tag - FluidDB tags
use Net::FluidDB::Tag; # create $tag = Net::FluidDB::Tag->new( fdb => $fdb, description => $description, indexed => 1, path => $path ); $tag->create; # get, optionally fetching descrition $tag = Net::FluidDB::Tag->get($fdb, $path, description => 1); $tag->namespace; # update $tag->description($new_description); $tag->update; # delete $tag->delete;
Net::FluidDB::Tag models FluidDB tags.
Net::FluidDB::Tag
Net::FluidDB::Tag is a subclass of Net::FluidDB::Base.
Net::FluidDB::Tag consumes the roles Net::FluidDB::HasObject, and Net::FluidDB::HasPath.
Constructs a new tag. The constructor accepts these parameters:
An instance of Net::FluidDB.
A description of this tag.
A flag that tells FluidDB whether this tag should be indexed.
The namespace you want to put this tag into. An instance of Net::FluidDB::Namespace representing an existing namespace in FluidDB.
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".
The description attribute is not required because FluidDB allows fetching tags without their description. It must be defined when creating or updating tags though.
description
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 FluidDB. So you can set namespace and name, or just path.
namespace
path
name
This constructor is only useful for creating new tags in FluidDB. Existing tags are fetched with get.
get
Retrieves the tag with path $path from FluidDB. Options are:
$path
Tells get whether you want to fetch the description.
Net::FluidDB provides a convenience shortcut for this method.
Net::FluidDB
Determines whether $path1 and $path2 are the same in FluidDB. The basic rule is that the username fragment is case-insensitive, and the rest is not.
$path1
$path2
Creates the tag in FluidDB.
Updates the tag in FluidDB. Only the description can be modified.
Deletes the tag in FluidDB.
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 FluidDB.
The namespace the tag belongs to, as an instance of Net::FluidDB::Namespace. This attribute is lazy loaded.
The name of the tag.
The path of the tag.
http://doc.fluidinfo.com/fluidDB/tags.html
http://doc.fluidinfo.com/fluidDB/api/namespaces-and-tags.html
http://api.fluidinfo.com/fluidDB/api/*/tags/*
Xavier Noria (FXN), <fxn@cpan.org>
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.
To install Net::FluidDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FluidDB
CPAN shell
perl -MCPAN -e shell install Net::FluidDB
For more information on module installation, please visit the detailed CPAN module installation guide.