Skip Menu |

This queue is for tickets about the Net-Ping CPAN distribution.

Report information
The Basics
Id: 29229
Status: resolved
Priority: 0/
Queue: Net-Ping

People
Owner: Nobody in particular
Requestors: florent [...] sarcelle.net
Cc:
AdminCc:

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



Subject: close() fails when using "external" protocol
Date: Sat, 8 Sep 2007 01:58:00 +0200
To: bug-Net-Ping [...] rt.cpan.org
From: Florent Bayle <florent [...] sarcelle.net>
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

Distribution name and version : Net-Ping-2.31 Perl version : v5.8.8 built for i486-linux-gnu-thread-multi Operating System vendor and version : Debian GNU/Linux Sid Other details : Net::Ping::External is installed. Hi, when I try to run close () on a Net::Ping object created with "external" as protocol, it fails. Sample code : #! /usr/bin/perl use Net::Ping; my $pobj = Net::Ping->new("external"); $pobj->ping("localhost"); $pobj->close(); Output : Can't call method "close" on an undefined value at /usr/share/perl/5.8/Net/Ping.pm line 1362. Patch against the last version (also attached to this mail) : --- Net/Ping.pm 2007-09-08 01:49:52.000000000 +0200 +++ Net/Ping.pm.new 2007-09-08 01:51:59.000000000 +0200 @@ -1365,7 +1365,7 @@ delete $self->{"syn"}; } elsif ($self->{"proto"} eq "tcp") { # The connection will already be closed - } else { + } elsif ($self->{"proto"} ne "external") { $self->{"fh"}->close(); } } -- Florent

Message body is not shown because sender requested not to inline it.

On Fri Sep 07 19:59:12 2007, florent@sarcelle.net wrote: Show quoted text
> Distribution name and version : Net-Ping-2.31 > Perl version : v5.8.8 built for i486-linux-gnu-thread-multi > Operating System vendor and version : Debian GNU/Linux Sid > Other details : Net::Ping::External is installed. > > Hi, > > when I try to run close () on a Net::Ping object created with > "external" as protocol, it fails. > > > Sample code : > #! /usr/bin/perl > > use Net::Ping; > > my $pobj = Net::Ping->new("external"); > $pobj->ping("localhost"); > $pobj->close(); > > > Output : > Can't call method "close" on an undefined value at > /usr/share/perl/5.8/Net/Ping.pm line 1362. > > > Patch against the last version (also attached to this mail) : > --- Net/Ping.pm 2007-09-08 01:49:52.000000000 +0200 > +++ Net/Ping.pm.new 2007-09-08 01:51:59.000000000 +0200 > @@ -1365,7 +1365,7 @@ > delete $self->{"syn"}; > } elsif ($self->{"proto"} eq "tcp") { > # The connection will already be closed > - } else { > + } elsif ($self->{"proto"} ne "external") { > $self->{"fh"}->close(); > } > } >
This will be in Net-Ping 2.35. Steve