On Thu, May 14, 2009 at 02:44:31AM -0700, Ovid wrote:
> 
> ----- Original Message ----
> 
> > From: Matt S Trout <dbix-cl...@trout.me.uk>
> 
> > 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.

Hey, Dave, where would it be good to put this in the docs so Ovid knows
which file to patch?

I figure we want to use this as a specific example of a general thing to
know in roles, right?

-- 
        Matt S Trout         Catalyst and DBIx::Class consultancy with a clue
     Technical Director      and a commit bit: http://shadowcat.co.uk/catalyst/
 Shadowcat Systems Limited
  mst (@) shadowcat.co.uk        http://shadowcat.co.uk/blog/matt-s-trout/

Reply via email to