Hi On 15/04/2011 16:22, Nick Knutov wrote:
$ dancer -v Dancer 1.3030
dancer -a test2
$ cat ./lib/test2.pm ============ package test2; use Dancer ':syntax';
use Data::Dumper;
any '/ticket/:tid/set' => sub { my $tid = params->{tid}; return Dumper(params->{assign}); };
get '/ticket/:tid/assign' => sub { my $tid = params->{tid}; return forward "/ticket/$tid/set?assign=1"; };
true;
Dancer does not support in its current form that you forward with GET parameters (as far as I can tell). It can't find the route. You are getting the error on the marshalling code because of other bug that I fixed, and I'm preparing in a Pull Request. After updating to that code you will get a 404 page. Not very useful as well. I'll create an issue regarding passing parameters in a forward, so someone (probably me) can fix it in the future. For now, I would suggest you to use path variables to get your desired behavior. Cheers ambs