Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Storable module used for?

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?

like image 244
Dynamic Avatar asked Nov 25 '25 09:11

Dynamic


1 Answers

Reasons that spring to mind:

  • Persist memory across script calls
  • Sharing variables across different processes (sometimes it isn't possible to pipe stuff)

Of course, that's not all that Storable does. It also:

  • Makes it possible to create deep clones of data structures
  • Serializes the data structure stored, which implies a smaller file footprint than output from Data::Dump
  • Is optimized for speed (so it's faster to retrieve than to require a file containing Data::Dump output
like image 116
Zaid Avatar answered Nov 26 '25 22:11

Zaid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!