Acme-CPANModules-UUID
view release on metacpan or search on metacpan
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
{
module => 'Crypt::Misc',
description => <<'MARKDOWN',
This module from the <pm:CryptX> distribution has a function to create and check
v4 UUIDs.
The benchmark code creates 1000+1 v4 string UUIDs.
MARKDOWN
bench_code_template => 'Crypt::Misc::random_v4uuid() for 1..1000; Crypt::Misc::random_v4uuid()',
features => {
is_xs => 0,
is_pp => 1,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 1,
v4_secure_random => 1,
v4_rfc4122 => 1,
create_v5 => 0,
},
},
{
module => 'UUID',
description => <<'MARKDOWN',
This module generates DCE-compatible UUIDs, which according to RFC belongs to
the legacy variants.
The benchmark creates 1000+1 random UUIDs.
MARKDOWN
bench_code_template => 'my $uuid; UUID::generate_random($uuid) for 1..1000; UUID::generate_random($uuid); $uuid',
features => {
is_xs => 1,
is_pp => 0,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 0,
v4_secure_random => 0,
v4_rfc4122 => 0,
create_v5 => 0,
create_legacy => 1,
},
},
],
};
1;
# ABSTRACT: List of modules that can generate immutable universally unique identifier (UUIDs)
__END__
=pod
=encoding UTF-8
=head1 NAME
Acme::CPANModules::UUID - List of modules that can generate immutable universally unique identifier (UUIDs)
=head1 VERSION
This document describes version 0.011 of Acme::CPANModules::UUID (from Perl distribution Acme-CPANModules-UUID), released on 2023-10-30.
=head1 SYNOPSIS
To run benchmark with default option:
% bencher --cpanmodules-module UUID
To run module startup overhead benchmark:
% bencher --module-startup --cpanmodules-module UUID
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see L<bencher> or run C<bencher --help>.
=head1 DESCRIPTION
UUIDs (Universally Unique Identifiers), sometimes also called GUIDs (Globally
Unique Identifiers), are 128-bit numbers that can be used as permanent IDs or
keys in databases. There are several standards that specify UUID, one of which
is RFC 4122 (2005), which we will follow in this document.
UUIDs are canonically represented as 32 hexadecimal digits in the form of:
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
There are several variants of UUID. The variant information is encoded using 1-3
bits in the C<N> position. RFC 4122 defines 4 variants (0 to 3), two of which (0
and 3) are for legacy UUIDs, so that leaves variants 1 and 2 as the current
specification.
There are 5 "versions" of UUID for both variants 1 & 2, each might be more
suitable than others in specific cases. The version information is encoded in
the M position. Version 1 (v1) UUIDs are generated from a time and a node ID
(usually the MAC address); version 2 (v2) UUIDs from an identifier (group/user
ID), a time, and a node ID; version 4 (v4) UUIDs from a rando/mpseudo-random
number; version 3 (v3) UUIDs from hashing a namespace using MD5; version 5 (v5)
from hashing a namespace using SHA-1.
L<Data::UUID> should be your first choice, and when you cannot install XS
modules you can use L<UUID::Tiny> instead.
Aside from the modules listed as entries below, there are also:
L<App::UUIDUtils> (containing CLIs to create/check UUID), L<Data::GUID>
(currently just a wrapper for Data::UUID).
=head1 ACME::CPANMODULES ENTRIES
=over
=item L<Data::UUID>
Author: L<RJBS|https://metacpan.org/author/RJBS>
( run in 1.835 second using v1.01-cache-2.11-cpan-98e64b0badf )