URI::urn::uuid - UUID URN Namespace
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 );
URI::urn::uuid is an URI class that implement UUID URN namespace.
$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 = $uri->uuid_binary;
Returns UUID as a 128 bit binary. Returns undef if the given UUID format is invalid.
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.ietf.org/rfc/rfc4122.txt, Data::UUID
To install URI::urn::uuid, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI::urn::uuid
CPAN shell
perl -MCPAN -e shell install URI::urn::uuid
For more information on module installation, please visit the detailed CPAN module installation guide.