[Catalyst] Chained actions usage and DBIC performance

Nilson Santos Figueiredo Junior acid06 at gmail.com
Wed Nov 8 23:44:37 GMT 2006


On 11/8/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> >  sub load : Chained('/item') PathPart('') CaptureArgs(1) {
> >    my ($self, $c, $id) = @_;
>       my $pre = $c->stash->{prefetches} = {};
>       $c->stash->{item} = Scalar::Defer::lazy { $c->model('DB')->search(undef,
> $pre)->find($id) };
> >  }

These are the sort of things that make me love Perl. Thanks a lot.

Are there any known issues regarding this module? Because if not, I
guess I'll probably start stuffing lazy calls inside my chained
actions tomorrow. ;-)

-Nilson Santos F. Jr.



More information about the Catalyst mailing list