Changeset 796

Show
Ignore:
Timestamp:
11/24/08 22:45:52 (12 months ago)
Author:
henrylyne
Message:

Remove change to default val to empty string.
Insert warning with memkey to help debug.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/api/perl/lib/Cache/Memcached.pm

    r795 r796  
    1919use Errno qw( EINPROGRESS EWOULDBLOCK EISCONN ); 
    2020use Cache::Memcached::GetParser; 
     21use Carp qw(carp croak); 
    2122use fields qw{ 
    2223    debug no_rehash stats compress_threshold compress_enable stat_callback 
     
    442443    my Cache::Memcached $self = shift; 
    443444    my ($key, $val, $exptime) = @_; 
    444     $val = '' unless (defined $val); 
     445    carp "value for memkey:$key is not defined" unless (defined $val); 
    445446    return 0 if ! $self->{'active'} || $self->{'readonly'}; 
    446447    my $stime = Time::HiRes::time() if $self->{'stat_callback'};