[dancer-users] route handler for a URL that matches a token

John McDermott, CPLP jjm at jkintl.com
Thu Sep 17 18:58:30 BST 2015


I have
get '/list/:start/:end' => sub {

     return getlist(params->{start}, params->{end});
}
in a working project.

So params->{incoming_token} is the value you want.

--john
On 9/17/2015 11:28 AM, Richard Reina wrote:
>
>     ;
>     You dont need define variable here. Also you should use "=>"
>     instead of "=" as follow.
>
>     incoming_token => params->{token}
>
>
>
> Ok, but now how can I access the value of incoming_token? Is it now a 
> scalar?
>
> How can I use it to do for example
>
> if (incoming_token eq 'blahblablah) { #then do something }
>
> To me if it doesn't have $ in front of it I don't know how to handle it.
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

-- 
John J. McDermott, CPLP
Learning and Performance Consultant
jjm at jkintl.com 575/737-8556
Check out my security blog posts
Add an A for the Arts To STEM and get STEAM and a strong engine to move forward.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150917/5f97b10f/attachment.html>


More information about the dancer-users mailing list