X-Git-Url: http://git.rot13.org/?p=perl-Redis.git;a=blobdiff_plain;f=lib%2FRedis.pm;h=8df6779a2d5b1ed08a897aaaedebcffa27a81bd0;hp=82aeae0469b0a02224ac53838c1e68a178f7ba88;hb=HEAD;hpb=49804f1841733d8eee5bae43b0d1e2e68aa4486b diff --git a/lib/Redis.pm b/lib/Redis.pm index 82aeae0..8df6779 100644 --- a/lib/Redis.pm +++ b/lib/Redis.pm @@ -153,7 +153,7 @@ sub AUTOLOAD { sub __read_bulk { my ($self,$len) = @_; - return undef if $len < 0; + return if $len < 0; my $v; if ( $len > 0 ) { @@ -168,7 +168,7 @@ sub __read_bulk { sub __read_multi_bulk { my ($self,$size) = @_; - return undef if $size < 0; + return if $size < 0; my $sock = $self->{sock}; $size--; @@ -372,6 +372,14 @@ See also L for tie interface. my $info_hash = $r->info; +=head1 ENCODING + +Since Redis knows nothing about encoding, we are forcing utf-8 flag on all data received from Redis. +This change is introduced in 1.2001 version. + +This allows us to round-trip utf-8 encoded characters correctly, but might be problem if you push +binary junk into Redis and expect to get it back without utf-8 flag turned on. + =head1 AUTHOR Dobrica Pavlinusic, C<< >>