Bug#303400: libnet-irc-perl: Can't locate object method "handler" via package "Net::IRC::DCC::CHAT"

Niko Tyni ntyni at iki.fi
Sat Dec 17 15:31:10 UTC 2005


tags 303400 patch
forwarded 303400 http://rt.cpan.org/NoAuth/Bug.html?id=16563
thanks

On Wed, Apr 06, 2005 at 04:15:46PM +0200, Karl Y. Pradene wrote:
> Package: libnet-irc-perl
> Version: 0.75-2
> Severity: normal
> 
> I do a dcc chat request with a:
> 	$conn->new_chat(1,'knotty');
> When knotty accept the dcc chat, I get a:
> 
> (in cleanup) Can't locate object method "handler" via package "Net::IRC::DCC::CHAT" at /usr/share/perl5/Net/IRC/DCC.pm line 149.

Hi,

the attached patch should fix this. I have sent it to the upstream
author too.  See <http://rt.cpan.org/NoAuth/Bug.html?id=16563>.

Cheers,
-- 
Niko Tyni	ntyni at iki.fi
-------------- next part --------------
--- libnet-irc-perl-0.75/DCC.pm.orig	2002-11-14 19:32:15.000000000 +0200
+++ libnet-irc-perl-0.75/DCC.pm	2005-12-17 17:18:42.948206645 +0200
@@ -145,7 +145,7 @@
     # Only do the Disconnection Dance of Death if the socket is still
     # live. Duplicate dcc_close events would be a Bad Thing.
     
-    if ($self->{_socket}->opened) {
+    if ($self->{_socket}->opened and $self->{_parent}->can('handler')) {
 	$self->{_parent}->handler(Net::IRC::Event->new('dcc_close',
 						       $self->{_nick},
 						       $self->{_socket},


More information about the pkg-perl-maintainers mailing list