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