Skip Menu |

This queue is for tickets about the Perlbal CPAN distribution.

Report information
The Basics
Id: 40097
Status: resolved
Priority: 0/
Queue: Perlbal

People
Owner: brad [...] danga.com
Requestors: BORISZ [...] cpan.org
Cc:
AdminCc:

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



Hi, Perlbal installes only, if Net::Netmask is installed. Here is a patch to fix t/90-accesscontrol.t. -- Boris
Subject: perlbal-accesscontrol.patch
diff -Nur a/Perlbal-1.72/t/90-accesscontrol.t b/Perlbal-1.72/t/90-accesscontrol.t --- a/Perlbal-1.72/t/90-accesscontrol.t 2008-10-16 15:34:42.000000000 +0200 +++ b/Perlbal-1.72/t/90-accesscontrol.t 2008-10-16 15:35:23.000000000 +0200 @@ -4,7 +4,13 @@ use Perlbal::Test; use IO::Socket::INET; use HTTP::Request; -use Test::More 'no_plan'; +use Test::More; + +BEGIN { + eval "require Net::Netmask" + ? plan 'no_plan' + : plan skip_all => 'Net::Netmask not installed'; +} my $port = new_port();
On Thu Oct 16 09:49:01 2008, BORISZ wrote: Show quoted text
> > Hi, > > Perlbal installes only, if Net::Netmask is installed. Here is a patch > to fix t/90-accesscontrol.t.
Wrong fix. 1) that's the wrong way to skip everything. You need to fail out earlier. But 2) the real fix is just to declare Net::Netmask a dependency and require it. But isn't that done already? Closing this bug WONTFIX.
On Thu Oct 16 09:49:01 2008, BORISZ wrote: Show quoted text
> > Hi, > > Perlbal installes only, if Net::Netmask is installed. Here is a patch > to fix t/90-accesscontrol.t.
Wrong fix. 1) that's the wrong way to skip everything. You need to fail out earlier. But 2) the real fix is just to declare Net::Netmask a dependency and require it. But isn't that done already? Closing this bug WONTFIX.
Subject: Re: [rt.cpan.org #40097] [patch] t/90-accesscontrol.t require Net::Netmask
Date: Sun, 19 Oct 2008 22:51:29 +0200
To: bug-Perlbal [...] rt.cpan.org
From: Boris Zentner <bzm [...] 2bz.de>
Hi Brad, I think you are wrong on both. I changed t/ t/90-accesscontrol.t since perlbal's Changelog told me: '-- make Net::Netmask optional' PS: I wonder how to skip all tests earler than in a BEGIN block. Am 19.10.2008 um 22:36 schrieb Brad Fitzpatrick via RT: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40097 > > > On Thu Oct 16 09:49:01 2008, BORISZ wrote:
>> >> Hi, >> >> Perlbal installes only, if Net::Netmask is installed. Here is a patch >> to fix t/90-accesscontrol.t.
> > > Wrong fix. 1) that's the wrong way to skip everything. You need to > fail out earlier. But 2) the > real fix is just to declare Net::Netmask a dependency and require > it. But isn't that done already? > > Closing this bug WONTFIX.
-- Boris
Whoops, so sorry... you're right. I forgot we made it optional. And I also forgot that skip_all also exits. I thought it just declared a plan to skip all. Checking in your fix.