6edc6f3dedb9bc3db9fabd6e3741536b2c00027f
[dbsrgits/DBIx-Class-UUIDColumns.git] / lib / DBIx / Class / UUIDColumns / UUIDMaker / Win32API / GUID.pm
1 package DBIx::Class::UUIDColumns::UUIDMaker::Win32API::GUID;
2
3 use strict;
4 use warnings;
5
6 use base qw/DBIx::Class::UUIDColumns::UUIDMaker/;
7 use Win32API::GUID ();
8
9 sub as_string {
10     return Win32API::GUID::CreateGuid();
11 };
12
13 1;
14 __END__
15
16 =head1 NAME
17
18 DBIx::Class::UUIDColumns::UUIDMaker::Win32API::GUID - Create uuids using Win32API::GUID
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('::Win32API::GUID');
26
27 =head1 DESCRIPTION
28
29 This DBIx::Class::UUIDColumns::UUIDMaker subclass uses Win32API::GUID to
30 generate uuid strings in the following format:
31
32   098f2470-bae0-11cd-b579-08002b30bfeb
33
34 =head1 METHODS
35
36 =head2 as_string
37
38 Returns the new uuid as a string.
39
40 =head1 SEE ALSO
41
42 L<Win32API::GUID>
43
44 =head1 AUTHOR
45
46 Chris Laco <claco@chrislaco.com>
47
48 =head1 LICENSE
49
50 You may distribute this code under the same terms as Perl itself.