I am having a hard time understanding what Storable
does.
I know that it "stores" a variable into your disk, but why would I need to do that? What would I use this module for, and how would I do it?
I am having a hard time understanding what Storable
does.
I know that it "stores" a variable into your disk, but why would I need to do that? What would I use this module for, and how would I do it?
One example:
Your program spends a long time populating your data structure, a graph, or trie, and if the program crashes then you'd lose it all and have to start again from square one. To avoid losing this data and be able to continue where it stopped last time you can save a snapshot of the data to a file manually or just simply use Storable.
Reasons that spring to mind:
Of course, that's not all that
Storable
does. It also:Data::Dump
retrieve
than torequire
a file containingData::Dump
output