Revision history for Perl extension DBIx::Class::Schema::Loader
+0.02007 Not yet released
+ - Backported Class::C3::reinitialize changes from branch,
+ resulting in significantly reduced load time
+
0.02006 Fri Mar 17 04:55:55 UTC 2006
- Fix long-standing table/col-name case bugs
---
name: DBIx-Class-Schema-Loader
-version: 0.02006
+version: 0.02007
author:
- 'Brandon Black, C<blblack@gmail.com>'
abstract: Dynamic definition of a DBIx::Class::Schema
provides:
DBIx::Class::Schema::Loader:
file: lib/DBIx/Class/Schema/Loader.pm
- version: 0.02006
+ version: 0.02007
DBIx::Class::Schema::Loader::DB2:
file: lib/DBIx/Class/Schema/Loader/DB2.pm
DBIx::Class::Schema::Loader::Generic:
file: lib/DBIx/Class/Schema/Loader/Writing.pm
DBIx::Class::Schema::Loader::mysql:
file: lib/DBIx/Class/Schema/Loader/mysql.pm
-generated_by: Module::Build version 0.2612
+generated_by: Module::Build version 0.2611
# 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
-our $VERSION = '0.02006';
+our $VERSION = '0.02007';
__PACKAGE__->mk_classaccessor('loader');
$self->{_tables} = \@tables;
foreach my $table (@tables) {
-
my ($db_schema, $tbl) = split /\./, $table;
if($tbl) {
$table = $self->drop_db_schema ? $tbl : $table;
my $table_moniker = $self->_table2moniker($db_schema, $tbl);
my $table_class = $schema . q{::} . $table_moniker;
+ $self->classes->{$lc_table} = $table_class;
+ $self->monikers->{$lc_table} = $table_moniker;
+ $self->classes->{$table} = $table_class;
+ $self->monikers->{$table} = $table_moniker;
+
+ no warnings 'redefine';
+ local *Class::C3::reinitialize = sub { };
+ use warnings;
+
{ no strict 'refs';
@{"${table_class}::ISA"} = qw/DBIx::Class/;
}
$table_class->load_resultset_components(@{$self->resultset_components})
if @{$self->resultset_components};
$self->_inject($table_class, @{$self->left_base_classes});
+ }
+
+ Class::C3::reinitialize;
+
+ foreach my $table (@tables) {
+ my $table_class = $self->classes->{$table};
+ my $table_moniker = $self->monikers->{$table};
warn qq/\# Initializing table "$table" as "$table_class"\n/
if $self->debug;
if $self->debug && @$pks;
$schema->register_class($table_moniker, $table_class);
- $self->classes->{$lc_table} = $table_class;
- $self->monikers->{$lc_table} = $table_moniker;
- $self->classes->{$table} = $table_class;
- $self->monikers->{$table} = $table_moniker;
}
}