SeeAlso::Identifier::Factory - Identify and create identifiers
version 0.71
$identifier = $factory->create( $could_be_an_identifier_string );
A SeeAlso::Identifier::Factory object is given a string (via its method create) and returns a well-defined SeeAlso::Identifier object. A factory is useful to parse a string that may be an identifier of several identifier kinds.
create
The factory knows a list of identifier types (subclasses of SeeAlso::Identifier); the first type that successfully parses the provided string value is used to create the identifier object. If no type works, an empty identifier of the first type is returned.
Create a new Identifier Factory. You can either pass an array reference with identifier class name or a hash of methods that will be used to create a new identifier class:
$factory = new SeeAlso::Identifier::Factory type => [qw( class1 class2 ... )] $factory = new SeeAlso::Identifier::Factory parse => sub { ... }, canonical => sub { lc($_[0]) }, hash => sub { md5_hex($_[0]) }, type => '...';
Create a new SeeAlso::Identifier object as described above.
Dynamically creates a subclass of SeeAlso::Identifier with given name and methods.
Jakob Voss
This software is copyright (c) 2013 by Jakob Voss.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install SeeAlso::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SeeAlso::Server
CPAN shell
perl -MCPAN -e shell install SeeAlso::Server
For more information on module installation, please visit the detailed CPAN module installation guide.