NAME

URI::urn::uuid - UUID URN Namespace

SYNOPSIS

use URI;
use URI::urn::uuid;

my $uri = URI->new("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6");
$uri->uuid;        # f81d4fae-7dec-11d0-a765-00a0c91e6bf6
$uri->uuid_binary; # in 128 bit binary form of Data::UUID

$uri = URI->new("urn:uuid:");
$uri->uuid( lc Data::UUID->new->create_str );

DESCRIPTION

URI::urn::uuid is an URI class that implement UUID URN namespace.

METHODS

uuid
$uuid = $uri->uuid;
$old  = $uri->uuid($new);

Returns UUID string as a canonicalized, lowercase form. If the given UUID format is invalid, it just returns undef.

uuid_binary
$uuid_binary = $uri->uuid_binary;

Returns UUID as a 128 bit binary. Returns undef if the given UUID format is invalid.

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

http://www.ietf.org/rfc/rfc4122.txt, Data::UUID