[perl-cache commit] r565 - test for defined, not truth, so that key '0' works

0 views
Skip to first unread message

codesite...@google.com

unread,
May 13, 2009, 10:08:15 PM5/13/09
to perl-cach...@googlegroups.com
Author: swa...@pobox.com
Date: Wed May 13 16:53:38 2009
New Revision: 565

Modified:
trunk/lib/Cache/FileBackend.pm

Log:
test for defined, not truth, so that key '0' works

Modified: trunk/lib/Cache/FileBackend.pm
==============================================================================
--- trunk/lib/Cache/FileBackend.pm (original)
+++ trunk/lib/Cache/FileBackend.pm Wed May 13 16:53:38 2009
@@ -76,8 +76,8 @@

foreach my $unique_key ( $self->_get_unique_keys( $p_namespace ) )
{
- my $key = $self->_get_key_for_unique_key( $p_namespace, $unique_key )
or
- next;
+ my $key = $self->_get_key_for_unique_key( $p_namespace, $unique_key );
+ next if !defined($key);

push( @keys, $key );
}

Reply all
Reply to author
Forward
0 new messages