Erwan Lemonnier > Sub-Contract-0.12 > Sub::Contract::Memoizer

Download:
Sub-Contract-0.12.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.12   Source  

NAME ^

Sub::Contract::Memoizer - Implement the caching behaviour of a contract

SYNOPSIS ^

See 'Sub::Contract'.

DESCRIPTION ^

Subroutine contracts defined with Sub::Contract can memoize the contractor's results. This optional behaviour is implemented in Sub::Contract::Memoizer.

API ^

See 'Sub::Contract'.

$contract->cache([size => $max_size])
$contract->has_cache([size => $max_size])
$contract->get_cache
$contract->clear_cache
$contract->add_to_cache(\@args, \@results)

SEE ALSO ^

See 'Sub::Contract'.

VERSION ^

$Id: Memoizer.pm,v 1.12 2009/06/16 12:23:58 erwan_lemonnier Exp $

AUTHOR ^

Erwan Lemonnier <erwan@cpan.org>

LICENSE ^

See Sub::Contract.

syntax highlighting: