Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: CGI::Session - trouble passing variables

by Lori713 (Pilgrim)
on Mar 01, 2004 at 22:28 UTC ( [id://333078]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI::Session - trouble passing variables
in thread CGI::Session - trouble passing variables

As I mentioned in the initial post, both $sid and $session are carried through and re-called by the function &call_vars (and my use strict would have complained loudly about undeclared variables). It works very well for me on every other variable I move from one page to another. However, maybe I shouldn't try to carry $sid and $session like the other variables even though they're scalar variables and the hidden field method I was using works well.

I was considering CGI::Session because I needed to pass along a referenced array used in my HTML::Template. Hidden fields would not work for a referenced array, so I was looking for something to maintain persistent state. Thanks for taking a look at it.

Lori

Replies are listed 'Best First'.
Re: Re: Re: CGI::Session - trouble passing variables
by antirice (Priest) on Mar 01, 2004 at 22:59 UTC

    You're not trying to pass $session through the form right? You're supposed to retrieve the session using $session = CGI::Session->new('driver:File',$sid,{Directory=>'/blah'};. Only the session id should be passed to the page.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1

      Actually, I've tried it several ways... passing each, passing both, not passing any, not passing one or the other...

      I also tried putting the retrieval code at the top of the next .pl so it would pull the session ID. It keeps coming back as "1" (which my guess would be that means "true" or "false".

      Thanks for everyone's replies. Unfortunately, I am running out of time and have opted to go with an uglier method just so I can meet my deadline (well, actually, the deadline was February 1st) as best I can. I hope to get back to it after the crunch of user testing and see if I can figure out a cleaner, more maintainable code.

      I appreciate everyone's help!

      Lori

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://333078]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-23 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found