Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I can't seem to get CGI::Session to work. I've perl v5.10.0 installed. Both CGI and CGI::Session are installed as follows:

name ¦ version ¦ area CGI ¦ 3.41 ¦ perl CGI-Session ¦ 4.38 ¦ site
My script contains the two lines below to try and use CGI::Session:
use CGI::Session; my $session = new CGI::Session("driver:File", undef, {Directory=>'F:/w +eb/sessions'}) or bail_out(CGI::Session->errstr);

The error message I got is (printed via bail_out):

new(): failed: couldn\'t load CGI::Session::Serialize::default: Bareword "full_opset" not allowed while "strict subs" in use at C:/perl/lib/Opcode.pm line 45. Compilation failed in require at C:/perl/lib/Safe.pm line 35. BEGIN failed--compilation aborted at C:/perl/lib/Safe.pm line 35. Compilation failed in require at C:/perl/site/lib/CGI/Session/Serialize/default.pm line 6. BEGIN failed--compilation aborted at C:/perl/site/lib/CGI/Session/Serialize/default.pm line 6. Compilation failed in require at (eval 9) line 3.

I'm pretty lost here. Do I have to install other modules that CGI::Session depend on to get it to work?

Please help and thanks in advance.

Replies are listed 'Best First'.
Re: CGI Session help
by Anonymous Monk on Dec 09, 2008 at 10:42 UTC
Re: CGI Session help
by Anonymous Monk on Dec 09, 2008 at 13:19 UTC

    I found what the problem was.

    I had a module named "Subs.pm" and somehow that crashed with CGI::Session. After I renamed it, the code above works.