summaryrefslogtreecommitdiff
path: root/cpan/CGI
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-11-04 13:05:12 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2012-11-04 13:05:12 +0000
commitf5e87f961187cd72b7425ff1a947e5aaa4349032 (patch)
tree90032c193a8fa9605590ebeae6c0324c37ec52de /cpan/CGI
parenta257baa941934d6be15629d94b8d770b15c46b21 (diff)
downloadperl-f5e87f961187cd72b7425ff1a947e5aaa4349032.tar.gz
Update CGI to CPAN version 3.61
[DELTA] Version 3.61 Nov 2nd, 2012 (No code changes) [INTERNALS] - formatting of CGI::Carp documentation was improved. Thanks to benkasminbullock. - un-TODO some tests in t/tmpdir.t that were passing in most cases. More on this: https://github.com/markstos/CGI.pm/issues/19# https://github.com/markstos/CGI.pm/commit/cc73dc9807b0fabb56b3cdf1a9726588b2eda0f7
Diffstat (limited to 'cpan/CGI')
-rw-r--r--cpan/CGI/Changes11
-rw-r--r--cpan/CGI/lib/CGI.pm2
-rw-r--r--cpan/CGI/lib/CGI/Carp.pm69
-rw-r--r--cpan/CGI/t/tmpdir.t13
4 files changed, 51 insertions, 44 deletions
diff --git a/cpan/CGI/Changes b/cpan/CGI/Changes
index 68ef980b17..de312d9b8e 100644
--- a/cpan/CGI/Changes
+++ b/cpan/CGI/Changes
@@ -1,3 +1,14 @@
+Version 3.61 Nov 2nd, 2012
+
+ (No code changes)
+
+ [INTERNALS]
+ - formatting of CGI::Carp documentation was improved. Thanks to benkasminbullock.
+ - un-TODO some tests in t/tmpdir.t that were passing in most cases.
+ More on this:
+ https://github.com/markstos/CGI.pm/issues/19#
+ https://github.com/markstos/CGI.pm/commit/cc73dc9807b0fabb56b3cdf1a9726588b2eda0f7
+
Version 3.60 Aug 15th, 2012
[BUG FIXES]
diff --git a/cpan/CGI/lib/CGI.pm b/cpan/CGI/lib/CGI.pm
index f510680768..8a6cca0afb 100644
--- a/cpan/CGI/lib/CGI.pm
+++ b/cpan/CGI/lib/CGI.pm
@@ -20,7 +20,7 @@ use Carp 'croak';
# The revision is no longer being updated since moving to git.
$CGI::revision = '$Id: CGI.pm,v 1.266 2009/07/30 16:32:34 lstein Exp $';
-$CGI::VERSION='3.60';
+$CGI::VERSION='3.61';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
diff --git a/cpan/CGI/lib/CGI/Carp.pm b/cpan/CGI/lib/CGI/Carp.pm
index 9d644d9c94..c2145cafa4 100644
--- a/cpan/CGI/lib/CGI/Carp.pm
+++ b/cpan/CGI/lib/CGI/Carp.pm
@@ -33,9 +33,9 @@ with
use CGI::Carp
-And the standard warn(), die (), croak(), confess() and carp() calls
-will automagically be replaced with functions that write out nicely
-time-stamped messages to the HTTP server error log.
+The standard warn(), die (), croak(), confess() and carp() calls will
+be replaced with functions that write time-stamped messages to the
+HTTP server error log.
For example:
@@ -57,10 +57,10 @@ saying
use CGI::Carp qw(carpout);
-The carpout() function requires one argument, which should be a
-reference to an open filehandle for writing errors. It should be
-called in a C<BEGIN> block at the top of the CGI application so that
-compiler errors will be caught. Example:
+The carpout() function requires one argument, a reference to an open
+filehandle for writing errors. It should be called in a C<BEGIN>
+block at the top of the CGI application so that compiler errors will
+be caught. Example:
BEGIN {
use CGI::Carp qw(carpout);
@@ -69,14 +69,15 @@ compiler errors will be caught. Example:
carpout(LOG);
}
-carpout() does not handle file locking on the log for you at this point.
-Also, note that carpout() does not work with in-memory file handles, although
-a patch would be welcome to address that.
+carpout() does not handle file locking on the log for you at this
+point. Also, note that carpout() does not work with in-memory file
+handles, although a patch would be welcome to address that.
-The real STDERR is not closed -- it is moved to CGI::Carp::SAVEERR. Some
-servers, when dealing with CGI scripts, close their connection to the
-browser when the script closes STDOUT and STDERR. CGI::Carp::SAVEERR is there to
-prevent this from happening prematurely.
+The real STDERR is not closed -- it is moved to CGI::Carp::SAVEERR.
+Some servers, when dealing with CGI scripts, close their connection to
+the browser when the script closes STDOUT and STDERR.
+CGI::Carp::SAVEERR is there to prevent this from happening
+prematurely.
You can pass filehandles to carpout() in a variety of ways. The "correct"
way according to Tom Christiansen is to pass a reference to a filehandle
@@ -104,17 +105,17 @@ CGI::Carp methods is called to prevent the performance hit.
=head1 MAKING PERL ERRORS APPEAR IN THE BROWSER WINDOW
-If you want to send fatal (die, confess) errors to the browser, ask to
-import the special "fatalsToBrowser" subroutine:
+If you want to send fatal (die, confess) errors to the browser, import
+the special "fatalsToBrowser" subroutine:
use CGI::Carp qw(fatalsToBrowser);
die "Bad error here";
-Fatal errors will now be echoed to the browser as well as to the log. CGI::Carp
-arranges to send a minimal HTTP header to the browser so that even errors that
-occur in the early compile phase will be seen.
-Nonfatal errors will still be directed to the log file only (unless redirected
-with carpout).
+Fatal errors will now be echoed to the browser as well as to the log.
+CGI::Carp arranges to send a minimal HTTP header to the browser so
+that even errors that occur in the early compile phase will be seen.
+Nonfatal errors will still be directed to the log file only (unless
+redirected with carpout).
Note that fatalsToBrowser may B<not> work well with mod_perl version 2.0
and higher.
@@ -193,10 +194,10 @@ you still may get the error message printed to STDOUT.
This may have some undesireable effects when the purpose of doing the
eval is to determine which of several algorithms is to be used.
-By setting C<$CGI::Carp::TO_BROWSER> to 0 you can suppress printing the C<die> messages
-but without all of the complexity of using C<set_die_handler>.
-You can localize this effect to inside C<eval> bodies if this is desireable:
-For example:
+By setting C<$CGI::Carp::TO_BROWSER> to 0 you can suppress printing
+the C<die> messages but without all of the complexity of using
+C<set_die_handler>. You can localize this effect to inside C<eval>
+bodies if this is desireable: For example:
eval {
local $CGI::Carp::TO_BROWSER = 0;
@@ -207,12 +208,12 @@ For example:
=head1 MAKING WARNINGS APPEAR AS HTML COMMENTS
-It is now also possible to make non-fatal errors appear as HTML
-comments embedded in the output of your program. To enable this
-feature, export the new "warningsToBrowser" subroutine. Since sending
-warnings to the browser before the HTTP headers have been sent would
-cause an error, any warnings are stored in an internal buffer until
-you call the warningsToBrowser() subroutine with a true argument:
+It is also possible to make non-fatal errors appear as HTML comments
+embedded in the output of your program. To enable this feature,
+export the new "warningsToBrowser" subroutine. Since sending warnings
+to the browser before the HTTP headers have been sent would cause an
+error, any warnings are stored in an internal buffer until you call
+the warningsToBrowser() subroutine with a true argument:
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use CGI qw(:standard);
@@ -320,12 +321,10 @@ Copyright 1995-2002, Lincoln D. Stein. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
-Address bug reports and comments to: lstein@cshl.org
-
=head1 SEE ALSO
-Carp, CGI::Base, CGI::BasePlus, CGI::Request, CGI::MiniSvr, CGI::Form,
-CGI::Response
+L<Carp>, L<CGI::Base>, L<CGI::BasePlus>, L<CGI::Request>,
+L<CGI::MiniSvr>, L<CGI::Form>, L<CGI::Response>.
=cut
diff --git a/cpan/CGI/t/tmpdir.t b/cpan/CGI/t/tmpdir.t
index 1407356a2f..717cd8c75a 100644
--- a/cpan/CGI/t/tmpdir.t
+++ b/cpan/CGI/t/tmpdir.t
@@ -20,21 +20,18 @@ is($CGITempFile::TMPDIRECTORY, $testdir, "can pre-set \$CGITempFile::TMPDIRECTOR
CGITempFile->new;
is($CGITempFile::TMPDIRECTORY, $testdir, "\$CGITempFile::TMPDIRECTORY unchanged");
-TODO: {
- local $TODO = "figuring out why these tests fail on some platforms";
- ok(chmod 0500, $testdir, "revoking write access to $testdir");
- ok(! -w $testdir, "write access to $testdir revoked");
+ok(chmod 0500, $testdir, "revoking write access to $testdir");
+ok(! -w $testdir, "write access to $testdir revoked");
CGITempFile->new;
is($CGITempFile::TMPDIRECTORY, $testdir2,
- "unwritable \$CGITempFile::TMPDIRECTORY overridden");
+ "unwritable \$CGITempFile::TMPDIRECTORY overridden");
ok(chmod 0500, $testdir2, "revoking write access to $testdir2");
ok(! -w $testdir, "write access to $testdir revoked");
CGITempFile->new;
isnt($CGITempFile::TMPDIRECTORY, $testdir2,
- "unwritable \$ENV{TMPDIR} overridden");
+ "unwritable \$ENV{TMPDIR} overridden");
isnt($CGITempFile::TMPDIRECTORY, $testdir,
- "unwritable \$ENV{TMPDIR} not overridden with an unwritable \$CGITempFile::TMPDIRECTORY");
-}
+ "unwritable \$ENV{TMPDIR} not overridden with an unwritable \$CGITempFile::TMPDIRECTORY");
END { for ($testdir, $testdir2) { chmod 0700, $_; rmdir; } }