NAME
Data::TagDB::Base - Work with Tag databases
VERSION
version v0.15
SYNOPSIS
use Data::TagDB;
(since v0.15)
Parent package for a number of other packages.
METHODS
db
my Data::TagDB $db = $base->db;
Returns the current Data::TagDB object.
get
my $value = $base->get($key [, %opts ] );
# or:
my @values = $base->get($key [, %opts ], list => 1);
(experimental since v0.15, experimental since v0.14 as part of Data::TagDB::Tag)
Gets a value from the object.
This method is mainly used to read a value using a plugin.
The format for the key is Package#subkey (future versions may support additional formats). The package given is the full perl package name of the module. The subkey is any that is exported by the plugin.
The following universal options are supported: default, as, listas, list.
Note: This method will try to cache the values (unless asked by the plugin not to cache). Details of the cache are subject to change. However the cache's lifetime is limited to the tag object's lifetime. (Which might itself be cached.)
execute
my $value = $base->execute($key [, %opts ] );
# or:
my @values = $base->execute($key [, %opts ], list => 1);
(experimental since v0.15)
Executes a plugin provided method.
This method works just like "get". But for the following differences:
The method will be executed every time it is called.
Methods my perform writes or otherwise unsafe operations.
They are not idempotent (calling twice with exactly the same parameters is not the same as calling only once)
The result is not cached by default.
AUTHOR
Philipp Schafft <lion@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024-2026 by Philipp Schafft <lion@cpan.org>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)