Skip Menu |

This queue is for tickets about the Cache-FastMmap CPAN distribution.

Report information
The Basics
Id: 23491
Status: resolved
Priority: 0/
Queue: Cache-FastMmap

People
Owner: Nobody in particular
Requestors: jackal [...] desalvia.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.14
Fixed in: (no value)



Subject: cache_not_found problem
Hello! When using cache_not_found param, i've got these errors: Use of uninitialized value in length at /usr/local/lib/perl5/site_perl/ 5.8.8/mach/Cache/FastMmap.pm line 539. Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/ site_perl/5.8.8/mach/Cache/FastMmap.pm line 542. I'm using Cache::FastMmap for caching files and I want to cache nonexistense of some files too. If file not exists, callback function read_cb returned undef, and problem is in this code: # It's true because of I'm using cache_not_found if (defined $Val || $Self->{cache_not_found}) { # Are we doing writeback's? If so, need to mark as dirty in cache my $write_back = $Self->{write_back}; # If not using raw values, use freeze() to turn data $Val = freeze(\$Val) if !$Self->{raw_values}; # Get key/value len (we've got 'use bytes'), and do expunge check to # create space if needed my $KVLen = length($_[1]) + length($Val); Error in code: length($Val) because of $Val is undefined You say about read_cb: "Should return the value to use. This value will be saved in the cache for future retrievals. Return undef if there is no value for the given key" and I'm returning undef
I've just released 1.15 which should resolve this issue