summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-16 20:23:24 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-16 20:40:12 -0800
commit24e05dcb39b36ab68d1926496cf195f222ec5caf (patch)
treea7513b61e9502be961eab47a9945a3309813328c /cpan
parent0325bd8677993df6d92da0f994cb87d1f59ae5a3 (diff)
downloadperl-24e05dcb39b36ab68d1926496cf195f222ec5caf.tar.gz
Get cpan/CGI/t/http.t working on VMS again
This stopped working with the 84601d63a (the 3.50 upgrade). This patch was not applied to the CGI.pm repository until after the new release.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/CGI/t/http.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpan/CGI/t/http.t b/cpan/CGI/t/http.t
index 324da26fd4..2ed38631d6 100644
--- a/cpan/CGI/t/http.t
+++ b/cpan/CGI/t/http.t
@@ -34,8 +34,11 @@ my $cgi = CGI->new();
# https()
# The same as http(), but operates on the HTTPS environment variables present when the SSL protocol is in
# effect. Can be used to determine whether SSL is turned on.
- local %ENV;
- @ENV{qw/ HTTPS HTTPS_KEYSIZE /} = ('ON', 512);
+ my @expect = grep /^HTTPS/, keys %ENV;
+ push @expect, 'HTTPS' if not exists $ENV{HTTPS};
+ push @expect, 'HTTPS_KEYSIZE' if not exists $ENV{HTTPS_KEYSIZE};
+ local $ENV{'HTTPS'} = 'ON';
+ local $ENV{'HTTPS_KEYSIZE'} = 512;
is $cgi->https(), 'ON', 'scalar context to check SSL is on';
- ok eq_set( [$cgi->https()], [qw(HTTPS HTTPS_KEYSIZE)]), 'list context returns https keys';
+ ok eq_set( [$cgi->https()], \@expect), 'list context returns https keys';
}