diff options
author | 2008-09-29 17:35:51 +0000 | |
---|---|---|
committer | 2008-09-29 17:35:51 +0000 | |
commit | 7bfa9f444b545f1bc96a4b2919ed2583bf07c7ea (patch) | |
tree | a27ed65c25e4fb26d9bca8126dbdf2b189894d6a /gnu/usr.bin/perl/lib/CGI/Util.pm | |
parent | import perl 5.10.0 from CPAN (diff) | |
download | wireguard-openbsd-7bfa9f444b545f1bc96a4b2919ed2583bf07c7ea.tar.xz wireguard-openbsd-7bfa9f444b545f1bc96a4b2919ed2583bf07c7ea.zip |
fix conflicts and merge in local changes to perl 5.10.0
Diffstat (limited to 'gnu/usr.bin/perl/lib/CGI/Util.pm')
-rw-r--r-- | gnu/usr.bin/perl/lib/CGI/Util.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gnu/usr.bin/perl/lib/CGI/Util.pm b/gnu/usr.bin/perl/lib/CGI/Util.pm index 523007c5ef5..56ab3616ef7 100644 --- a/gnu/usr.bin/perl/lib/CGI/Util.pm +++ b/gnu/usr.bin/perl/lib/CGI/Util.pm @@ -7,7 +7,7 @@ require Exporter; @EXPORT_OK = qw(rearrange make_attributes unescape escape expires ebcdic2ascii ascii2ebcdic); -$VERSION = '1.5'; +$VERSION = '1.5_01'; $EBCDIC = "\t" ne "\011"; # (ord('^') == 95) for codepage 1047 as on os390, vmesa @@ -201,11 +201,11 @@ sub escape { my $toencode = shift; return undef unless defined($toencode); # force bytes while preserving backward compatibility -- dankogai - $toencode = pack("C*", unpack("C*", $toencode)); + $toencode = pack("C*", unpack("U0C*", $toencode)); if ($EBCDIC) { - $toencode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",$E2A[ord($1)])/eg; + $toencode=~s/([^a-zA-Z0-9_.~-])/uc sprintf("%%%02x",$E2A[ord($1)])/eg; } else { - $toencode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg; + $toencode=~s/([^a-zA-Z0-9_.~-])/uc sprintf("%%%02x",ord($1))/eg; } return $toencode; } @@ -258,13 +258,13 @@ sub expire_calc { # specifying the date yourself my($offset); if (!$time || (lc($time) eq 'now')) { - $offset = 0; + $offset = 0; } elsif ($time=~/^\d+/) { - return $time; - } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([mhdMy]?)/) { - $offset = ($mult{$2} || 1)*$1; + return $time; + } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([smhdMy])/) { + $offset = ($mult{$2} || 1)*$1; } else { - return $time; + return $time; } return (time+$offset); } |