]> mj.ucw.cz Git - libucw.git/commitdiff
Patch to allow processing of multiple occurences of the same argument.
authorTomas Valla <tom@ucw.cz>
Wed, 9 Jul 2003 01:29:16 +0000 (01:29 +0000)
committerTomas Valla <tom@ucw.cz>
Wed, 9 Jul 2003 01:29:16 +0000 (01:29 +0000)
Now it returns a string of values separated by "&".

lib/perl/CGI.pm

index 024a14518a64d6f727a1f2a8d63769cb5fada6bb..9bd19bd34da0d1bc308464074d94b89f1544b38a 100644 (file)
@@ -53,7 +53,11 @@ sub parse_arg_string($) {
                if (my $rx = $arg->{'check'}) {
                        if (!/^$rx$/) { $_ = $arg->{'default'}; }
                }
-               ${$arg->{'var'}} = $_;
+               if (${$arg->{'var'}} eq $arg->{'default'}) {
+                       ${$arg->{'var'}} = $_;
+               } else {
+                       ${$arg->{'var'}} .= "&".$_;
+               }
        }
 }