----- Original Message ---- > From: Matt S Trout <[email protected]>
> Looking at perldoc Memoized, it can take a subref instead, and returns
> the wrapped routine, so:
>
> __PACKAGE__->meta->add_method('foo' => memoize(sub { __PACKAGE__ }));
Thanks Matt. That's what I need.
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
