Skip Menu |

This queue is for tickets about the Catalyst-Model-DBIC-Schema CPAN distribution.

Report information
The Basics
Id: 65791
Status: resolved
Priority: 0/
Queue: Catalyst-Model-DBIC-Schema

People
Owner: Nobody in particular
Requestors: moseley [...] hank.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.48
Fixed in: (no value)



Subject: $class->isa called before $class is loaded.
Catalyst::TraitFor::Model::DBIC::Schema::Replicated does this: # check storage_type compatibility (if configured) if (my $storage_type = $self->storage_type) { my $class = $storage_type =~ /^::/ ? "DBIx::Class::Storage$storage_type" : $storage_type; croak "This storage_type cannot be used with replication" unless $class->isa('DBIx::Class::Storage::DBI::Replicated'); } else { $self->storage_type('::DBI::Replicated'); } But DBIx::Class::Schema does not load the storage_type class until $schema->connection is called. So if you have a custom storage_type that is not loaded by other means then the above code will croak. I suspect Calling Class::MOP::load_class( $class ) should be done before calling isa on $class.
Fixed in 0.49, thanks for the report.