Net::FluidDB::Namespace - FluidDB namespaces
use Net::FluidDB::Namespace; # create $ns = Net::FluidDB::Namespace->new( fdb => $fdb, description => $description, path => $path ); $ns->create; # get, optionally fetching descrition $ns = Net::FluidDB::Namespace->get($fdb, $path, description => 1); $ns->parent; # update $ns->description($new_description); $ns->update; # delete $ns->delete;
Net::FluidDB::Namespace models FluidDB namespaces.
Net::FluidDB::Namespace
Net::FluidDB::Namespace is a subclass of Net::FluidDB::Base.
Net::FluidDB::Namespace consumes the roles Net::FluidDB::HasObject, and Net::FluidDB::HasPath.
Constructs a new namespace. The constructor accepts these parameters:
An instance of Net::FluidDB.
A description of this namespace.
The namespace you want to put this namespace into. An instance of Net::FluidDB::Namespace representing an existing namespace in FluidDB.
The name of the namespace, which is the rightmost segment of its path. The name of "fxn/perl" is "perl".
The path of the namespace, for example "fxn/perl".
The description attribute is not required because FluidDB allows fetching namespaces without their description. It must be defined when creating or updating namespaces though.
description
The attributes parent, path, and name are mutually dependent. Ultimately namespace creation has to be able to send the path of the parent and the name of the namespace to FluidDB. So you can set parent and name, or just path.
parent
path
name
This constructor is only useful for creating new namespaces in FluidDB. Existing namespaces are fetched with get.
get
Retrieves the namespace with path $path from FluidDB. Options are:
$path
Tells get whether you want to fetch the description.
Tells get whether you want to fetch the names of child namespaces.
Tells get whether you want to fetch the names of child tags.
Net::FluidDB provides a convenience shortcut for this method.
Net::FluidDB
Creates the namespace in FluidDB.
Updates the namespace in FluidDB. Only the description can be modified.
Deletes the namespace in FluidDB.
Gets/sets the description of the namespace.
Note that you need to set the description flag when you fetch a namespace for this attribute to be initialized.
Returns the names of the child namespaces as a (possibly empty) arrayref of strings.
Note that you need to set the namespace_names flag when you fetch a namespace for this attribute to be initialized.
namespace_names
Returns the names of the child tags as a (possibly empty) arrayref of strings.
Note that you need to set the tag_names flag when you fetch a namespace for this attribute to initialized.
tag_names
The parent of the namespace, as an instance of Net::FluidDB::Namespace. This attribute is lazy loaded.
The name of the namespace.
The path of the namespace.
http://doc.fluidinfo.com/fluidDB/namespaces.html
http://doc.fluidinfo.com/fluidDB/api/namespaces-and-tags.html
http://api.fluidinfo.com/fluidDB/api/*/namespaces/*
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.