[Catalyst] Feelnig dumb: $c->model returns controller?
Alex Povolotsky
tarkhil at over.ru
Sat Feb 23 22:48:16 GMT 2008
Alex Povolotsky wrote:
> Hello!
>
> I'm still writing my first Catalyst app; I'm beginning to love DBIx,
> and the overall concept.
>
> But.
>
> my $lmodel = $c->model('Location');
> use Data::Dumper;
> print STDERR Dumper($lmodel);
> my $locs = $lmodel->search(undef); # Sort by follows, if
> required
> Caught exception in Traffic2::C::Location->list "Can't locate object
> method "search" via package "Traffic2::C::Location" at
> /usr/local/traffic/Traffic2/script/../lib/Traffic2/C/Location.pm line
> 36."
>
> $VAR1 = bless( {
> '_application' => 'Traffic2'
> }, 'Traffic2::C::Location' );
>
>
> With DailySummary, everything works just fine. I've added Location
> model after DailySummary, but can it be the difference?...
>
Some side effect. I've removed several unused modules, regenerated
everything, it's ok
Alex.
More information about the Catalyst
mailing list