develooper Front page | perl.perl5.porters | Postings from May 2003

Re: delete_all failure [perl #20710]

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
May 26, 2003 14:57
Subject:
Re: delete_all failure [perl #20710]
Message ID:
20030526225628.G1149@plum.flirble.org
On Thu, May 15, 2003 at 04:38:18PM -0700, Doug Halperin wrote:
> I fail altogether on delete all
> 
> the code
> 
> #!/usr/bin/perl -Tw
> 
> use CGI;
> use Data::Dumper;
> 
> 
> use strict;
> 
> 
> my $cgi = new CGI;
> 
> print '=' . $cgi->param('b') . "=\n";
> print Dumper({$cgi->Vars});
> 
> 
> $cgi->delete_all();
> print '=' . $cgi->param('b') . "=\n";
> print Dumper({$cgi->Vars});
> 
> $cgi->delete('a');
> print '=' . $cgi->param('b') . "=\n";
> print Dumper({$cgi->Vars});
> 
> 
> -----
> 
> produces this output:
> doug$ ./t3 'a=1&b=2'
> =2=
> $VAR1 = {
>           'a' => '1',
>           'b' => '2'
>         };
> =2=
> $VAR1 = {
>           'b' => '2'
>         };
> =2=
> $VAR1 = {
>           'b' => '2'
>         };
> doug$
> 
> 
> Any thoughts?

I'm not convinced that this is a bug in the perl interpreter, so I'm
not sure if perl5-porters is really the correct place for this. For
all versions of perl 5.6.0 or later that I've tried I see

$ perl5.8.0 -Tw  t3 'a=1&b=2'
=2=
$VAR1 = {
          'a' => '1',
          'b' => '2'
        };
Use of uninitialized value in concatenation (.) or string at t3 line 17.
==
$VAR1 = {};
Use of uninitialized value in concatenation (.) or string at t3 line 21.
==
$VAR1 = {};

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About