Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the App-Info CPAN distribution.

Report information
The Basics
Id: 21641
Status: resolved
Priority: 0/
Queue: App-Info

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Missing parens on Carp::croak calls break many tests
In bleadperl there are many standard modules fixed in that they do not 'use Carp' but only require it on demand. App::Info apparently relies on Carp being preloaded because it does neiter predeclare the Carp functions nor does it use parens when calling them. So bleadperl does not know what this Carp::croak thing is and fails immediately when it parses it.
Subject: Re: [rt.cpan.org #21641] Missing parens on Carp::croak calls break many tests
Date: Sun, 24 Sep 2006 10:51:01 -0700
To: bug-App-Info [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Sep 24, 2006, at 09:20, Andreas Koenig via RT wrote: Show quoted text
> In bleadperl there are many standard modules fixed in that they do not > 'use Carp' but only require it on demand. > > App::Info apparently relies on Carp being preloaded because it does > neiter predeclare the Carp functions nor does it use parens when > calling > them. > > So bleadperl does not know what this Carp::croak thing is and fails > immediately when it parses it.
That's curious, because App/Info.pm uses Carp, so it should always be loaded when App::Info runs. Something else must be loading before App::Info. But I'm okay to put in the parentheses. I don't have bleadperl, though; would you mind trying the attached patch for me? Thanks, David

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

CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #21641] Missing parens on Carp::croak calls break many tests
Date: Sun, 24 Sep 2006 21:51:52 +0200
To: bug-App-Info [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Thanks for the patch, it fixes several tests but leaves two tests in request.t broken with bleadperl: % /home/src/perl/repoperls/installed-perls/perl/p32KhDr/perl-5.8.0@28881/bin/perl -Ilib t/request.t 1..18 ok 1 - use App::Info::Request; ok 2 - New default request ok 3 - The object isa App::Info::Request not ok 4 - Catch invalid params # Failed test 'Catch invalid params' # at t/request.t line 14. # 'Undefined subroutine &Carp::croak called at lib/App/Info/Request.pm line 92. # ' # doesn't match '(?-xism:^Odd number of parameters in call to App::Info::Request->new\(\))' not ok 5 - Catch invalid callback # Failed test 'Catch invalid callback' # at t/request.t line 18. # 'Undefined subroutine &Carp::croak called at lib/App/Info/Request.pm line 98. # ' # doesn't match '(?-xism:^Callback parameter 'foo' is not a code reference)' ok 6 - New custom request ok 7 - Check key ok 8 - Check message ok 9 - Check error ok 10 - Check type ok 11 - Fail callback ok 12 - Succeed callback ok 13 - Fail value ok 14 - Succeed value ok 15 - Check value ok 16 - Another custom request ok 17 - Try $_ callback ok 18 - Fail $_ callback # Looks like you failed 2 tests of 18. -- andreas
Subject: Re: [rt.cpan.org #21641] Missing parens on Carp::croak calls break many tests
Date: Sun, 24 Sep 2006 18:59:28 -0700
To: bug-App-Info [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
This should fix it. Would you confirm? Thanks, David Index: lib/App/Info/Request.pm =================================================================== --- lib/App/Info/Request.pm (revision 3154) +++ lib/App/Info/Request.pm (working copy) @@ -44,6 +44,7 @@ use strict; use vars qw($VERSION); +use Carp; $VERSION = '0.51'; ######################################################################## ######
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #21641] Missing parens on Carp::croak calls break many tests
Date: Mon, 25 Sep 2006 06:06:49 +0200
To: bug-App-Info [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sun, 24 Sep 2006 21:59:47 -0400, "David Wheeler via RT" <bug-App-Info@rt.cpan.org> said:
Show quoted text
Show quoted text
> This should fix it. Would you confirm?
Confirmed, except for the 3 skipped tests where I just don't know if they are ok. t/apache...........ok t/apache2..........ok t/apache_info......ok t/carp.............ok t/confirm..........ok t/errors...........ok t/expat............ok t/expat_info.......ok t/iconv............ok t/iconv_info.......ok t/postgres.........ok t/postgres_info....ok t/print............ok t/prompt...........ok t/request..........ok t/sqlite...........ok t/sqlite_info......ok 13/17 skipped: SQLite not installed t/util.............ok 3/22 skipped: OS dependent t/uuid.............ok t/uuid_info........ok 18/22 skipped: OSSP UUID Library not installed t/zpod.............ok All tests successful, 34 subtests skipped. Thanks for the quick fix! -- andreas
Subject: Re: [rt.cpan.org #21641] Missing parens on Carp::croak calls break many tests
Date: Mon, 25 Sep 2006 09:03:17 -0700
To: bug-App-Info [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Sep 24, 2006, at 21:07, andreas.koenig.gmwojprw@franz.ak.mind.de via RT wrote: Show quoted text
> Confirmed, except for the 3 skipped tests where I just don't know if > they are ok.
The util tests should be fine. The SQLite and OSSP UUID tests should be okay, too, though I'm not positive. They do work the same way as the other tests (apache, PostgreSQL, etc.), so they should be. Thanks for pre-testing my module so that I don't have to rush out a fix after 5.10 ships! Cheers, David