Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: caching hashrefs in state

by mhearse (Chaplain)
on Apr 22, 2014 at 22:08 UTC ( [id://1083238]=note: print w/replies, xml ) Need Help??


in reply to caching hashrefs in state

I tend to roll even small scripts into a module. And set needed values as module attributes. These of course persist across methods. And they are only initiated once.

my $self = shift; $self{attr_name} = your_data_structure;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-25 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found