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