The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

version v0.01

SYNOPSIS

    use Data::TagDB;

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

    my Data::TagDB::Tag $tag = $db->tag_by_...(...);

METHODS

db

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

Returns the current Data::TagDB object.

dbid

    my $dbid = $db->dbid;

Returns the current tag's database internal identifier. This call should be avoided as those identifiers are not stable nor portable. It is however the best option when directly interacting with the backend database.

uuid, oid, uri, sid

    my     $uuid = $tag->uuid;
    my     $oid  = $tag->oid;
    my URI $uri  = $tag->uri;
    my     $sid  = $tag->sid;

Returns the tags UUID, OID, URI, or SID (small-identifier). It is not yet defined if those functions die or return a calculated identifier if the requested identifier is unavailable. This will be defined in a later version of this module. Identifiers may also be unavailable due to being not part of the database.

ise

    my $ise = $tag->ise;

Returns an identifier (uuid, oid, or uri) for the tag as string.

displayname

    my $displayname = $tag->displayname;

Returns a name that can be used to display to the user. This function always returns a plain string (even if no usable name is found).

displaycolour

    my $displaycolour = $tag->displaycolour;

Returns a colour that can be used to display the tag or undef. This will return a decoded object, most likely (but not necessarily) an instance of Data::URIID::Colour. Later versions of this module may allow to force a specific type.

icontext

    my $icontext = $tag->icontext;

Returns a string or undef that is a single unicode character that represents the tag. This can be used as a visual aid for the user. It is not well defined what single character means in this case. A single character may map to multiple unicode code points (such as a base and modifiers). If the application requies a specific definition of single character it must validate the value.

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)