X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fperl%2FUCW%2FCGI.pm;h=d2468b8fe48b121dd35fca862f5ebbc22d384a4d;hb=d59f303c29db266d6360c38eb0b8c79e82226a60;hp=c8ec08db22666699ea52207b87372d3561ef8faa;hpb=bb8ec9cc7c5020868dce8d9a0ff6b4ba9667fca9;p=libucw.git diff --git a/ucw/perl/UCW/CGI.pm b/ucw/perl/UCW/CGI.pm index c8ec08db..d2468b8f 100644 --- a/ucw/perl/UCW/CGI.pm +++ b/ucw/perl/UCW/CGI.pm @@ -1,6 +1,6 @@ # Poor Man's CGI Module for Perl # -# (c) 2002--2010 Martin Mares +# (c) 2002--2011 Martin Mares # Slightly modified by Tomas Valla # # This software may be freely distributed and used according to the terms @@ -134,7 +134,7 @@ sub rfc822_deescape($) { sub http_get($) { my $h = shift @_; $h =~ tr/a-z-/A-Z_/; - return $ENV{"HTTP_$h"} || $ENV{"$h"}; + return $ENV{"HTTP_$h"} // $ENV{"$h"}; } ### Parsing of Arguments ### @@ -345,7 +345,7 @@ sub parse_multipart_form_data() { # BUG: IE 3.01 on Macintosh forgets to add the "--" at the start of the boundary string # as the MIME specs preach. Workaround borrowed from CGI.pm in Perl distribution. - my $agent = http_get("User-Agent") || ""; + my $agent = http_get("User-Agent") // ""; $boundary = "--$boundary" unless $agent =~ /MSIE\s+3\.0[12];\s*Mac/; $boundary = "\r\n$boundary"; $boundary_len = length($boundary) + 2;