10 Sep
2013
10 Sep
'13
2:25 p.m.
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/