Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Caching Format

by FloydATC (Chaplain)
on Jan 13, 2012 at 13:59 UTC ( #947740=note: print w/ replies, xml ) Need Help??


in reply to Caching Format

If even SQLite is overkill, how about just using Storable? I've used this in a couple of places where I just wanted my script to "remember" a single hash between runs and didn't have to worry about concurrency etc. All it really does is save you the trouble of formatting/parsing the file.

use Storable; store \%table, 'file'; $hashref = retrieve('file');

-- Time flies when you don't know what you're doing


Comment on Re: Caching Format
Download Code
Re^2: Caching Format
by afoken (Prior) on Jan 14, 2012 at 07:27 UTC

    Just keep in mind that Storable is specific to the perl version (version number + configuration + platform) it was compiled against. Changing the perl version may cause trouble. So Storable is ok for local temp data, but not as a transport format.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2015-07-03 22:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls