On 09/10/2013 04:16 PM, Hugues Max wrote:
In fact a search a solution to DO NOT repeat in my code something like

my $PATHXLS  = config->{'PATHXLS'}.session 'numclient'
for each route


for the moment
in:
get '/outils' => sub {
I add:         my $PATHXLS  = config->{'PATHXLS'}.session 'numclient'

post '/outils' => sub {
I add:         my $PATHXLS  = config->{'PATHXLS'}.session 'numclient'

if I have 10 sessions setting, I need to add 10 lines per route
etc...
what is the solution ?

Adding your session settings to vars in "before" hook and using these
vars in routes should work.

Regards
           Racke


--
Perl and Dancer Development

Visit our Open Source conference on E-commerce:

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

Reply via email to