[dancer-users] get session info without route
Hugues Max
huguesmax at gmail.com
Tue Sep 10 10:03:55 BST 2013
Hello
I use Dancer 1.3118 with YAML session in config.
session: 'YAML' in config.yml
in my file.pm
I try to use
my $PATHXLS = config->{'PATHXLS'}. session 'numclient' .'/';
if this ligne is in any route (get , post, any .. ) it's working for
this route
but if this line is at beginning of file, outside of route , and I
want to use $PATHXLS, info of session 'numclient' is empty
I tried to use hook 'before'
my $PATHXLS;
hook 'before' => sub {
$PATHXLS = config->{'PATHXLS'}. session 'numclient' .'/';
};
debug $PATHXLS;
but this is the same problem , $PATHXLS is defined but without session info
do you have a idea to get a variable for all file with session info ?
bye
Hugues.
More information about the dancer-users
mailing list