summaryrefslogtreecommitdiff
path: root/lib/CGI
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-11 14:51:11 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-11 14:51:11 +0000
commit3acbd4f53b544ab36759ef8cf0a6fcc4f696a8d0 (patch)
treee424814abda372636cc7c52882d37af15a8a1a89 /lib/CGI
parentadd55984a417ef0bc7fcde2e3ae7dd9e93bbf85b (diff)
downloadperl-3acbd4f53b544ab36759ef8cf0a6fcc4f696a8d0.tar.gz
Upgrade to CGI.pm 2.79. Manual tweaks were
necessary in form.t and html.t @INC setups. p4raw-id: //depot/perl@14189
Diffstat (limited to 'lib/CGI')
-rw-r--r--lib/CGI/Carp.pm13
-rwxr-xr-xlib/CGI/t/form.t9
-rwxr-xr-xlib/CGI/t/html.t13
3 files changed, 16 insertions, 19 deletions
diff --git a/lib/CGI/Carp.pm b/lib/CGI/Carp.pm
index 317fdf8553..a3b8b40678 100644
--- a/lib/CGI/Carp.pm
+++ b/lib/CGI/Carp.pm
@@ -217,7 +217,8 @@ CGI::Response
require 5.000;
use Exporter;
-use Carp;
+#use Carp;
+BEGIN { require Carp; }
use File::Spec;
@ISA = qw(Exporter);
@@ -226,7 +227,7 @@ use File::Spec;
$main::SIG{__WARN__}=\&CGI::Carp::warn;
$main::SIG{__DIE__}=\&CGI::Carp::die;
-$CGI::Carp::VERSION = '1.21';
+$CGI::Carp::VERSION = '1.22';
$CGI::Carp::CUSTOM_MSG = undef;
# fancy import routine detects and handles 'errorWrap' specially.
@@ -317,18 +318,10 @@ sub set_message {
return $CGI::Carp::CUSTOM_MSG;
}
-# Avoid generating "subroutine redefined" warnings with the following
-# hack:
-{
- local $^W=0;
- eval <<EOF;
sub confess { CGI::Carp::die Carp::longmess \@_; }
sub croak { CGI::Carp::die Carp::shortmess \@_; }
sub carp { CGI::Carp::warn Carp::shortmess \@_; }
sub cluck { CGI::Carp::warn Carp::longmess \@_; }
-EOF
- ;
-}
# We have to be ready to accept a filehandle as a reference
# or a string.
diff --git a/lib/CGI/t/form.t b/lib/CGI/t/form.t
index ae6ed59eef..612e2e1650 100755
--- a/lib/CGI/t/form.t
+++ b/lib/CGI/t/form.t
@@ -5,9 +5,10 @@ BEGIN {
if ($ENV{PERL_CORE}) {
@INC = '../lib';
} else {
- # Due to a bug in older versions of MakeMaker & Test::Harness, we must
- # ensure the blib's are in @INC, else we might use the core CGI.pm
- unshift @INC, qw( ../blib/lib ../blib/arch lib );
+ # Due to a bug in older versions of MakeMaker & Test::Harness,
+ # we must ensure the blib's are in @INC, else we might use
+ # the core CGI.pm
+ unshift @INC, qw( ../blib/lib ../blib/arch ../lib );
}
}
@@ -127,7 +128,7 @@ is(popup_menu(-name => 'game',
<select name="game">
<option value="checkers">checkers</option>
<option value="chess">chess</option>
-<option selected="1" value="cribbage">cribbage</option>
+<option selected="1" value="cribbage">cribbage</option>
</select>
END
diff --git a/lib/CGI/t/html.t b/lib/CGI/t/html.t
index 97fdb0a665..1070a18108 100755
--- a/lib/CGI/t/html.t
+++ b/lib/CGI/t/html.t
@@ -5,7 +5,10 @@ BEGIN {
if ($ENV{PERL_CORE}) {
@INC = '../lib';
} else {
- unshift @INC, qw( ../blib/lib ../blib/arch lib );
+ # Due to a bug in older versions of MakeMaker & Test::Harness,
+ # we must ensure the blib's are in @INC, else we might use
+ # the core CGI.pm
+ unshift @INC, qw( ../blib/lib ../blib/arch ../lib );
}
}
# Test ability to retrieve HTTP request info
@@ -62,8 +65,8 @@ test(12,header(-nph=>1) =~ m!HTTP/1.0 200 OK${CRLF}Server: cmdline${CRLF}Date:.+
test(13,start_html() ."\n" eq <<END,"start_html()");
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
- "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>Untitled Document</title>
</head><body>
END
@@ -78,8 +81,8 @@ END
test(15,start_html(-Title=>'The world of foo') ."\n" eq <<END,"start_html()");
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
- "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>The world of foo</title>
</head><body>
END