Skip Menu |
 

This queue is for tickets about the CGI-Simple CPAN distribution.

Report information
The Basics
Id: 67061
Status: resolved
Priority: 0/
Queue: CGI-Simple

People
Owner: MANWAR [...] cpan.org
Requestors: szabgab [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.20
Fixed in: 1.21



Subject: Use of uninitialized value $v in split at .../CGI/Simple.pm line 704.
Date: Tue, 29 Mar 2011 15:21:09 +0200
To: bug-CGI-Simple [...] rt.cpan.org
From: Gabor Szabo <szabgab [...] gmail.com>
Download (untitled) / with headers
text/plain 213b
perl -w -MCGI::Simple -e'$c = CGI::Simple->new; $v = $c->Vars; $v->{nosuch} = undef' generates the warning Use of uninitialized value $v in split at .../CGI/Simple.pm line 704. Is this considered a bug? Gabor
Download (untitled) / with headers
text/plain 313b
Hi Gabor, Thanks for reporting the issue. What do you think is better approach? sub STORE { my ( $q, $p, $v ) = @_; return unless defined $v; $q->param( $p, split $q->{'.sep'}, $v ); } or sub STORE { my ( $q, $p, $v ) = @_; no warnings 'uninitialized'; $q->param( $p, split $q->{'.sep'}, $v ); }
Subject: Re: [rt.cpan.org #67061] Use of uninitialized value $v in split at .../CGI/Simple.pm line 704.
Date: Sat, 6 Oct 2018 07:04:39 +0000
To: bug-CGI-Simple [...] rt.cpan.org
From: Gabor Szabo <gabor [...] szabgab.com>
Download (untitled) / with headers
text/plain 660b
I don't remember the whole thing but out of those two snippets I'd prefer the first one as that is more explicit. Gabor On Sat, Oct 6, 2018 at 6:51 AM Mohammad Sajid Anwar via RT <bug-CGI-Simple@rt.cpan.org> wrote: Show quoted text
> > Queue: CGI-Simple > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=67061 > > > Hi Gabor, > > Thanks for reporting the issue. > What do you think is better approach? > > sub STORE { > my ( $q, $p, $v ) = @_; > return unless defined $v; > $q->param( $p, split $q->{'.sep'}, $v ); > } > > > or > > sub STORE { > my ( $q, $p, $v ) = @_; > no warnings 'uninitialized'; > $q->param( $p, split $q->{'.sep'}, $v ); > }
Good advise. I will release the patch soon.


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.