Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Proxying (almost) all methods in a class for mass memoization

by tobyink (Canon)
on Aug 16, 2018 at 03:25 UTC ( [id://1220399]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
          return $outputs->{ $call_key } if defined $outputs->{ $call_key 
    +};
    
          $outputs->{ $call_key } = $self->$orig( @args );
    
          return $outputs->{ $call_key };
    
  2. or download this
          return( $outputs->{$call_key} //= $self->$orig(@args) );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220399]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-19 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found