Sub::Contract::Memoizer - Implement the caching behaviour of a contract
See 'Sub::Contract'.
Subroutine contracts defined with Sub::Contract can memoize the contractor's results. This optional behaviour is implemented in Sub::Contract::Memoizer.
$contract->cache([size => $max_size])
$contract->has_cache([size => $max_size])
$contract->get_cache
$contract->clear_cache
$contract->add_to_cache(\@args, \@results)
$Id: Memoizer.pm,v 1.12 2009/06/16 12:23:58 erwan_lemonnier Exp $
Erwan Lemonnier <erwan@cpan.org>
<erwan@cpan.org>
See Sub::Contract.
To install Sub::Contract, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Contract
CPAN shell
perl -MCPAN -e shell install Sub::Contract
For more information on module installation, please visit the detailed CPAN module installation guide.