Skip Menu |

This queue is for tickets about the POE-Component-Client-Keepalive CPAN distribution.

Report information
The Basics
Id: 63948
Status: resolved
Priority: 0/
Queue: POE-Component-Client-Keepalive

People
Owner: Nobody in particular
Requestors: icabrera [...] cpan.org
Cc: i.arbeca [...] gmail.com
AdminCc:

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



CC: i.arbeca [...] gmail.com
Subject: (in cleanup) Can't call method "free" on an undefined value
Hi, I am using Perl module Gungho, which relies on POE::Component::Connection::Keepalive. Sometimes I have the following error : (in cleanup) Can't call method "free" on an undefined value at /usr/local/share/perl/5.10.1/POE/Component/Connection/Keepalive.pm line 42 during global destruction. Here is the sample code : sub DESTROY { my $self = shift; $self->[CK_WHEEL] = undef; $self->[CK_MANAGER]->free($self->[CK_SOCKET]); ### line 42 } Replacing $self->[CK_MANAGER]->free($self->[CK_SOCKET]); by $self->[CK_MANAGER] && $self->[CK_MANAGER]->free($self->[CK_SOCKET]); solves the problem. Or can the problem be solved otherwise ? Regards Isabelle Cabrera
Perl doesn't guarantee a sane order of object destruction at cleanup time. I generally disregard "(in cleanup)" messages as a result. However, your patch is good, so I have applied it. The change will be in the next release, which should be soon. Thank you very much.