[dancer-users] Retrieving params of fields with multiple values

Andrew Beverley andy at andybev.com
Fri Aug 22 11:25:21 BST 2014


On Thu, 2014-08-21 at 12:30 -0600, Maxwell Carey wrote:
> You can coerce everything into an arrayref like this (requires 5.10+):
> 
>     my $foo = param 'foo';
>     $foo = [ $foo // () ] if ref $foo ne 'ARRAY';
> 
>     for (@$foo) { ... }

Great, thanks for that (and thanks James) - certainly better than what I
was doing.

However, I still think it would be a neat little feature to be able to
write:

    my @foo = param 'foo'

(a bit like you can with uploads). Would a patch for such a feature be
accepted?

Thanks,

Andy





More information about the dancer-users mailing list