Skip Menu |

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

Report information
The Basics
Id: 111013
Status: open
Priority: 0/
Queue: Net-SNPP

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc: gregoa [...] cpan.org
AdminCc:

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

Attachments


Subject: Calling non-existent timeout method
After upgrading libnet from 3.07 to 3.08, I receive a test failure in Net-SNPP-1.17. It complains on undefined timeout() method: $ perl -Ilib -I/home/test/fedora/perl-libnet/libnet-3.08/lib t/server.t 1..15 ok 1 - use Net::SNPP::Server; ok 2 - use Net::SNPP; ok 3 - created a server # test server up and running on 20444 # attempting to connect to server using Net::SNPP Can't locate object method "timeout" via package "Net::SNPP::Server" at /home/test/fedora/perl-libnet/libnet-3.08/lib/Net/Cmd.pm line 201. not ok 4 - connected to server using Net::SNPP client # Failed test 'connected to server using Net::SNPP client' # at t/server.t line 32. Can't call method "ping" on an undefined value at t/server.t line 39. # Looks like you planned 15 tests but ran 4. # Looks like you failed 1 test of 4 run. # Looks like your test exited with 9 just after 4. libnet maintainer thinks this is a bug in Net-SNPP because it should define timeout() method to provide network timeout value. See CPAN RT#110978.
From: ppisar [...] redhat.com
Dne Pá 08.led.2016 02:20:01, ppisar napsal(a): Show quoted text
> After upgrading libnet from 3.07 to 3.08, I receive a test failure in > Net-SNPP-1.17. It complains on undefined timeout() method: >
This is a simple work around. I think that proper fix needs to utilize $self->{Timeout} instead of the ALARM signal handler and to rework subclassing to have $self->${Timeout} available from the timeout() method.
Subject: Net-SNPP-1.17-Define-dummy-Net-SNPP-Server-timeout.patch
From ca1772ca23fe771ea91b7557aa0cb2b035961fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Mon, 18 Jan 2016 14:33:00 +0100 Subject: [PATCH] Define dummy Net::SNPP::Server->timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since libnet-3.08, Net::Cmd subclasses should provide timeout() method. Otherwise tests fail like in CPAN RT#111013. See #110978. This patch returns static 0 value because the first timeout() argument is not an object reference. This is probably because Net::SNPP::Server does not subclass Net::Cmd properly. See libnet's t/datasend.t for example. Signed-off-by: Petr Písař <ppisar@redhat.com> --- lib/Net/SNPP/Server.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Net/SNPP/Server.pm b/lib/Net/SNPP/Server.pm index 5cb999f..1482ca7 100644 --- a/lib/Net/SNPP/Server.pm +++ b/lib/Net/SNPP/Server.pm @@ -129,6 +129,12 @@ sub new { return bless( $self, $class ); } +# Required by Net::Cmd, CPAN RT#111013, #110978 +sub timeout { + # The $_[0] is not an object reference, cannot use $self->{Timeout} + 0; +} + =item client() Calls accept() for you and returns a client handle. This method -- 2.5.0
Subject: Re: [rt.cpan.org #111013] Calling non-existent timeout method
Date: Mon, 18 Jan 2016 08:45:01 -0500
To: bug-Net-SNPP [...] rt.cpan.org
From: "Derek J. Balling" <dredd [...] megacity.org>
I am not the maintainer of this code any more. Haven't been for a while. Not sure why CPAN is notifying *me* about it, when CPAN knows who the current maintainer is (TOBEYA). On 1/18/2016 8:40 AM, Petr Pisar via RT wrote: Show quoted text
> Queue: Net-SNPP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=111013 > > > Dne Pá 08.led.2016 02:20:01, ppisar napsal(a):
>> After upgrading libnet from 3.07 to 3.08, I receive a test failure in >> Net-SNPP-1.17. It complains on undefined timeout() method: >>
> This is a simple work around. I think that proper fix needs to utilize $self->{Timeout} instead of the ALARM signal handler and to rework subclassing to have $self->${Timeout} available from the timeout() method.
-- I prefer to use encrypted mail. My public key fingerprint is FD6A 6990 F035 DE9E 3713 B4F1 661B 3AD6 D82A BBD0. You can download it at http://www.megacity.org/gpg_dballing.txt Learn how to encrypt your email with the E-Mail Self Defense Guide: https://emailselfdefense.fsf.org/en/
Download signature.asc
application/pgp-signature 870b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #111013] Calling non-existent timeout method
Date: Tue, 19 Jan 2016 14:15:53 -0800
To: bug-Net-SNPP [...] rt.cpan.org
From: Al Tobey <tobert [...] gmail.com>
I can't seem to log into PAUSE at the moment. It has been a few years, so I'll get logged in and take a look in the next couple weeks. The Net::SNPP::Server code is primarily there for testing, though I did use it to write a server about a decade ago that was in production. The timeout code probably never fired ;) -Al On Mon, Jan 18, 2016 at 5:45 AM, Derek J. Balling via RT < bug-Net-SNPP@rt.cpan.org> wrote: Show quoted text
> Queue: Net-SNPP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=111013 > > > I am not the maintainer of this code any more. Haven't been for a while. > > Not sure why CPAN is notifying *me* about it, when CPAN knows who the > current maintainer is (TOBEYA). > > On 1/18/2016 8:40 AM, Petr Pisar via RT wrote:
> > Queue: Net-SNPP > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=111013 > > > > > Dne Pá 08.led.2016 02:20:01, ppisar napsal(a):
> >> After upgrading libnet from 3.07 to 3.08, I receive a test failure in > >> Net-SNPP-1.17. It complains on undefined timeout() method: > >>
> > This is a simple work around. I think that proper fix needs to utilize
> $self->{Timeout} instead of the ALARM signal handler and to rework > subclassing to have $self->${Timeout} available from the timeout() method. > > -- > I prefer to use encrypted mail. My public key fingerprint is > FD6A 6990 F035 DE9E 3713 B4F1 661B 3AD6 D82A BBD0. > > You can download it at http://www.megacity.org/gpg_dballing.txt > > Learn how to encrypt your email with the E-Mail Self Defense > Guide: https://emailselfdefense.fsf.org/en/ > > > >