X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader.pm;h=a9a4b35cedefe4b14d4c79604a6934b8f6ce7d91;hb=738705c6bb0694340d843228ed463031e266b758;hp=1a67c82d0f47435d018fcdb62ea388bf807343e0;hpb=3980d69cf47c52545a4930e69a217b3087dce1a8;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index 1a67c82..a9a4b35 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -2,17 +2,15 @@ package DBIx::Class::Schema::Loader; use strict; use warnings; +use base qw/DBIx::Class::Schema/; +use base qw/Class::Data::Accessor/; use Carp; use UNIVERSAL::require; -use vars qw($VERSION); - # Always remember to do all digits for the version even if they're 0 # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports # brain damage and presumably various other packaging systems too -$VERSION = '0.01000'; - -use base qw/DBIx::Class::Schema/; +our $VERSION = '0.01004'; __PACKAGE__->mk_classaccessor('loader'); @@ -60,11 +58,18 @@ DBIx::Class::Schema::Loader - Dynamic definition of a DBIx::Class::Schema # table-to-classname mappings. my $classes = $schema1->loader->classes; - # Use the schema as per normal for L + # Use the schema as per normal for DBIx::Class::Schema my $rs = $schema1->resultset($monikers->{table_table})->search(...); =head1 DESCRIPTION +THIS IS A DEVELOPMENT RELEASE. This is 0.01xxx, the first public +releases. Expect things to be broken in various ways. Expect the +entire design to be fatally flawed. Expect the interfaces to change if +it becomes neccessary. It's mostly here for people to poke at it and +find the flaws in it. 0.02 will hopefully have some sanity when we get +there. + DBIx::Class::Schema::Loader automates the definition of a DBIx::Class::Schema by scanning table schemas and setting up columns and primary keys. @@ -74,10 +79,8 @@ L for more, and L for notes on writing your own db-specific subclass for an unsupported db. -This module requires DBIx::Class::Loader 0.5 or later, and obsoletes -L for L version 0.5 and later. - -=cut +This module requires L 0.05 or later, and obsoletes +L for L version 0.05 and later. =head1 METHODS @@ -105,13 +108,22 @@ sub load_from_connection { $args{schema} = $class; $class->loader($impl->new(%args)); + $class->loader->load; } +=head2 loader + +This is an accessor in the generated Schema class for accessing +the L -based loader object +that was used during construction. See the +L docs for more information +on the available loader methods there. + =head1 AUTHOR -Brandon Black, C +Brandon Black, C -Sebastian Riedel, C (DBIx::Class::Loader, which this module is branched from) +Based on L by Sebastian Riedel Based upon the work of IKEBE Tomohiro