Data-TagDB

 view release on metacpan or  search on metacpan

lib/Data/TagDB/Tag.pm  view on Meta::CPAN

Returns a name that can be used to display to the user or C<die>s.
This function always returns a plain string (even if no usable name is found) unless L</no_defaults> is given.

The following universal options are supported: L</default>, L</no_defaults>.

=head2 displaycolour

    my $displaycolour = $tag->displaycolour( [ %opts ] );

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

This method C<die>s if no value can be found and no L</default> is given (since v0.11).

The following universal options are supported: L</default>.
The following universal options are ignored (without warning or error): L</no_defaults>.

=head2 icontext

    my $icontext = $tag->icontext( [ %opts ] );

lib/Data/TagDB/Tutorial.pod  view on Meta::CPAN

I<type> defines the type of data that is stored. For example "string" or "integer".
I<encoding> defines the way the value of the given type is stored. For example "ASCII digits" or "32 bit unsigned integer".

B<Note:>
Both I<type> and I<encoding> are often C<undef>.
If they are C<undef> the default values are used. A I<relation> can define a default type,
and a I<type> can define a default encoding.

B<Note:>
L<Data::TagDB> and L<Data::TagDB::Metadata> use the property C<data_raw> for the raw bitstring that is stored in the relation.
The virtual member I<data> is added that contains a decoded copy of C<data_raw>.

Beside I<type>, I<encoding>, and I<data> metadata has the same I<tag>, I<relation>, and I<context> properties as relations.
I<filter> is always C<undef> for I<metadata> and skipped in the API.

=head2 Identifiers

To allow tags to be recalled L</Metadata> is set on them containing I<identifiers>.
This is done using the standard tag C<also-shares-identifier> as I<relation>.
The I<type> is set to the corresponding type of the identifier.



( run in 2.691 seconds using v1.01-cache-2.11-cpan-600a1bdf6e4 )