From: Tomas Valla Date: Wed, 9 Jul 2003 01:29:16 +0000 (+0000) Subject: Patch to allow processing of multiple occurences of the same argument. X-Git-Tag: holmes-import~1220 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=911dabf14ae24f49f4a2e055aa29c667a6b129a5;p=libucw.git Patch to allow processing of multiple occurences of the same argument. Now it returns a string of values separated by "&". --- diff --git a/lib/perl/CGI.pm b/lib/perl/CGI.pm index 024a1451..9bd19bd3 100644 --- a/lib/perl/CGI.pm +++ b/lib/perl/CGI.pm @@ -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'}} .= "&".$_; + } } }