[Catalyst] retrieving multiple values from forms
Matt S Trout
dbix-class at trout.me.uk
Mon Dec 17 21:01:53 GMT 2007
On Sat, Dec 15, 2007 at 01:10:52PM -0600, Andrew Rodland wrote:
> On Saturday 15 December 2007 11:58:12 am jagdish eashwar wrote:
> > Hi,
> >
> > The Catalyst Tutorial shows how to retrieve single values from a form.
> >
> > Example:- my $title = $c->request->params->{title} || '';
> >
> > How can I retrieve multiple values from a selection list into an array?
>
>
> See the perldoc for Catalyst::Request -- the 'param' method comes in handy
> here.
>
> @values = $c->req->param('whatever');
No it doesn't.
That method is there for CGI.pm compatibility. Don't use it in new code.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the Catalyst
mailing list