Tie::Memoize(3p) Perl Programmers Reference Guide Tie::Memoize(3p)
Tie::Memoize(3p) Perl Programmers Reference Guide Tie::Memoize(3p) # Tie::Memoize(3p) Perl Programmers Reference Guide Tie::Memoize(3p) NNAAMMEE # Tie::Memoize - add data to hash when needed SSYYNNOOPPSSIISS # require Tie::Memoize; tie %hash, 'Tie::Memoize', \&fetch, # The rest is optional $DATA, \&exists, {%ini_value}, {%ini_existence}; DDEESSCCRRIIPPTTIIOONN # This package allows a tied hash to autoload its values on the first access, and to use the cached value on the following accesses. Only read-accesses (via fetching the value or "exists") result in calls to the functions; the modify-accesses are performed as on a normal hash. ...