[Dancer-users] Keeping values on a form

David Precious davidp at preshweb.co.uk
Fri Dec 17 00:43:16 CET 2010



"Naveed Massjouni" <naveedm9 at gmail.com> wrote:
 
>This may not be very secure, but this is how I achieve 'stickiness':
>
>get '/foo' => sub {
>    # route code
>    template foo => {
>        params(),
>        other => 'stuff',
>    };
>};
>
>By passing params() into your template vars hash, it is evaluated in
>list context, so they will get expanded into key/value pairs and they
>will all get propogated to your template. 

I believe they're already passed in under params, so you can use e.g.:

[% params.foo %]

Not 100% certain, though.

-- 
David Precious <davidp at preshweb.co.uk>
Sent from my phone so please excuse brevity / poor quoting style etc


More information about the Dancer-users mailing list