Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed regression in "exists" function when using tied interface to CG…

…I via $q->Vars.
  • Loading branch information...
commit a989e371c7eca71a982f4e3602f2ac34b079d202 1 parent bc05c58
lstein authored
Showing with 12 additions and 8 deletions.
  1. +3 −3 CGI.pm
  2. +3 −0  Changes
  3. +6 −5 t/request.t
6 CGI.pm
View
@@ -18,8 +18,8 @@ use Carp 'croak';
# The most recent version and complete docs are available at:
# http://stein.cshl.org/WWW/software/CGI/
-$CGI::revision = '$Id: CGI.pm,v 1.254 2008-06-25 14:52:19 lstein Exp $';
-$CGI::VERSION='3.38';
+$CGI::revision = '$Id: CGI.pm,v 1.255 2008-07-29 15:00:05 lstein Exp $';
+$CGI::VERSION='3.39';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -1176,7 +1176,7 @@ END_OF_FUNC
'EXISTS' => <<'END_OF_FUNC',
sub EXISTS {
- exists $_[0]->{$_[1]};
+ exists $_[0]->{param}{$_[1]};
}
END_OF_FUNC
3  Changes
View
@@ -1,3 +1,6 @@
+ Version 3.39
+ 1. Fixed regression in "exists" function when using tied interface to CGI via $q->Vars.
+
Version 3.38
1. Fix annoying warning in http://rt.cpan.org/Ticket/Display.html?id=34551
2. Added nobr() function http://rt.cpan.org/Ticket/Display.html?id=35377
11 t/request.t
View
@@ -4,7 +4,7 @@
######################### We start with some black magic to print on failure.
use lib '.','../blib/lib','../blib/arch';
-BEGIN {$| = 1; print "1..33\n"; }
+BEGIN {$| = 1; print "1..34\n"; }
END {print "not ok 1\n" unless $loaded;}
use CGI ();
use Config;
@@ -74,6 +74,7 @@ my $p = $q->Vars;
test(29,$p->{bar} eq 'froz',"tied interface fetch");
$p->{bar} = join("\0",qw(foo bar baz));
test(30,join(' ',$q->param('bar')) eq 'foo bar baz','tied interface store');
+test(31,exists $p->{bar});
# test posting
$q->_reset_globals;
@@ -88,11 +89,11 @@ if ($Config{d_fork}) {
exit 0;
}
# at this point, we're in a new (child) process
- test(31,$q=new CGI,"CGI::new() from POST");
- test(32,$q->param('weather') eq 'nice',"CGI::param() from POST");
- test(33,$q->url_param('big_balls') eq 'basketball',"CGI::url_param()");
+ test(32,$q=new CGI,"CGI::new() from POST");
+ test(33,$q->param('weather') eq 'nice',"CGI::param() from POST");
+ test(34,$q->url_param('big_balls') eq 'basketball',"CGI::url_param()");
} else {
- print "ok 31 # Skip\n";
print "ok 32 # Skip\n";
print "ok 33 # Skip\n";
+ print "ok 34 # Skip\n";
}
Please sign in to comment.
Something went wrong with that request. Please try again.