]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - lib/CGI/Ex.pm
CGI::Ex 2.37
[chaz/p5-CGI-Ex] / lib / CGI / Ex.pm
index 09e5139d26ac82b9fdd7b868506ed31ff7980a03..b18f5ee204ac76a90a441fddb6e0de043379363a 100644 (file)
@@ -7,7 +7,7 @@ CGI::Ex - CGI utility suite - makes powerful application writing fun and easy
 =cut
 
 ###----------------------------------------------------------------###
-#  Copyright 2007 - Paul Seamons                                     #
+#  Copyright 2003-2012 - Paul Seamons                                #
 #  Distributed under the Perl Artistic License without warranty      #
 ###----------------------------------------------------------------###
 
@@ -24,7 +24,7 @@ use vars qw($VERSION
 use base qw(Exporter);
 
 BEGIN {
-    $VERSION               = '2.27';
+    $VERSION               = '2.37';
     $PREFERRED_CGI_MODULE  ||= 'CGI';
     @EXPORT = ();
     @EXPORT_OK = qw(get_form
@@ -163,7 +163,7 @@ sub make_form {
         my $val = $form->{$key};
         $key =~ s/([^\w.\-\ ])/sprintf('%%%02X', ord $1)/eg;
         $key =~ y/ /+/;
-        foreach (ref($val) ? @$val : $val) {
+        foreach (ref($val) eq 'ARRAY' ? @$val : $val) {
             my $_val = $_; # make a copy
             $_val =~ s/([^\w.\-\ ])/sprintf('%%%02X', ord $1)/eg;
             $_val =~ y/ /+/;
@@ -195,7 +195,7 @@ sub get_cookies {
     my %hash = ();
     foreach my $key ($obj->cookie) {
         my @val = $obj->cookie($key);
-        $hash{$key} = ($#val == -1) ? next : ($#val == 0) ? $val[0] : \@val;
+        $hash{$key} = ($#val == -1) ? "" : ($#val == 0) ? $val[0] : \@val;
     }
     return $self->{'cookies'} = \%hash;
 }
This page took 0.020746 seconds and 4 git commands to generate.