[Catalyst] DBIx::Class, Class::DBI in catalyst wierdness.
Jesper Krogh
jesper at krogh.cc
Wed Nov 9 18:49:42 CET 2005
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?
Thanks
Jesper
--
Jesper Krogh
More information about the Catalyst
mailing list