[Catalyst] Catalyst 5.7012
Jonathan Rockway
jon at jrock.us
Mon Dec 24 14:01:04 GMT 2007
On Mon, 2007-12-24 at 13:57 +0000, Anthony Gardner wrote:
> but the same happens with $c->model('Person')->all()
>
> 30: sub list : Local {
> 31: my ($self, $c) = @_;
> 32:
> 33: $c->stash->{people} = [$c->model('Person')->all()];
> 34:
> 35: $c->stash->{template} = 'people/list.tt2';
> 36: }
>
>
> plus the docs have ........
> $c->model('MyAppDB::Book')->all
> TIP: You may see the $c->model('MyAppDB::Book') used above written as $c->model('MyAppDB')->resultset('Book). The two are equivalent.
> Maybe I should just take a break now for crimbo!!
You named your model Person, not TestAppDB. So you can say
$c->model('Person::Person')->all or
$c->model('Person')->resultset('Person')->all. Not any of the things
you put in your code.
This probably worked before because catalyst falls back to a regex
search for components, but it's very flaky is considered a bug.
Anyway, I highly suggest you rename your model to TestAppDB, because
then you won't be as confused.
Regards,
Jonathan Rockway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071224/0fd248c6/attachment.pgp
More information about the Catalyst
mailing list