Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 50301
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: michaelb [...] travelpod.com
Cc:
AdminCc:

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



Subject: CGI::Fast changed without incrementing $VERSION
Download (untitled) / with headers
text/plain 1011b
CGI::Fast changed between CGI versions 3.45 and 3.47 but the $VERSION for CGI::Fast remained the same at 1.07. This provided much fun this morning trying to understand what changed to produce new warnings when the version number for CGI::Fast remained constant :-) Also, and this may be a further bug, the way that setting warnings was changed in the CGI v3.47 version of CGI::Fast causes scripts that don't have "use warnings" set to start emitting warnings ... which is how we discovered this in the first place. For reference, here are two versions of CGI::Fast 1.07: http://cpansearch.perl.org/src/LDS/CGI.pm-3.45/lib/CGI/Fast.pm http://cpansearch.perl.org/src/LDS/CGI.pm-3.47/lib/CGI/Fast.pm I'm not sure what the preferred patch syntax is, but the trivial solution to this ticket is to bump the $VERSION of CGI::Fast :-) ... and perhaps add a note to the CGI::Fast CHANGELOG or POD to reflect that CGI::Fast version 1.08 will force a global "use warnings" context on your scripts. -Michael
Subject: Re: [rt.cpan.org #50301] CGI::Fast changed without incrementing $VERSION
Date: Wed, 7 Oct 2009 11:53:29 -0400
To: bug-CGI.pm [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 770b
Show quoted text
> CGI::Fast changed between CGI versions 3.45 and 3.47 but the $VERSION for CGI::Fast > remained the same at 1.07. > > This provided much fun this morning trying to understand what changed to produce new > warnings when the version number for CGI::Fast remained constant :-)
That certainly sounds frustrating. Thanks for the report-- we'll get this updated. Show quoted text
> Also, and this may be a further bug, the way that setting warnings was changed in the CGI > v3.47 version of CGI::Fast causes scripts that don't have "use warnings" set to start emitting > warnings ... which is how we discovered this in the first place.
So, you get a warning when you haven't asked to "use warnings"? That's interesting. Could you provide a sample of the warning received? Mark
Subject: Re: [rt.cpan.org #50301] CGI::Fast changed without incrementing $VERSION
Date: Wed, 7 Oct 2009 12:09:03 -0400
To: bug-CGI.pm [...] rt.cpan.org
From: Michael Burns <michaelb [...] travelpod.com>
Download (untitled) / with headers
text/plain 1.3k
Show quoted text
>> Also, and this may be a further bug, the way that setting warnings >> was changed in the CGI >> v3.47 version of CGI::Fast causes scripts that don't have "use >> warnings" set to start emitting >> warnings ... which is how we discovered this in the first place.
> > So, you get a warning when you haven't asked to "use warnings"? That's > interesting. Could you provide a sample of the warning received?
Using CGI v3.45's CGI::Fast, a trivial example producing no errors: Show quoted text
> [me@machine ~]$ perl -MCGI::Fast -e '"foo" == 1;' > [me@machine ~]$
(exhibits bad form certainly :-) but no warnings, as expected) Using CGI v3.47's CGI::Fast, the same example produces a warning despite the code not issuing a "use warnings": Show quoted text
> [me@machine ~]$ perl -MCGI::Fast -e '"foo" == 1;' > Argument "foo" isn't numeric in numeric eq (==) at -e line 1. > [me@machine ~]$
We noticed this as we have a few old scripts that aren't "use warnings" which started spewing warnings after upgrading CGI. It looks to be due to the direct setting of $^W (which is a global setting IIRC) in the newer CGI::Fast. Let me know if I can provide any further information. Cheers, Michael P.S. -- As with all serendipity, these non "use warnings" scripts are scheduled to be retired in a few weeks, after which we'd likely not have noticed this issue at all...
Thanks, this is patched in my git repo now.
Download (untitled) / with headers
text/plain 100b
I think this fix was released some time ago. Re-open if you see an issue with the current release.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.