Skip Menu |

This queue is for tickets about the Apache-Status-DBI CPAN distribution.

Report information
The Basics
Id: 28662
Status: open
Priority: 0/
Queue: Apache-Status-DBI

People
Owner: pgollucci [...] p6m7g8.com
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Undeclared dependency on Apache
t/00.load......... # Failed test 'use Apache::Status::DBI;' # at t/00.load.t line 4. # Tried to use 'Apache::Status::DBI'. # Error: Can't locate Apache.pm in @INC (@INC contains: /home/sand/.cpan/build/Apache-Status-DBI-1.011-O3uLQc/blib/lib /home/sand/.cpan/build/Apache-Status-DBI-1.011-O3uLQc/blib/arch /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5/i686-linux-64int /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5/i686-linux-64int /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5 /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5/i686-linux-64int /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5/i686-linux-64int /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5 . /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5/i686-linux-64int /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5 /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5/i686-linux-64int /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5 .) at /home/sand/.cpan/build/Apache-Status-DBI-1.011-O3uLQc/blib/lib/Apache/Status/DBI.pm line 21. # BEGIN failed--compilation aborted at t/00.load.t line 4. # Compilation failed in require at (eval 3) line 2. # BEGIN failed--compilation aborted at (eval 3) line 2. Use of uninitialized value $Apache::Status::DBI::VERSION in concatenation (.) or string at t/00.load.t line 7. # Testing Apache::Status::DBI # Looks like you failed 1 test of 1. dubious ^ITest returned status 1 (wstat 256, 0x100) DIED. FAILED test 1 ^IFailed 1/1 tests, 0.00% okay
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #28662] Undeclared dependency on Apache
Date: Sat, 4 Aug 2007 23:46:23 +0100
To: Andreas Koenig via RT <bug-Apache-Status-DBI [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
How can I declare a dependency on _either_ mod_perl1 or mod_perl2? Tim. On Fri, Aug 03, 2007 at 11:06:33PM -0400, Andreas Koenig via RT wrote: Show quoted text
> > Fri Aug 03 23:06:32 2007: Request 28662 was acted upon. > Transaction: Ticket created by ANDK > Queue: Apache-Status-DBI > Subject: Undeclared dependency on Apache > Broken in: (no value) > Severity: Normal > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28662 > > > > t/00.load......... > # Failed test 'use Apache::Status::DBI;' > # at t/00.load.t line 4. > # Tried to use 'Apache::Status::DBI'. > # Error: Can't locate Apache.pm in @INC (@INC contains: > /home/sand/.cpan/build/Apache-Status-DBI-1.011-O3uLQc/blib/lib > /home/sand/.cpan/build/Apache-Status-DBI-1.011-O3uLQc/blib/arch > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5/i686-linux-64int > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5/i686-linux-64int > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5 > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5/i686-linux-64int > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5/i686-linux-64int > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5 > . > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5/i686-linux-64int > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/5.9.5 > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5/i686-linux-64int > /home/src/perl/repoperls/installed-perls/perl/pkmBCn5/perl-5.8.0@31680/lib/site_perl/5.9.5 > .) at > /home/sand/.cpan/build/Apache-Status-DBI-1.011-O3uLQc/blib/lib/Apache/Status/DBI.pm > line 21. > # BEGIN failed--compilation aborted at t/00.load.t line 4. > # Compilation failed in require at (eval 3) line 2. > # BEGIN failed--compilation aborted at (eval 3) line 2. > Use of uninitialized value $Apache::Status::DBI::VERSION in > concatenation (.) or string at t/00.load.t line 7. > # Testing Apache::Status::DBI > # Looks like you failed 1 test of 1. > dubious > ^ITest returned status 1 (wstat 256, 0x100) > DIED. FAILED test 1 > ^IFailed 1/1 tests, 0.00% okay > >
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #28662] Undeclared dependency on Apache
Date: Sun, 05 Aug 2007 08:15:21 +0200
To: bug-Apache-Status-DBI [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sat, 04 Aug 2007 18:46:56 -0400, "Tim Bunce via RT" <bug-Apache-Status-DBI@rt.cpan.org> said:
Show quoted text
Show quoted text
> How can I declare a dependency on _either_ mod_perl1 or mod_perl2?
It seems in the META.yml you can't: http://svn.perl.org/modules/Module-Build/trunk/website/META-spec.pod But in {Makefile,Build}.PL you could ask the user: while (){ $answer = prompt("Do you want to use me with m1 or m2 or both?"); if (isvalid($answer)){ last; } else { print "invalid answer"; } } and after that compose the PRERPEQ_PM. Maybe allow "none" as a forth thing and skip the tests in this case? I have no idea how much the users will like this question-answer game. I find it cleaner than FAILing randomly depending on already installed modules. -- andreas
Um. I'd rather not get into prompting. Does this help? ========================================================= ========== --- lib/Apache/Status/DBI.pm (revision 9801) +++ lib/Apache/Status/DBI.pm (working copy) @@ -8,7 +8,11 @@ use DBI (); -use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV {MOD_PERL_API_VERSION} >= 2 ); +# if MOD_PERL_API_VERSION env var exists then use it to determine mod_perl v1 or v2 +# if not, then assume mod_perl v2 if we can load mod_perl2 module +use constant MP2 => (exists $ENV{MOD_PERL_API_VERSION}) + ? ($ENV{MOD_PERL_API_VERSION} >= 2) + : eval { require mod_perl2 }; BEGIN { if (MP2) {
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #28662] Undeclared dependency on Apache
Date: Sun, 05 Aug 2007 19:15:13 +0200
To: bug-Apache-Status-DBI [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sun, 05 Aug 2007 11:46:13 -0400, "Tim_Bunce via RT" <bug-Apache-Status-DBI@rt.cpan.org> said:
Show quoted text
Show quoted text
> Um. I'd rather not get into prompting.
Show quoted text
> Does this help?
Show quoted text
> ========================================================= > ========== > --- lib/Apache/Status/DBI.pm (revision 9801) > +++ lib/Apache/Status/DBI.pm (working copy) > @@ -8,7 +8,11 @@
Show quoted text
> use DBI ();
Show quoted text
> -use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV > {MOD_PERL_API_VERSION} >= 2 ); > +# if MOD_PERL_API_VERSION env var exists then use it to determine mod_perl v1 or v2 > +# if not, then assume mod_perl v2 if we can load mod_perl2 module > +use constant MP2 => (exists $ENV{MOD_PERL_API_VERSION}) > + ? ($ENV{MOD_PERL_API_VERSION} >= 2) > + : eval { require mod_perl2 };
Show quoted text
> BEGIN { > if (MP2) {
I'm confused. This looks like runtime, so how can this help the 'make test' experience? As I understand it, you have dependency on either mod_perl or mod_perl2? So I suspect, only if one of the following two conditions is met, all tests can pass: - PREREQ_PM mentions either mod_perl or mod_perl2 or - tests are skipped when neither mod_perl nor mod_perl2 is installed The decision if the dependency should be on mod_perl or on mod_perl2 can only happen during Makefile.PL, right? -- andreas
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #28662] Undeclared dependency on Apache
Date: Mon, 6 Aug 2007 00:52:49 +0100
To: "(Andreas J. Koenig) via RT" <bug-Apache-Status-DBI [...] rt.cpan.org>
From: Tim Bunce <Tim.Bunce [...] pobox.com>
On Sun, Aug 05, 2007 at 01:19:33PM -0400, (Andreas J. Koenig) via RT wrote: Show quoted text
> > Queue: Apache-Status-DBI > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28662 > >
> >>>>> On Sun, 05 Aug 2007 11:46:13 -0400, "Tim_Bunce via RT" <bug-Apache-Status-DBI@rt.cpan.org> said:
> >
> > Um. I'd rather not get into prompting.
>
> > Does this help?
>
> > -use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV > > {MOD_PERL_API_VERSION} >= 2 ); > > +# if MOD_PERL_API_VERSION env var exists then use it to determine mod_perl v1 or v2 > > +# if not, then assume mod_perl v2 if we can load mod_perl2 module > > +use constant MP2 => (exists $ENV{MOD_PERL_API_VERSION}) > > + ? ($ENV{MOD_PERL_API_VERSION} >= 2) > > + : eval { require mod_perl2 };
> > I'm confused. This looks like runtime, so how can this help the 'make > test' experience?
It's only a small improvement: the MOD_PERL_API_VERSION can be used to force v1 or v2 and, if not set, then it tries to load mod_perl2. If that succeeds then it defaults to using mod_perl2 for the tests. That doesn't help the "what if they don't have any mod_perl installed". But that situation only significantly affects cpan testers, as real humans wouldn't try building an Apache::* module of CPAN without having mod_perl already installed. But does cpan testers allow prompting from Makefile.PL or is it all automated? Show quoted text
> As I understand it, you have dependency on either mod_perl or > mod_perl2? So I suspect, only if one of the following two conditions > is met, all tests can pass: > > - PREREQ_PM mentions either mod_perl or mod_perl2 or > - tests are skipped when neither mod_perl nor mod_perl2 is installed
The second option is most appealing. Show quoted text
> The decision if the dependency should be on mod_perl or on mod_perl2 > can only happen during Makefile.PL, right?
Yes, though for the sake of 'make test' I'd be happy enough with "use mod_perl2 if installed, else mod_perl1". But now also with "if neither then skip the tests". I'll work on that. Thanks Andreas. Tim.
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #28662] Undeclared dependency on Apache
Date: Mon, 06 Aug 2007 08:07:47 +0200
To: bug-Apache-Status-DBI [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sun, 05 Aug 2007 19:53:17 -0400, "Tim Bunce via RT" <bug-Apache-Status-DBI@rt.cpan.org> said:
Show quoted text
> But does cpan testers allow prompting from Makefile.PL or is it all > automated?
Every CPAN tester develops his own strategy how to walk through the CPAN space. Most of them deal with prompts by setting the environment variable PERL_MM_USE_DEFAULT which emulates a confirming behavior. I use CPAN.pm's ability to answer *any* question with the help of Expect.pm. Show quoted text
> [...] > Yes, though for the sake of 'make test' I'd be happy enough with > "use mod_perl2 if installed, else mod_perl1". But now also with > "if neither then skip the tests".
Show quoted text
> I'll work on that.
Excellent! Thanks Tim, -- andreas
RT-Send-CC: dev [...] perl.apache.org
See PR http://rt.cpan.org/Ticket/Display.html?id=34316 We will find a generic way to solve this, but it will be outside of META.yml