Thanks Kõike hääd,


But I can't get this going.



My Sample Code:



sub TEST {

            my $name = param('test');

            my $ID = param('ID');

            return {Message => "Welcome to Montoo Update Event $name $ID"};

}



get '/method/Entity=:test&ID=:ID' => \&TEST;







Let me Know in case of any further informations required.



Thanks

Anand.





-----Original Message-----
From: dancer-users [mailto:[email protected]] On Behalf Of WK
Sent: Wednesday, September 16, 2015 3:40 PM
To: Perl Dancer users mailing list
Subject: Re: [dancer-users] How to pass Named Arguments in Dancer URL



2015-09-16 12:39 GMT+03:00 Parthiban, Anandaraaj 
<[email protected]<mailto:[email protected]>>:



> But How do we pass that

>

> Let me Know in case of any further informations required.



get '/method' => sub {

  # you have two ways to access params from query string :

  # first, there is Dancer keyword `param`

  my $name = param('name');



  # second, there is Dancer method `params`

  my $id = params->{ 'id' };



  # do whatever you need here

};



Wbr,

--

Kõike hääd,



Gunnar

_______________________________________________

dancer-users mailing list

[email protected]<mailto:[email protected]>

http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to