projects
/
perl-Redis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix warnings
[perl-Redis.git]
/
lib
/
Redis.pm
diff --git
a/lib/Redis.pm
b/lib/Redis.pm
index
a35d14e
..
6a6d278
100644
(file)
--- a/
lib/Redis.pm
+++ b/
lib/Redis.pm
@@
-83,12
+83,13
@@
sub AUTOLOAD {
if ( defined $bulk_command->{$command} ) {
my $value = pop;
if ( defined $bulk_command->{$command} ) {
my $value = pop;
+ $value = '' if ! defined $value;
$send
= uc($command)
. ' '
. join(' ', @_)
. ' '
$send
= uc($command)
. ' '
. join(' ', @_)
. ' '
- . length(
$value
)
+ . length(
$value
)
. "\r\n$value\r\n"
;
} else {
. "\r\n$value\r\n"
;
} else {
@@
-121,7
+122,9
@@
sub AUTOLOAD {
}
return $hash;
} elsif ( $command eq 'keys' ) {
}
return $hash;
} elsif ( $command eq 'keys' ) {
- return split(/\s/, __sock_read_bulk($result));
+ my $keys = __sock_read_bulk($result);
+ return split(/\s/, $keys) if $keys;
+ return;
}
if ( $type eq '-' ) {
}
if ( $type eq '-' ) {