in reply to CGI::Session Compilation Issues

You don't show us your code, but the "undefined value" means that you did not initialize a variable but try to use it as an object:

my $session; # session is not defined print $session->id;

Again, had you shown us the relevant parts of your script, we could help you more.

Replies are listed 'Best First'.
Re^2: CGI::Session Compilation Issues
by rpike (Scribe) on Feb 22, 2010 at 20:09 UTC
    My apologies. Never copied the example part of the question I had.
    #declared earlier using our $session = new CGI::Session("driver:File", undef, {Directory=>$perl_sessions}); #--- Storing the session id (this is where the browser complains $wCookie = $query->cookie(-name => "wweb", -value => $session->id);

      So $session is not defined. Either you didn't show the relevant parts of the script, as in, a self-contained, runnable, minimal script that reproduces the error, or the $session you're using to print is not the $session you declared further above. Also, read the CGI::Session documentation for ->new. It says Constructor. Returns new session object, or undef on failure. So, if there is an error when constructing the session, it might return undef. Maybe because your $perl_sessions directory does not exist.

        I included the line where the constructor is called. The only thing regarding $session above that is the declaration of the variable. If I run the perl script by itself on the same server the perl script works fine, compiling the script using PDK and running it from the same directory doesn't. It gives the error I previously posted. The directory does exist, checked and it works for the perl script. Do you know what dependencies there are for CGI::Session?