Updated UUID* module documentation
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UUIDMaker / Data / UUID.pm
CommitLineData
947acfd9 1package DBIx::Class::UUIDMaker::Data::UUID;
2use base qw/DBIx::Class::UUIDMaker/;
3use Data::UUID ();
4
5sub as_string {
6 return Data::UUID->new->to_string(Data::UUID->new->create);
7};
8
91;
e78f023a 10__END__
11
12=head1 NAME
13
14DBIx::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
25This DBIx::Class::UUIDMaker subclass uses Data::UUID to generate uuid
26strings in the following format:
27
28 098f2470-bae0-11cd-b579-08002b30bfeb
29
30=head1 METHODS
31
32=head2 as_string
33
34Returns the new uuid as a string.
35
36=head1 SEE ALSO
37
38L<Data::UUID>
39
40=head1 AUTHOR
41
42Chris Laco <claco@chrislaco.com>
43
44=head1 LICENSE
45
46You may distribute this code under the same terms as Perl itself.