Subject: | Can't store non reference data in cache |
I used Cache::FastMmap to store integer values in the cache, and it complained that it can only store references.
For example:
use Cache::FastMmap;
my $c = Cache::FastMmap->new;
$c->set( bar => 1);
yields:
not a reference at /Library/Perl/5.8.6/darwin-thread-multi-2level/Cache/FastMmap.pm line 570
My ugly workaround is to store
$c->set( bar => { value => 1 } );
but this reduces the readability of the code by a lot.