On 11/8/06, Matt S Trout <[EMAIL PROTECTED]> 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.
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/