[Catalyst] DBIx::Class, Class::DBI in catalyst wierdness.

Sebastian Riedel sri at oook.de
Thu Nov 10 01:06:05 CET 2005


Am 09.11.2005 um 18:49 schrieb Jesper Krogh:

>
> Hi
>
> I'm trying to grok this Catalyst-thing but I've ran into this  
> wierdness.
>
> I would like to use DBIx::Class and the loader functions from
> this class and when I do so from the perl-script and issues:
> my $loader = new DBIx::Class::Loader(
>     dsn => $conf->{dsn},
>     password => $conf->{password},
>     user => $conf->{user},
>     namespace => "App"
> );
>
> my $proj = App::Projects->find(148);
> print $proj->projectname() . "\n";
>
> It works fine.
>
> When I do the excact same thing from within Catalyst I get this
> errormessage:
> Use of uninitialized value in concatenation (.) or string at .. the  
> line
> where i print "projectname".
>
> -----
> use base 'Catalyst::Model::DBIC';
>
> __PACKAGE__->config(
>     dsn => Core->config->{dsn},
>     password => Core->config->{password},
>     user => Core->config->{user},
>     debug => 1
> );
>
> -----
>
> Switching to Class::DBI (and retrieve instead of find) in Catalyst
> solves the problem.
>
> According to the debug output of Catalyst the tables gets loaded
> fine, and I get all the classes (with debug I can see that the  
> attributes
> get parsed fine too).
>
> The database is a PostgreSQL-database.
>
> I'm new to all of this, so please let me know if I've missed something
> obvious?

Catalyst::Model::DBIC was completely borked.
I just uploaded a new working version (0.11) to CPAN.


--
sebastian




More information about the Catalyst mailing list