Updated UUID* module documentation
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UUIDMaker / Data / UUID.pm
1 package DBIx::Class::UUIDMaker::Data::UUID;
2 use base qw/DBIx::Class::UUIDMaker/;
3 use Data::UUID ();
4
5 sub as_string {
6     return Data::UUID->new->to_string(Data::UUID->new->create);
7 };
8
9 1;
10 __END__
11
12 =head1 NAME
13
14 DBIx::Class::UUIDMaker::Data::UUID - Create uuids using Data::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('::Data::UUID');
22
23 =head1 DESCRIPTION
24
25 This DBIx::Class::UUIDMaker subclass uses Data::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<Data::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.