Class-DBI-UUID
view release on metacpan or search on metacpan
lib/Class/DBI/UUID.pm view on Meta::CPAN
This module implements globally unique columns values. When an object
is created, the columns specified are given unique IDs. This is particularly
helpful when running in an environment where auto incremented primary
keys won't work, such as multi-master replication.
=cut
use base qw[Exporter Class::Data::Inheritable];
use vars qw[@EXPORT $VERSION];
$VERSION = sprintf "%d.%02d", split m/\./, (qw$Revision: 1.1 $)[1];
@EXPORT = qw[uuid_columns uuid_columns_type];
use Data::UUID;
=head2 uuid_columns
MyApp::User->uuid_columns(MyApp::User->columns('Primary'));
A C<before_create> trigger will be set up to set the values of each column
listed as input to a C<Data::UUID> string. Change the type of string output
( run in 0.490 second using v1.01-cache-2.11-cpan-ceb78f64989 )