Subject: | get_and_set: the $DidStore variable will be allways 0 |
Date: | Wed, 29 Jun 2016 15:26:47 +0200 |
To: | bug-Cache-FastMmap [...] rt.cpan.org |
From: | Robert Ziegler <rz [...] SoftPoint.de> |
hi,
I think there is a bug in get_and_set( $Key, $Sub):
the $DidStore variable will be allways 0
because there is another $DidStore localy defined inside the if(@NewValue) block
Cache-FastMmap-1.44
my $DidStore = 0;
if (@NewValue) {
($Value) = @NewValue;
my $DidStore = $Self->set($_[1], $Value, { skip_lock => \$Unlock }); # <-- $DidStore localy defined
}
return wantarray ? ($Value, $DidStore) : $Value;
Message body not shown because it is not plain text.