},
'CGI' => {
- 'DISTRIBUTION' => 'MARKSTOS/CGI.pm-3.63.tar.gz',
+ 'DISTRIBUTION' => 'MARKSTOS/CGI.pm-3.64.tar.gz',
'FILES' => q[cpan/CGI],
'EXCLUDED' => [
qr{^examples/},
package CGI;
require 5.008001;
+use if $] >= 5.019, 'deprecate';
use Carp 'croak';
# See the bottom of this file for the POD documentation. Search for the
# The most recent version and complete docs are available at:
# http://search.cpan.org/dist/CGI.pm
-# The revision is no longer being updated since moving to git.
+# 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.63';
+$CGI::VERSION='3.64';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
$AutoloadClass = $DefaultClass unless defined $CGI::AutoloadClass;
# The path separator is a slash, backslash or semicolon, depending
-# on the paltform.
+# on the platform.
$SL = {
UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/', NETWARE => '/',
WINDOWS => '\\', DOS => '\\', MACINTOSH => ':', VMS => '/'
sub user_agent {
my($self,$match)=self_or_CGI(@_);
my $user_agent = $self->http('user_agent');
- return $user_agent unless $match && $user_agent;
+ return $user_agent unless defined $match && $match && $user_agent;
return $user_agent =~ /$match/i;
}
END_OF_FUNC
and manipulation, and processing and preparing HTTP headers. Some HTML
generation utilities are included as well.
-CGI.pm performs very well in in a vanilla CGI.pm environment and also comes
+CGI.pm performs very well in a vanilla CGI.pm environment and also comes
with built-in support for mod_perl and mod_perl2 as well as FastCGI.
It has the benefit of having developed and refined over 10 years with input
The old-style positional parameters are as follows:
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
helps resolve relative addresses to absolute ones when the document is moved,
but makes the document hierarchy non-portable. Use with care!
-=item 4, 5, 6...
-
-Any other parameters you want to include in the <body> tag. This is a good
-place to put HTML extensions, such as colors and wallpaper patterns.
-
=back
+Other parameters you want to include in the <body> tag may be appended
+to these. This is a good place to put HTML extensions, such as colors and
+wallpaper patterns.
+
=head2 ENDING THE HTML DOCUMENT:
print $q->end_html;
textfield() will return a text input field.
-=over 4
+B<Parameters>
-=item B<Parameters>
+=over 4
=item 1.
or by calling the new method B<start_multipart_form()> instead of
vanilla B<start_form()>.
-=over 4
+B<Parameters>
-=item B<Parameters>
+=over 4
=item 1.
scrolling_list() creates a scrolling list.
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
checkbox_group() creates a list of checkboxes that are related
by the same name.
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
=back
-
The optional B<-labels> argument is a pointer to a hash
relating the checkbox values to the user-visible labels that will be
printed next to them. If not provided, the values will be used as the
checkbox() is used to create an isolated checkbox that isn't logically
related to any others.
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
radio_group() creates a set of logically-related radio buttons
(turning one member of the group on turns the others off)
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
=back
-
All modern browsers can take advantage of the optional parameters
B<-rows>, and B<-columns>. These parameters cause radio_group() to
return an HTML3 compatible table containing the radio group formatted
submit() will create the query submission button. Every form
should have one of these.
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
is useful for passing state variable information from one invocation
of the script to the next.
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
and "button_name.y", where "button_name" is the name you've assigned
to it.
-=over 4
+B<Parameters:>
-=item B<Parameters:>
+=over 4
=item 1.
The second argument (-src) is also required and specifies the URL
=item 3.
+
The third option (-align, optional) is an alignment type, and may be
TOP, BOTTOM or MIDDLE
package CGI::Apache;
use CGI;
+use if $] >= 5.019, 'deprecate';
-$VERSION = '1.01';
+$VERSION = '1.02';
1;
__END__
package CGI::Carp;
+use if $] >= 5.019, 'deprecate';
=head1 NAME
Even though the
fatalsToBrower support takes precautions to avoid this,
you still may get the error message printed to STDOUT.
-This may have some undesireable effects when the purpose of doing the
+This may have some undesirable 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:
+bodies if this is desirable: For example:
eval {
local $CGI::Carp::TO_BROWSER = 0;
$main::SIG{__WARN__}=\&CGI::Carp::warn;
-$CGI::Carp::VERSION = '3.51';
+$CGI::Carp::VERSION = '3.64';
$CGI::Carp::CUSTOM_MSG = undef;
$CGI::Carp::DIE_HANDLER = undef;
$CGI::Carp::TO_BROWSER = 1;
use strict;
use warnings;
+use if $] >= 5.019, 'deprecate';
+
# See the bottom of this file for the POD documentation. Search for the
# string '=head'.
# wish, but if you redistribute a modified version, please attach a note
# listing the modifications you have made.
-our $VERSION='1.30';
+our $VERSION='1.31';
use CGI::Util qw(rearrange unescape escape);
use overload '""' => \&as_string, 'cmp' => \&compare, 'fallback' => 1;
through HTTP Requests. This cookie will be inaccessible via JavaScript
(to prevent XSS attacks).
-This feature is only supported by recent browsers like Internet Explorer
-6 Service Pack 1, Firefox 3.0 and Opera 9.5 (and later of course).
+This feature is supported by nearly all modern browsers.
See these URLs for more information:
http://msdn.microsoft.com/en-us/library/ms533046.aspx
- http://www.owasp.org/index.php/HTTPOnly#Browsers_Supporting_HTTPOnly
+ http://www.browserscope.org/?category=security&v=top
=back
package CGI::Fast;
use strict;
+use if $] >= 5.019, 'deprecate';
# A way to say "use warnings" that's compatible with even older perls.
# making it local will not affect the code that loads this module
# wish, but if you redistribute a modified version, please attach a note
# listing the modifications you have made.
-$CGI::Fast::VERSION='1.09';
+$CGI::Fast::VERSION='1.10';
use CGI;
use FCGI;
# Perl 5 distribution).
use strict;
+use if $] >= 5.019, 'deprecate';
use CGI ();
-$CGI::Pretty::VERSION = '3.46';
+$CGI::Pretty::VERSION = '3.64';
$CGI::DefaultClass = __PACKAGE__;
$CGI::Pretty::AutoloadClass = 'CGI';
@CGI::Pretty::ISA = qw( CGI );
# This is the string used for indentation of tags
$CGI::Pretty::INDENT = "\t";
- # This is the string used for seperation between tags
+ # This is the string used for separation between tags
$CGI::Pretty::LINEBREAK = $/;
# These tags are not prettify'd.
package CGI::Push;
+use if $] >= 5.019, 'deprecate';
# See the bottom of this file for the POD documentation. Search for the
# string '=head'.
# The most recent version and complete docs are available at:
# http://stein.cshl.org/WWW/software/CGI/
-$CGI::Push::VERSION='1.05';
+$CGI::Push::VERSION='1.06';
use CGI;
use CGI::Util 'rearrange';
@ISA = ('CGI');
package CGI::Switch;
+use if $] >= 5.019, 'deprecate';
use CGI;
-$VERSION = '1.01';
+$VERSION = '1.02';
1;
use base 'Exporter';
require 5.008001;
use strict;
+use if $] >= 5.019, 'deprecate';
our @EXPORT_OK = qw(rearrange rearrange_header make_attributes unescape escape
expires ebcdic2ascii ascii2ebcdic);
-our $VERSION = '3.62';
+our $VERSION = '3.64';
use constant EBCDIC => "\t" ne "\011";
# Byte strings were traditionally used directly as a sequence of octets.
# This worked if they actually represented binary data (i.e. in CGI::Compress).
# This also worked if these byte strings were actually utf-8 encoded; e.g.,
-# when the source file used utf-8 without the apropriate "use utf8;".
+# when the source file used utf-8 without the appropriate "use utf8;".
# This fails if the byte string is actually a Latin 1 encoded string, but it
# was always so and cannot be fixed without breaking the binary data case.
# -- Stepan Kasal <skasal@redhat.com>
'$q->url(-rewrite=>1,-path=>1), with rewriting detected' );
is( $q->url(-rewrite=>0,-path=>0), 'http://example.com/real/cgi-bin/dispatch.cgi',
'$q->url(-rewrite=>0,-path=>1), with rewriting detected' );
- done_testing();
+};
+
+subtest 'RT#58377: + in PATH_INFO' => sub {
+ local $ENV{PATH_INFO} = '/hello+world';
+ local $ENV{HTTP_X_FORWARDED_HOST} = undef;
+ local $ENV{'HTTP_HOST'} = 'example.com';
+ local $ENV{'SCRIPT_NAME'} = '/script/plus+name.cgi';
+ local $ENV{'SCRIPT_FILENAME'} = '/script/plus+filename.cgi';
+
+ my $q = CGI->new;
+ is($q->url(), 'http://example.com/script/plus+name.cgi', 'a plus sign in a script name is preserved when calling url()');
+ is($q->path_info(), '/hello+world', 'a plus sign in a script name is preserved when calling path_info()');
};
=item *
-L<XXX> has been upgraded from version A.xx to B.yy.
+L<CGI> has been upgraded from version 3.63 to 3.64.
+
+Avoids a warning about "undefined variable in user_agent" in some cases, and
+updates L<CGI::Cookie> documentation to reflect that "HttpOnly" is widely
+supported.
=back