my @to_register;
{
- no warnings qw/redefine/;
- local *Class::C3::reinitialize = sub { } if DBIx::Class::_ENV_::OLD_MRO;
- use warnings qw/redefine/;
-
# ensure classes are loaded and attached in inheritance order
for my $result_class (values %$results_by_source_name) {
$class->ensure_class_loaded($result_class);
.'with no corresponding Result class';
}
- Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO;
-
$class->register_class(@$_) for (@to_register);
return;
my @to_register;
{
- no warnings qw/redefine/;
- local *Class::C3::reinitialize = sub { } if DBIx::Class::_ENV_::OLD_MRO;
- use warnings qw/redefine/;
-
foreach my $prefix (keys %comps_for) {
foreach my $comp (@{$comps_for{$prefix}||[]}) {
my $comp_class = "${prefix}::${comp}";
}
}
}
- Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO;
foreach my $to (@to_register) {
$class->register_class(@$to);
#$schema->class_mappings({});
{
- no warnings qw/redefine/;
- local *Class::C3::reinitialize = sub { } if DBIx::Class::_ENV_::OLD_MRO;
- use warnings qw/redefine/;
-
foreach my $source_name ($self->sources) {
my $orig_source = $self->source($source_name);
for qw(class source resultset);
}
- Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO;
+ # needed to cover the newly installed stuff via quote_sub above
+ Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO;
# Give each composed class yet another *schema-less* source copy
# this is used for the freeze/thaw cycle
my $schema = $self->compose_namespace($target, 'DBIx::Class::ResultSetProxy');
quote_sub "${target}::schema", '$s', { '$s' => \$schema };
+ # needed to cover the newly installed stuff via quote_sub above
+ Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO;
+
$schema->connection(@info);
foreach my $source_name ($schema->sources) {
my $source = $schema->source($source_name);