Hi folks,

I installed Catalyst on a new machine yesterday and Catalyst was
unable to load the Schema. Using the perl debugger I detected that the


Is choking with (circa line 40 in most latest versions):

return @options
if $self->get_method('new')->isa('Class::MOP::Method::Wrapped');

Since DBIC::Schema does not have a new() method this simply explodes.

Perhaps they should be checking with $metaclass->has_method to check
first or using $metaclass->find_method_by_name if their intention was
for new to be in a superclass.

Anyway, since I wasn't sure, I just added a dummy new() to
DBIC::Schema and everything works fine now.

I am posting this here because this wrapper is created by the
xxx_create.pl model DBIC... script for my static models so maybe it
has a better chance of showing up in Catalyst than in other
MooseX::NonMoose wrapped code, and I'm pretty sure that no other
prominent/popular project is wrapping DBIC::Schema with Moose. I will
also notify the author to see his take on this.

Maybe it's set-up thing on our end (e.g. some version mixup) or is an
actual bug. I can't say for sure and sadly don't have the time to look
at previous versions.
But just from looking at that particular line, it would seem to me at
least that this role is really assuming the consumer class to actually
have a new() method, and there are probably many libraries on the CPAN
that don't, even if the offer an object-oriented interface.

Alejandrpo Imass

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJan 22, '11 at 1:56p
activeJan 22, '11 at 1:56p

1 user in discussion

Alejandro Imass: 1 post



site design / logo © 2023 Grokbase