MESSAGE
DATE | 2020-12-23 |
FROM | David Cantrell
|
SUBJECT | Re: [Hangout - NYLXS] CFP NY.PM Technical Meetup
|
On 24/12/2020 00:03, Jacob Salomon wrote:
> Another idea might be the subject of the "tie", where accessing a > variable triggers a lot of action. When I first heard about it I > thought is was just an obfuscation. And then I noticed (in CPAN) a few > tidbits, like Tie::File, Tie::DBI. A few I can't recall the names of > but there's one that stashes most of huge array in a file and keeps only > a subset in memory, swapping in and out as needed. Or the one that > keeps the return values of a function for later retrieval. (Recursive > Taylor series, anyone?)
The most useful use of tie() I've come across is DBM::Deep. It gives you what behaves like a standard perl data structure, a hashref or arrayref that in turn contains scalars, hashrefs, and arrayrefs, nested as deep as you like, but the data lives in a file on disk instead of in memory.
If you are memory-constrained, and if you're willing for data access to be a lot slower, it's a great tool.
-- David Cantrell
**Majordomo list services provided by PANIX ** **To Unsubscribe, send "unsubscribe ny" to majordomo-at-lists.pm.org** _______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
|
|