Merge 'trunk' into 'DBIx-Class-current'
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UUIDMaker / APR / UUID.pm
CommitLineData
947acfd9 1package DBIx::Class::UUIDMaker::APR::UUID;
bf5ecff9 2
3use strict;
4use warnings;
5
947acfd9 6use base qw/DBIx::Class::UUIDMaker/;
7use APR::UUID ();
8
9sub as_string {
10 return APR::UUID->new->format;
11};
12
131;
e78f023a 14__END__
15
16=head1 NAME
17
18DBIx::Class::UUIDMaker::APR::UUID - Create uuids using APR::UUID
19
20=head1 SYNOPSIS
21
22 package Artist;
23 __PACKAGE__->load_components(qw/UUIDColumns Core DB/);
24 __PACKAGE__->uuid_columns( 'artist_id' );
25 __PACKAGE__->uuid_class('::APR::UUID');
26
27=head1 DESCRIPTION
28
29This DBIx::Class::UUIDMaker subclass uses APR::UUID to generate uuid
30strings in the following format:
31
32 098f2470-bae0-11cd-b579-08002b30bfeb
33
34=head1 METHODS
35
36=head2 as_string
37
38Returns the new uuid as a string.
39
40=head1 SEE ALSO
41
42L<APR::UUID>
43
44=head1 AUTHOR
45
46Chris Laco <claco@chrislaco.com>
47
48=head1 LICENSE
49
50You may distribute this code under the same terms as Perl itself.