From: Thomas Kratz Date: Thu, 18 May 2006 15:55:14 +0000 (+0000) Subject: Imported initial directory structure X-Git-Tag: v0.01001~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbf59b953cb1192aef400bf60dbc22ae78b80f1d;p=dbsrgits%2FDBIx-Class-UUIDColumns.git Imported initial directory structure --- diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..07ff45f --- /dev/null +++ b/Build.PL @@ -0,0 +1,27 @@ +use strict; +use Module::Build; + +my %arguments = ( + create_makefile_pl => 'passthrough', + license => 'perl', + module_name => 'DBIx::Class::UUIDColumns', + requires => { + 'DBIx::Class' => 0.06002, + }, + build_requires => { + 'DBD::SQLite' => 1.11, + }, + recommends => { + 'Data::UUID' => 0, + 'APR::UUID' => 0, + 'UUID' => 0, + 'Win32::Guidgen' => 0, + 'Win32API::GUID' => 0, + }, + create_makefile_pl => 'passthrough', + create_readme => 1, + test_files => [ glob('t/*.t')] +); + +Module::Build->new(%arguments)->create_build_script; + diff --git a/Changes b/Changes new file mode 100644 index 0000000..a7e6df0 --- /dev/null +++ b/Changes @@ -0,0 +1,4 @@ +Revision history for DBIx::Class::UUIDColumns + +0.00001 2006-05-17 11:00:00 + - initial release \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..3a7f64a --- /dev/null +++ b/README @@ -0,0 +1,68 @@ +NAME + DBIx::Class::UUIDColumns - Implicit uuid columns + +SYNOPSIS + package Artist; + __PACKAGE__->load_components(qw/UUIDColumns Core DB/); + __PACKAGE__->uuid_columns( 'artist_id' ); + +DESCRIPTION + This DBIx::Class component resembles the behaviour of Class::DBI::UUID, + to make some columns implicitly created as uuid. + + When loaded, "UUIDColumns" will search for a suitable uuid generation + module from the following list of supported modules: + + Data::UUID + APR::UUID* + UUID + Win32::Guidgen + Win32API::GUID + + If no supporting module can be found, an exception will be thrown. + + *APR::UUID will not be loaded under OpenBSD due to an as yet + unidentified XS issue. + + If you would like to use a specific module, you can set "uuid_class": + + __PACKAGE__->uuid_class('::Data::UUID'); + __PACKAGE__->uuid_class('MyUUIDGenerator'); + + Note that the component needs to be loaded before Core. + +METHODS + uuid_columns(@columns) + Takes a list of columns to be filled with uuids during insert. + + __PACKAGE__->uuid_columns('id'); + + uuid_class($classname) + Takes the name of a UUIDMaker subclass to be used for uuid value + generation. This can be a fully qualified class name, or a shortcut name + starting with :: that matches one of the available + DBIx::Class::UUIDMaker subclasses: + + __PACKAGE__->uuid_class('CustomUUIDGenerator'); + # loads CustomeUUIDGenerator + + __PACKAGE->uuid_class('::Data::UUID'); + # loads DBIx::Class::UUIDMaker::Data::UUID; + + Note that "uuid_class" chacks to see that the specified class isa + DBIx::Class::UUIDMaker subbclass and throws and exception if it isn't. + + uuid_maker + Returns the current UUIDMaker instance for the given module. + + my $uuid = __PACKAGE__->uuid_maker->as_string; + +SEE ALSO + DBIx::Class::UUIDMaker + +AUTHORS + Chia-liang Kao Chris Laco + +LICENSE + You may distribute this code under the same terms as Perl itself. + diff --git a/TODO b/TODO new file mode 100644 index 0000000..e69de29