diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-25 15:49:41 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-25 15:49:41 +0000 |
commit | e5968490f3f6ffa25854e567a6d8f2347430c3e1 (patch) | |
tree | fa905bf34c11acbdf2c34c7976ddd411041cd80a | |
parent | 0fdb2ba797fc839a26054a56162ab93da269f786 (diff) | |
download | perl-e5968490f3f6ffa25854e567a6d8f2347430c3e1.tar.gz |
Integrate:
[ 20875]
Upgrade to CGI.pm 3.00.
[ 20876]
Keep the CGI::Util VERSION at 1.31 since there have been changes
since Perl 5.8.0.
[ 20877]
Change the VERSION since there are now changes since Perl 5.8.0.
[ 20878]
Document even more ways of affecting your "utf8ness".
[ 20879]
Subject: Please update my address
From: Ed Avis <ed@membled.com>
Date: Mon, 25 Aug 2003 13:16:45 +0100 (BST)
Message-ID: <Pine.LNX.4.20L2.0308251314530.29902-100000@budvar.future-i.net>
(Just the AUTHORS part, though, I don't think retroactively
updating the Changes* is useful.)
[ 20880]
Subject: [PATCH] valgrind and /#/x
From: Dave Mitchell <davem@fdgroup.com>
Date: Mon, 25 Aug 2003 13:27:49 +0100
Message-ID: <20030825122748.GA15560@fdgroup.com>
[ 20881]
UVSIZE is not yet defined when it would be needed
by MULTIARCH. So go back to LONGSIZE, and (belt-
and-suspenders-and-rope style) later in UVSIZE
possibly redefine BYTEORDER.
p4raw-link: @20881 on //depot/perl: 050a890dfac58c5fb0e87881b6731a50e42b72bc
p4raw-link: @20880 on //depot/perl: e25e13010f33e943d98a02c701fcec90c1ad6a11
p4raw-link: @20879 on //depot/perl: 0aa38fa1157d012b85942b1714a3f2e70208b9a7
p4raw-link: @20878 on //depot/perl: a74e8b4571c841138aec148a654ce0bd3bbab6e0
p4raw-link: @20877 on //depot/perl: 1dc5365a5b4c223ec27fb1bd1204f55701296e28
p4raw-link: @20876 on //depot/perl: c51122bc861fc9c2e400b41ac55d6bb798bd6147
p4raw-link: @20875 on //depot/perl: cff9980965379582a7e6bc54ef5e679209355670
p4raw-id: //depot/maint-5.8/perl@20883
p4raw-integrated: from //depot/perl@20874 'copy in'
ext/I18N/Langinfo/Langinfo.pm (@13703..) lib/CGI.pm (@20247..)
AUTHORS (@20553..) lib/CGI/Util.pm (@20699..) lib/utf8.pm
(@20822..) Configure config_h.SH (@20856..) 'merge in'
regcomp.c (@20405..)
-rw-r--r-- | AUTHORS | 2 | ||||
-rwxr-xr-x | Configure | 2 | ||||
-rw-r--r-- | config_h.SH | 21 | ||||
-rw-r--r-- | ext/I18N/Langinfo/Langinfo.pm | 2 | ||||
-rw-r--r-- | lib/CGI.pm | 31 | ||||
-rw-r--r-- | lib/CGI/Util.pm | 2 | ||||
-rw-r--r-- | lib/utf8.pm | 5 | ||||
-rw-r--r-- | regcomp.c | 3 |
8 files changed, 46 insertions, 22 deletions
@@ -201,7 +201,7 @@ Dov Grobgeld <dov@Orbotech.Co.IL> Drago Goricanec <drago@raptor.otsd.ts.fujitsu.co.jp> Ed Mooring <mooring@Lynx.COM> Ed Peschko <epeschko@den-mdev1> -Edward Avis <epa98@doc.ic.ac.uk> +Edward Avis <ed@membled.com> Edward Moy <emoy@apple.com> Edward Peschko <edwardp@excitehome.net> Elaine -HFB- Ashton <elaine@chaos.wustl.edu> @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sat Aug 23 13:26:16 EEST 2003 [metaconfig 3.0 PL70] +# Generated on Mon Aug 25 19:47:58 EEST 2003 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF diff --git a/config_h.SH b/config_h.SH index 96c7d060ee..a40ec44d34 100644 --- a/config_h.SH +++ b/config_h.SH @@ -987,19 +987,19 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #if defined(USE_CROSS_COMPILE) || defined(MULTIARCH) # ifdef __LITTLE_ENDIAN__ -# if UVSIZE == 4 +# if LONGSIZE == 4 # define BYTEORDER 0x1234 # else -# if UVSIZE == 8 +# if LONGSIZE == 8 # define BYTEORDER 0x12345678 # endif # endif # else # ifdef __BIG_ENDIAN__ -# if UVSIZE == 4 +# if LONGSIZE == 4 # define BYTEORDER 0x4321 # else -# if UVSIZE == 8 +# if LONGSIZE == 8 # define BYTEORDER 0x87654321 # endif # endif @@ -3228,6 +3228,19 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define NVSIZE $nvsize /**/ #$d_nv_preserves_uv NV_PRESERVES_UV #define NV_PRESERVES_UV_BITS $nv_preserves_uv_bits +#if UVSIZE == 8 +# ifdef BYTEORDER +# if BYTEORDER == 0x1234 +# undef BYTEORDER +# define BYTEORDER 0x12345678 +# else +# if BYTEORDER == 0x4321 +# undef BYTEORDER +# define BYTEORDER 0x87654321 +# endif +# endif +# endif +#endif /* IVdf: * This symbol defines the format string used for printing a Perl IV diff --git a/ext/I18N/Langinfo/Langinfo.pm b/ext/I18N/Langinfo/Langinfo.pm index b052d185d4..cebff73fb2 100644 --- a/ext/I18N/Langinfo/Langinfo.pm +++ b/ext/I18N/Langinfo/Langinfo.pm @@ -73,7 +73,7 @@ our @EXPORT_OK = qw( YESSTR ); -our $VERSION = '0.01'; +our $VERSION = '0.02'; sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() diff --git a/lib/CGI.pm b/lib/CGI.pm index 31574000d1..9f65f7d02b 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -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.127 2003/06/18 19:57:21 lstein Exp $'; -$CGI::VERSION='2.98'; +$CGI::revision = '$Id: CGI.pm,v 1.130 2003/08/01 14:39:17 lstein Exp $ + patches by merlyn'; +$CGI::VERSION='3.00'; # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -1639,12 +1639,11 @@ sub startform { $method = lc($method) || 'post'; $enctype = $enctype || &URL_ENCODED; unless (defined $action) { - $action = $self->url(-absolute=>1,-path=>1); + $action = $self->escapeHTML($self->url(-absolute=>1,-path=>1)); if (length($ENV{QUERY_STRING})>0) { - $action .= "?$ENV{QUERY_STRING}"; + $action .= "?".$self->escapeHTML($ENV{QUERY_STRING},1); } } - $action =~ s/\"/%22/g; # fix cross-site scripting bug reported by obscure $action = qq(action="$action"); my($other) = @other ? " @other" : ''; $self->{'.parametersToAdd'}={}; @@ -3584,10 +3583,12 @@ END_OF_AUTOLOAD #################################################################################### package CGITempFile; -$SL = $CGI::SL; -$MAC = $CGI::OS eq 'MACINTOSH'; -my ($vol) = $MAC ? MacPerl::Volumes() =~ /:(.*)/ : ""; -unless ($TMPDIRECTORY) { +sub find_tempdir { + undef $TMPDIRECTORY; + $SL = $CGI::SL; + $MAC = $CGI::OS eq 'MACINTOSH'; + my ($vol) = $MAC ? MacPerl::Volumes() =~ /:(.*)/ : ""; + unless ($TMPDIRECTORY) { @TEMP=("${SL}usr${SL}tmp","${SL}var${SL}tmp", "C:${SL}temp","${SL}tmp","${SL}temp", "${vol}${SL}Temporary Items", @@ -3605,11 +3606,14 @@ unless ($TMPDIRECTORY) { # unshift(@TEMP,(eval {(getpwuid($>))[7]}).'/tmp') if $CGI::OS eq 'UNIX' and $> != 0; foreach (@TEMP) { - do {$TMPDIRECTORY = $_; last} if -d $_ && -w _; + do {$TMPDIRECTORY = $_; last} if -d $_ && -w _; } + } + $TMPDIRECTORY = $MAC ? "" : "." unless $TMPDIRECTORY; } -$TMPDIRECTORY = $MAC ? "" : "." unless $TMPDIRECTORY; +find_tempdir(); + $MAXTRIES = 5000; # cute feature, but overload implementation broke it @@ -3634,6 +3638,7 @@ $AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD'; sub new { my($package,$sequence) = @_; my $filename; + find_tempdir() unless -w $TMPDIRECTORY; for (my $i = 0; $i < $MAXTRIES; $i++) { last if ! -f ($filename = sprintf("${TMPDIRECTORY}${SL}CGItemp%d",$sequence++)); } @@ -4941,7 +4946,7 @@ Generate just the protocol and net location, as in http://www.foo.com:8000 =head2 MIXING POST AND URL PARAMETERS - $color = $query->url_param('color'); + $color = $query->url_param('color'); It is possible for a script to receive CGI parameters in the URL as well as in the fill-out form by creating a form that POSTs to a URL @@ -5696,6 +5701,8 @@ a pointer to an associative array relating menu values to another associative array with the attribute's name as the key and the attribute's value as the value. +=back + =head2 CREATING A SCROLLING LIST print $query->scrolling_list('list_name', diff --git a/lib/CGI/Util.pm b/lib/CGI/Util.pm index 6c5d543c97..e0e7a84228 100644 --- a/lib/CGI/Util.pm +++ b/lib/CGI/Util.pm @@ -167,7 +167,7 @@ sub utf8_chr ($) { } elsif ($c < 0x80000000) { return sprintf("%c%c%c%c%c%c", - 0xfe | ($c >> 30), + 0xfc | ($c >> 30), 0x80 | (($c >> 24) & 0x3f), 0x80 | (($c >> 18) & 0x3f), 0x80 | (($c >> 12) & 0x3f), diff --git a/lib/utf8.pm b/lib/utf8.pm index 9039447b16..f5eebe7fba 100644 --- a/lib/utf8.pm +++ b/lib/utf8.pm @@ -64,6 +64,9 @@ pragma will effectively become a no-op. For convenience in what follows the term I<UTF-X> is used to refer to UTF-8 on ASCII and ISO Latin based platforms and UTF-EBCDIC on EBCDIC based platforms. +See also the effects of the C<-C> switch and its cousin, the +C<$ENV{PERL_UNICODE}>, in L<perlrun>. + Enabling the C<utf8> pragma has the following effect: =over 4 @@ -184,6 +187,6 @@ portable answers. =head1 SEE ALSO -L<perluniintro>, L<encoding>, L<perlunicode>, L<bytes> +L<perluniintro>, L<encoding>, L<perlrun>, L<bytes>, L<perlunicode> =cut @@ -4280,7 +4280,8 @@ S_nextchar(pTHX_ RExC_state_t *pRExC_state) else if (*RExC_parse == '#') { while (*RExC_parse && *RExC_parse != '\n') RExC_parse++; - RExC_parse++; + if (*RExC_parse) + RExC_parse++; continue; } } |