[Catalyst] ::Model::SomeTable->some_method() problem
Chisel Wright
chisel at herlpacker.co.uk
Mon Jul 10 15:42:22 CEST 2006
Firstly, this was working on the train this morning (before I upgraded
to the 5.7000 release).
Secondly, yes I should have upgraded to a -dev version and tested this
before now.
Right, onto the problem.
I have:
--------
package Parley::Model::ParleyDB::Post;
...
sub last_post_in_list {
...
}
...
1;
--------
and in Parley::Controller::Thread I have:
--------
$last_post = $c->model('ParleyDB')->table('post')->last_post_in_list(
$c->stash->{post_list}
);
--------
Up until this morning, the call worked just fine, however since
upgrading to 5.7000 I'm getting the application debug screen with the
following error:
--------
Caught exception in Parley::Controller::Thread->view "Can't locate
object method "last_post_in_list" via package
"Parley::Model::ParleyDB::Post" at
/home/chisel/development/svk/parley/script/../lib/Parley/Controller/Thread.pm
line 74."
--------
I've added a can_ok() test t/model_Parley-Post.t which passes with
last_post_in_list in the function list.
I'm not using Schema stuff (yet), I'd like to move in that direction,
but I haven't taken the time to find out how to do this yet. At the
moment I have:
--------
package Parley::Model::ParleyDB;
use strict;
use base 'Catalyst::Model::DBIC';
__PACKAGE__->config(
dsn => 'dbi:Pg:dbname=parley',
user => 'parley',
password => undef,
options => {
AutoCommit => 1,
},
relationships => 1,
debug => 0,
);
--------
The only thing that's changed since I got off the train this morning is
my upgrade to 5.7. Any ideas?
Chisel
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
This is not an automated signature. I type this in to the bottom of every
message.
More information about the Catalyst
mailing list