X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema.pm;h=19b49c36a56103299dcc08d16c7189a891da1b50;hb=6d701f86fb5c2681cf99ff64cc6c42000376b675;hp=fde0c114bfdcd2340eb680bc5638aa6e4cf7eebe;hpb=1c6f3f346bdf16248952259e8b7ffeb7bbeb3e6f;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index fde0c11..19b49c3 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -26,7 +26,7 @@ DBIx::Class::Schema - composable schemas package Library::Schema::CD; use base qw/DBIx::Class/; - __PACKAGE__->load_components(qw/PK::Auto Core/); # for example + __PACKAGE__->load_components(qw/PK::Auto::Pg Core/); # for example __PACKAGE__->table('cd'); # Elsewhere in your code: @@ -225,9 +225,10 @@ sub load_classes { =head3 Arguments: <@db_info> -This method takes a target namespace, as well as dbh connection info, -and creates a L class as well as subclasses for each of -your database classes in this namespace, using this connection. +This is the most important method in this class. it takes a target namespace, +as well as dbh connection info, and creates a L class as +well as subclasses for each of your database classes in this namespace, using +this connection. It will also setup a ->class method on the target class, which lets you resolve database classes based on the schema component name, for example @@ -284,19 +285,6 @@ sub compose_connection { return $schema; } -=head2 compose_namespace - -=head3 Arguments: - -Translates namespace into the specified namespace. -For example - - My::Schema->compose_connection('A::B::C', @conn_info); - -My::Schema::Tableclasses would become A::B::C::Tableclasses. - -=cut - sub compose_namespace { my ($self, $target, $base) = @_; my %reg = %{ $self->source_registrations };