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: 64736
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: os [...] cru.fr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.49
Fixed in: 3.15



Subject: Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98
Download (untitled) / with headers
text/plain 336b
We are using CGI::Cookie CPAN module within the Sympa project <http://www.sympa.org>. Users of Sympa have reported repeated errors "Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98" while using recent versions of CGI::Cookie. It seems that it appears when "use warnings" pragma was added in Cookie.pm.
Subject: Re: [rt.cpan.org #64736] Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98
Date: Thu, 13 Jan 2011 09:44:11 -0500
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 430b
Show quoted text
> We are using CGI::Cookie CPAN module within the Sympa project > <http://www.sympa.org>. > > Users of Sympa have reported repeated errors "Use of uninitialized value > in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98" while using > recent versions of CGI::Cookie. > > It seems that it appears when "use warnings" pragma was added in Cookie.pm.
Thanks for the report. We'll take a look. A patch would be welcome. Mark
Download (untitled) / with headers
text/plain 156b
Le Jeu 13 Jan 2011 09:44:21, mark@summersault.com a écrit : Show quoted text
> > Thanks for the report. We'll take a look. A patch would be welcome.
Here is the patch.
Subject: 64736.patch
Download 64736.patch
text/x-diff 301b
*** Cookie.pm.orig 2011-01-14 11:47:01.000000000 +0100 --- Cookie.pm 2011-01-14 11:47:30.000000000 +0100 *************** *** 1,7 **** package CGI::Cookie; use strict; - use warnings; # See the bottom of this file for the POD documentation. Search for the # string '=head'. --- 1,6 ----
Subject: Re: [rt.cpan.org #64736] Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98
Date: Fri, 14 Jan 2011 10:51:50 -0500
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 342b
Show quoted text
> Here is the patch.
Thank you. Going forward we will be keeping "warnings" enabled, so a different patch will be required. Either the issue causing the warning needs to be addressed, or "no warnings" can be enabled locally if the cause of the warnings is acceptable and addressing it via a code update would be particularly ugly. Mark
Download (untitled) / with headers
text/plain 652b
Le Ven 14 Jan 2011 10:52:00, mark@summersault.com a écrit : Show quoted text
> > Here is the patch.
> > Thank you. Going forward we will be keeping "warnings" enabled, so a > different patch will be required. > > Either the issue causing the warning needs to be addressed, or "no > warnings" can be enabled locally if the cause of the warnings is > acceptable and addressing it via a code update would be particularly ugly.
We will do both. But since most application don't have warnings disabled by default, I still find you should not enable "warnings" at your module level: if an application developper needs warnings, he could enable "warnings" at his level.
Subject: Re: [rt.cpan.org #64736] Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98
Date: Fri, 14 Jan 2011 13:27:49 -0500
To: bug-CGI [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 548b
Show quoted text
> But since most application don't have warnings disabled by default, I > still find you should not enable "warnings" at your module level: if an > application developer needs warnings, he could enable "warnings" at his > level.
The effect of "use warnings" is limited to the enclosing block, so if a developer adds "use warnings" in their own module, it will do nothing to catch an issue triggering warnings in CGI.pm. CGI.pm should have warnings enabled, and our code should be written not to trigger warnings that we did not intend. Mark
Download (untitled) / with headers
text/plain 342b
Show quoted text
> > Users of Sympa have reported repeated errors "Use of uninitialized
> value
> > in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98" while using > > recent versions of CGI::Cookie.
What version of CGI.pm emitted this error? I want to confirm which "split" call it was point to at the time. I'm having trouble reproducing the issue.
CC: os [...] cru.fr
Subject: Re: [rt.cpan.org #64736] Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98
Date: Tue, 25 Jan 2011 11:48:19 +0100
To: bug-CGI.pm [...] rt.cpan.org
From: Olivier Salaün <olivier.salaun [...] cru.fr>
Download (untitled) / with headers
text/plain 516b
Le 25/01/11 05:19, MARKSTOS via RT a écrit : Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=64736>
>>> Users of Sympa have reported repeated errors "Use of uninitialized
>> value
>>> in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98" while using >>> recent versions of CGI::Cookie.
> What version of CGI.pm emitted this error? I want to confirm which > "split" call it was point to at the time. I'm having trouble reproducing > the issue.
The error happens with CGI.pm 3.49. Version of Cookie.pm is 1.29
Subject: Re: [rt.cpan.org #64736] Use of uninitialized value in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98
Date: Tue, 25 Jan 2011 09:59:03 -0500
To: bug-CGI.pm [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Download (untitled) / with headers
text/plain 524b
Show quoted text
>>>> Users of Sympa have reported repeated errors "Use of uninitialized
>>> value
>>>> in split at /usr/lib/perl5/5.8.8/CGI/Cookie.pm line 98" while using >>>> recent versions of CGI::Cookie.
>> What version of CGI.pm emitted this error? I want to confirm which >> "split" call it was point to at the time. I'm having trouble reproducing >> the issue.
> The error happens with CGI.pm 3.49. > Version of Cookie.pm is 1.29
Thank you. Could you test again with 3.51? There were some changes in Cookie.pm since 3.49. Mark
Download (untitled) / with headers
text/plain 233b
I think this may already be fixed with 3.51 because we added this line to parse(): + return wantarray ? () : {} unless $raw_cookie; Let me know you find it's still a problem with the latest version. Resolving for now. Mark


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.