[dancer-users] passing session user name from route sub to route sub

Richard Reina gatorreina at gmail.com
Tue Aug 25 02:51:56 BST 2015

When a user signs in I do this to send them to their page with log in.

        # Logged in successfully
        session username => $input_hash->{FName};
        redirect '/userpage';

However, I am wondering how I can pass the username from on sub to another
sub call within my MyApp.pm. So that as a user bounces to another page I
can do a database query for that user. For example, if the user goes to.

get '/JobsView' => sub {

    #query open jobs for the user


How do I get the username inside '/JobsView' so that I can use it for SQL

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150824/62ebcbf9/attachment.html>

More information about the dancer-users mailing list