NAME
Noid - routines to mint and manage nice opaque identifiers
SYNOPSIS
use Noid; # import routines into a Perl script
$dbreport = Noid::dbcreate( # create minter database & printable
$dbdir, $contact, # report on its properties; $contact
$template, $term, # is string identifying the operator
$naan, $naa, # (authentication information); the
$subnaa ); # report is printable
$noid = Noid::dbopen( $dbname, $flags ); # open a minter, optionally
$flags = 0 | DB_RDONLY; # in read only mode
Noid::mint( $noid, $contact, $pepper ); # generate an identifier
Noid::dbclose( $noid ); # close minter when done
Noid::checkchar( $id ); # if id ends in +, replace with new check
# char and return full id, else return id
# if current check char valid, else return
# 'undef'
Noid::validate( $noid, # check that ids conform to template ("-"
$template, # means use minter's template); returns
@ids ); # array of corresponding strings, errors
# beginning with "iderr:"
$n = Noid::bind( $noid, $contact, # bind data to identifier; set
$validate, $how, # $validate to 0 if id. doesn't
$id, $elem, $value ); # need to conform to a template
Noid::note( $noid, $contact, $key, $value ); # add an internal note
Noid::fetch( $noid, $verbose, # fetch bound data; set $verbose
$id, @elems ); # to 1 to return labels
print Noid::dbinfo( $noid, # get minter information; level
$level ); # brief (default), full, or dump
Noid::getnoid( $noid, $varname ); # get arbitrary named internal
# variable
Noid::hold( $noid, $contact, # place or release hold; return
$on_off, @ids ); # 1 on success, 0 on error
Noid::hold_set( $noid, $id );
Noid::hold_release( $noid, $id );
Noid::parse_template( $template, # read template for errors, returning
$prefix, $mask, # namespace size (NOLIMIT=unbounded)
$gen_type, # or 0 on error; $message, $gen_type,
$message ); # $prefix, & $mask are output params
Noid::queue( $noid, $contact, # return strings for queue attempts
$when, @ids ); # (failures start "error:")
Noid::n2xdig( $num, $mask ); # show identifier matching ord. $num
Noid::sample( $noid, $num ); # show random ident. less than $num
Noid::scope( $noid ); # show range of ids inside the minter
print Noid::errmsg( $noid, $reset ); # print message from failed call
$reset = undef | 1; # use 1 to clear error message buffer
Noid::addmsg( $noid, $message ); # add message to error message buffer
Noid::logmsg( $noid, $message ); # write message to minter log
DESCRIPTION
This is very brief documentation for the Noid Perl module subroutines. For this early version of the software, it is indispensable to have the documentation for the noid utility (the primary user of these routines) at hand. Typically that can be viewed with
perldoc noid
while the present document can be viewed with
perldoc Noid
The noid utility creates minters (identifier generators) and accepts commands that operate them. A minter efficiently generates, tracks, and binds unique identifiers, which are produced without replacement in random or sequential order, and with or without a check character for detecting transcription errors. A minter can bind identifiers to arbitrary element names and element values that are either stored or produced upon retrieval from rule-based transformations of requested identifiers; the latter has application in identifier resolution.
Identifiers generated by these minters are also known as "noids" (nice opaque identifiers). Noid minters are suitable for the production and management of identifiers ranging from persistent, globally unique names -- ARKs, PURLs, URNs, Handles, LSIDs, etc. -- to short-lived, compact session keys (cf. UUIDs). Noid minters are very fast, scalable, easy to create and tear down, and have a relatively small footprint. They use BerkeleyDB as the underlying database.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 2433:
'=end' without a target? (Should be "=end later")