2015-08-24 20:36 GMT+03:00 Richard Reina <[email protected]>:

> Thanks again for the reply.  When I try it your way:
>
> redirect "/sport_add/$id";
>
> Dancer attempts to serve up the page /sport_add/105 (105 being an the value
> of $ID) and of course gets an error. Not sure what I am doing wrong.

Did you set up get-route like in my example? It is required to show
actual data from database.

> are you saying that hook before makes the var S_id global? I have tried
> invoking it briefly in other routes and it did not seem to be in scope.

before-hook is run on every request, it is not scoped. In your last
example you use sigil with ($) var-method. Is it intentional? "var" is
is here keyword from Dancer DSL and using sigil here for identifier
gets interpolated, I think.


Wbr,
-- 
Kõike hääd,

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

Reply via email to