Another way would be to use Dominus' excellent Memoize module. I wrote a review of the module: read the review of the Memoize module. Using it could be as simple as writing a function get_data_structure_from_database, saying memoize 'get_data_structure_from_database', and continuing to use that function!
In reply to Re: Using tie to initialize large datastructures
by ariels
in thread Using tie to initialize large datastructures
by htoug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |