[Dancer-users] Bug in `forward`?

ambs ambs+dancer at perl-hackers.net
Fri Apr 15 14:44:10 CEST 2011


On 15/04/2011 12:37, Nick Knutov wrote:
> But why? As I understood from documentation, 'any' includes all of them,
> including 'get' and 'post'. And it is working for direct queries. Why
> should I specify them additionally?

As far as I know (but I might be wrong, so, anyone else, correct me) any 
doesn't include all. It lets a route chose from a list.

If you want them all, really, add:

any ['get','post','put',...], '...'

Cheers
Alberto

>
>
> On 15.04.2011 14:05, ambs wrote:
>> On 15/04/2011 02:19, Nick Knutov wrote:
>>> return forward "/ticket/$tid/set?assign=1";
>>>
>>> Not an ARRAY reference at /usr/local/share/perl/5.10.1/Dancer/Route.pm
>>> line 167.
>>>
>>> Am I doing something wrong?
>>>
>>> ps:I have `any '/ticket/:tid/set' => sub {...};`
>>>
>> Hello
>>
>>
>> any ['get','post'] '/ticket...
>>
>> You need to specify the set from which any will act.
>>
>> Cheers
>



More information about the Dancer-users mailing list