diff -r -u Mason.orig/Compiler/ToObject.pm Mason/Compiler/ToObject.pm
--- Mason.orig/Compiler/ToObject.pm	2004-12-31 11:51:34.000000000 +0000
+++ Mason/Compiler/ToObject.pm	2004-12-31 13:11:47.000000000 +0000
@@ -49,6 +49,11 @@
          { parse => 'string', type => SCALAR, default => 'auto',
            regex => qr/^(?:always|auto|never)$/,
            descr => "Whether or not to create the %ARGS hash" },
+
+         repeated_arg_into_scalar =>
+         { parse => 'string', type => SCALAR, default => 'arrayref',
+           regex => qr/^(?:arrayref|firstvalue|lastvalue|error)$/,
+           descr => "How to store multi-valued arguments into scalars within the top-level component" },
 	);
 }
 
@@ -56,6 +61,7 @@
     ( read_write => [ map { [ $_ => __PACKAGE__->validation_spec->{$_} ] }
 		      qw( comp_class
                           define_args_hash
+			  repeated_arg_into_scalar
                           in_package
 			  postamble
 			  preamble
@@ -444,6 +450,8 @@
 EOF
     }
 
+    my $repeated_arg_into_scalar = $self->repeated_arg_into_scalar;
+
     foreach ( @{ $self->{current_compile}{args} } )
     {
 	my $var_name = "$_->{type}$_->{name}";
@@ -458,7 +466,25 @@
 	}
 	else
 	{
-	    $coerce = $arg_in_array;
+	    if ($repeated_arg_into_scalar eq "arrayref")
+	    {
+		$coerce = $arg_in_array;
+	    }
+	    elsif ($repeated_arg_into_scalar eq "error")
+	    {
+		my $name = $_->{name};
+		$coerce = " do {"
+			. " my \$t = $arg_in_array;"
+			. " HTML::Mason::Exception::Params->throw( error => \"multiple values sent for single-value parameter '$name'\" )"
+			.  " if ref(\$t) and not \$m->callers(1);"
+			. " \$t"
+			. " }";
+	    }
+	    else
+	    {
+		my $idx = (($repeated_arg_into_scalar eq "firstvalue") ? 0 : -1);
+	    	$coerce = "do { my \$t = $arg_in_array; \$t=\$t->[$idx] if ref(\$t) and not \$m->callers(1); \$t }";
+	    }
 	}
 
 	push @assign, "#line $_->{line} $_->{file}\n"
@@ -636,6 +662,17 @@
 Not defining the args hash means that we can avoid copying component
 arguments, which can save memory and slightly improve execution speed.
 
+=item repeated_arg_into_scalar
+
+How to store multi-valued arguments into scalars within the top-level
+component.  In other words, what to do with C<?foo=X&foo=Y&foo=Z> if
+your C<E<lt>%argsE<gt>> block has declared foo to be a scalar (C<$foo>).
+
+If "arrayref", then C<$foo> will become an array ref of all the values:
+C<$foo=['X','Y','Z']>.  If "firstvalue" or "lastvalue", all but the
+first (or last) value will be discarded: C<$foo='X'> or C<$foo='Z'>.
+If "error", then an error will be thrown.
+
 =back
 
 =head1 METHODS
diff -r -u Mason.orig/Params.pod Mason/Params.pod
--- Mason.orig/Params.pod	2003-12-12 21:08:14.000000000 +0000
+++ Mason/Params.pod	2004-12-31 13:14:33.000000000 +0000
@@ -1036,6 +1036,48 @@
 L<postprocess_text|HTML::Mason::Params/postprocess_text> and L<postprocess_perl|HTML::Mason::Params/postprocess_perl>.
 
 
+=head2 repeated_arg_into_scalar
+
+=over 4
+
+=item * Perl name:           repeated_arg_into_scalar
+
+=item * Apache name:         MasonRepeatedArgIntoScalar
+
+=item * Type in httpd.conf:  string
+
+=item * Default:             arrayref
+
+=item * Belongs to:          L<HTML::Mason::Compiler::ToObject|HTML::Mason::Compiler::ToObject>
+
+
+
+
+=back
+
+Suppose your component, C<test.html> includes:
+
+    <%args>
+    $foo
+    </%args>
+
+What ends up in C<$foo> if you C<GET /test.html?foo=X&foo=Y&foo=Z> ?
+
+If C<repeated_arg_into_scalar> is "arrayref" (the default), then
+C<$foo> will be an array reference: C<$foo=['X','Y','Z']> .
+
+If it is "firstvalue", then C<$foo> will be just the first value from
+that array: C<$foo='X'> .
+
+If it is "lastvalue", then C<$foo> will be just the last value from
+that array: C<$foo='Z'> .
+
+If it is "error", then an error will be thrown.
+
+This setting only affects arguments declared as scalars, and only in the
+top-level component.
+
+
 =head2 request_class
 
 =over 4
