NAME

Data::TagDB::Cloudlet - Work with Tag databases

VERSION

version v0.07

SYNOPSIS

use Data::TagDB;
use Data::TagDB::Cloudlet;

my $db = Data::TagDB->new(...);

my Data::TagDB::Cloudlet $cl = Data::TagDB::Cloudlet->new(db => $db, root => [...]);

This module implements cloudlets. A cloudlet is a collection of tags.

In a cloudlet each tag can only be once. Each tag has a boolean attached that indices if it is a root tag. This is used to indicate if a tag is a first level member or was added by means of completion.

METHODS

new

my Data::TagDB::Cloudlet $cl = Data::TagDB::Cloudlet->new(db => $db, root => [...]);

Creates a new cloudlet object.

The following options are supported:

db

The database to use. This is required.

root

The root tag or tags. May be an arrayref of or single a Data::TagDB::Tag.

entry

Additional tags that are not root tags. May be an arrayref of or single a Data::TagDB::Tag.

db

my Data::TagDB $db = $cl->db;

Returns the current Data::TagDB object.

roots

my @roots = $cl->roots;

Returns the list of root tags.

entries

my @entries = $cl->entries;

Returns the list of all entries.

is_root

my $bool = $cl->is_root($tag);

Returns whether or not a given tag is a root tag.

is_entry

my $bool = $cl->is_entry($tag);

Returns whether or not a given tag is part of the cloudlet.

AUTHOR

Löwenfelsen UG (haftungsbeschränkt) <support@loewenfelsen.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2024 by Löwenfelsen UG (haftungsbeschränkt) <support@loewenfelsen.net>.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)