| KiokuDB documentation | Contained in the KiokuDB distribution. |
KiokuDB::Role::UUIDs - UUID generation role.
with qw(KiokuDB::Role::UUIDs);
This role provides UUID assignment.
Depending on the $SERIAL_IDS variable being true at compile time, and
availability of UUID generation module (Data::UUID::LibUUID falling back to
Data::UUID) an implementation role is selected.
Create a new UUID
| KiokuDB documentation | Contained in the KiokuDB distribution. |
#!/usr/bin/perl package KiokuDB::Role::UUIDs; use Moose::Role; use Try::Tiny; use namespace::clean -except => 'meta'; if ( defined &KiokuDB::SERIAL_IDS and KiokuDB::SERIAL_IDS() ) { with qw(KiokuDB::Role::UUIDs::SerialIDs); } else { my $have_libuuid = try { require Data::UUID::LibUUID; 1 }; my $backend = $have_libuuid ? "LibUUID" : "DataUUID"; with "KiokuDB::Role::UUIDs::$backend"; } __PACKAGE__ __END__