NAME

Data::URIID::Base - Extractor for identifiers from URIs

VERSION

version v0.11

SYNOPSIS

use Data::URIID;

use parent 'Data::URIID::Base';

This module is the base package for a number of other packages. Common methods are defined in here.

Note: Functionality marked with Experimental may or may not work as expected (e.g. may contain bugs or may change behaviour in future versions without warning).

METHODS

extractor

my Data::URIID $extractor = $object->extractor( [ %opts ] );

Returns the Data::URIID object used to create this object (if any). If the extractor is not/no longer available this method dies.

The following options are defined:

default

Returns the given value if no value is found. This can also be set to undef to allow returning undef in case of no value found instead of die-ing.

ise

my $ise = $object->ise( [ %opts ] );

Returns the ISE of this object. If no ISE is known this method will die.

The following options are defined:

as

Return the value as the given type. This is the package name of the type, ise for pain ISE perl string. If the given type is not supported or cannot be constructed the method dies.

At least the following types are supported: Data::URIID::Result, Data::URIID::Service, Data::Identifier.

If using this parameter it is recommended to have Data::Identifier installed. It may become a requirement in future versions.

default

Returns the given value if no value is found. This can also be set to undef to allow returning undef in case of no value found instead of die-ing.

no_defaults

Experimental: If set to true this will avoid calculating identifiers from others if as does not match what is available.

online

Overrides the "online" in Data::URIID flag used for the lookup if as is set to Data::URIID::Result. This is very useful to prevent network traffic for auxiliary lookups.

displayname

my $displayname = $object->displayname( [ %opts ] );

This method is for compatibility with other moduls such as Data::Identifier and Data::TagDB::Tag. This methods dies if no value can be found.

The following options are supported:

default

Experimental: Returns the given value if no value is found. This can also be set to undef to allow returning undef in case of no value found instead of die-ing.

no_defaults

Experimental: If set to true this will avoid returning an identifier or any other default value.

AUTHOR

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

COPYRIGHT AND LICENSE

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

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)