Skip Menu |

This queue is for tickets about the CHI CPAN distribution.

Report information
The Basics
Id: 63699
Status: resolved
Priority: 0/
Queue: CHI

People
Owner: Nobody in particular
Requestors: forrest [...] cpan.org
Cc: forrest.cahoon [...] gmail.com
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.36
Fixed in: (no value)



CC: forrest.cahoon [...] gmail.com
Subject: Error in purge
I don't know too much about CHI internals, but once I upgraded to 0.36 I had a problem with purge() in some code I maintain Can't call is_expired() on an undefined value I added a definedness test which fixed the problem: here's the patch --- Driver.pm.bk 2010-12-07 07:30:57.000000000 -0600 +++ Driver.pm 2010-12-07 07:39:59.000000000 -0600 @@ -403,7 +403,7 @@ my ($self) = @_; foreach my $key ( $self->get_keys() ) { - if ( $self->get_object($key)->is_expired() ) { + if ( defined $self->get_object($key) && $self->get_object($key)->is_expired() ) { $self->remove($key); } } I'm not sure that's the "right" way to fix the issue, but it works.
Fixed as suggested - thanks.