[Catalyst] Issues with Catalyst::Model::DBIC::Schema and overload

Bernhard Graf catalyst at augensalat.de
Wed Mar 8 18:38:40 CET 2006


Hi,

I just wrote my first piece of Catalyst code that uses DBIx::Class and 
Catalyst::Model::DBIC::Schema.

First tried to find() something from a table.
While this works fine with a plain DBIx::Class application, it fails 
when doing the same under Catalyst. I get:

Caught exception in My::Controller::User->find "Can't resolve method 
`???' overloading `""' in package `My::Model::DB::User' 
at /usr/lib/perl5/vendor_perl/5.8.5/Catalyst.pm line 1015."

My Table Class

My::Schema::User;
use base 'DBIx::Class';
use overload '""' => 'stringify';
[...]
sub stringify { shift->name }

There is a simple fix:
As soon as I remove the overload from the table class everything works.

But I like my overload ...

Can you help me?
(Cat 5.65, C:M:DBIC::Schema 0.08 and DBIx::Class 0.05007)
-- 
Bernhard Graf



More information about the Catalyst mailing list