[Catalyst] Chained actions usage and DBIC performance
Matt S Trout
dbix-class at trout.me.uk
Fri Nov 10 08:21:59 GMT 2006
Nilson Santos Figueiredo Junior wrote:
> 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. ;-)
Don't believe so, and it's audreycode so *usually* works first time. Plus I
know a few active users in the Cat community and it's getting lots of use in
Jifty, so I'm betting it's pretty solid.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list