in reply to Porting from cgi::session to using built in activeperl management

A) Yell at your hosts for being stupid.

B) CGI::Session is a "perl only" module, which means all you need to install it is simply upload it to some folder then tell perl where to find it.
  • Comment on Re: Porting from cgi::session to using built in activeperl management

Replies are listed 'Best First'.
Re^2: Porting from cgi::session to using built in activeperl management
by meredith (Friar) on Jul 12, 2004 at 19:53 UTC

    To clarify what BUU said, A) You should probably communicate more with your boss. B) lib.pm is likely what you want.

    Say you can upload to C:\WWW\, make a directory called lib. Under lib\, add a directory, CGI, and Session.pm inside that. Now, before your code tries to pull in CGI::Session, do a use lib 'C:\WWW\lib';.

    Actually, './' is always in @INC, so you could just make the CGI directory in the same folder as your scripts (say C:\WWW\HTDOCS\), but that could get messy.

    mhoward - at - hattmoward.org
      Ok, I will try that. I also found some help at  http://www.rcbowen.com/imho/perl/modules.html if anyone else may ever need it. Thanks!
      I'm still getting an error and I'm a little confused. Please tell me if I'm doing this correct. I used the link to go to cpan.org and I clicked on the Source link, copied, and saved it to a file as  lib.pm. I then uploaded it to the top of the directory in the server. I then created a sub-dir from the top-level-dir called lib and a sub-dir in this called CGI where I put the source file Session.pm. I then tried to access the script I was using it for and got a server error. I included the file as
      use lib '\lib';
      Then I tried  use lib '/lib' and use lib 'lib'; I'm not sure what I'm doing wrong here or missing and I know the script works b/c when I take out the use lib... part it runs fine. Please help. Thanks

        Eeek! lib.pm is a core module, you should already have it. I'm not entirely clear about the layout you've created, but I think it's a matter of relative paths. Try using an absolute path to the lib directory.

        Maybe referring you to this will help. You can look at my scripts, the layout, and the INSTALL file to see what I've done.

        mhoward - at - hattmoward.org
        Remove the lib.pm file you put there, it doesn't do what you think.

        Keep the "use lib" line. It tells perl where it can find modules. So after that line in the script, perl looks under C:/lib/, and if it looks for CGI::Session, it will look for the file C:/lib/CGI/Session.pm

        CGI::Session uses a few more internal classes besides the CGI/Session.pm file. I suggest you download the entire module from CPAN. When you unzip the file you'll find the Session directory somewhere. That directory and it's contents (including subdirs) is what you should upload to the "/lib/CGI" directory in your example.

        Hope That Helps,

        /J

Re^2: Porting from cgi::session to using built in activeperl management
by shaolindoman (Acolyte) on Jul 12, 2004 at 19:54 UTC
    *Sign of relief* SO I don't have to rewrite all of my session management scripts. That is a big relief. Now this may sound stupid but I'm used to installing modules the "normal" way.
    perl Makefile.PL make make test make install
    How do I do this "manually" where I actually put the file in the directory. I assume on the use CGI::Session I specify a path. However, I'm not sure what and where everything is supposed to go. Thanks so much. (btw, I decided to switch host today since parcom seems to not support anything I need Any suggestions for good windows perl host are welcome).
      Why are you trying to find a *windows* *host*? Especially if you're using perl and such like.
        I have to use windows because all of the files are in MS Access (I have no control over that) and I heard trying to use a Unix driver for MS Access is a total pain. I could convert everything to MySQL. Problem is I have alot of programs that use LWP that have to write directly to the Access database for the company to use. And I really don't have the skills or the time to write a program to convert everything into access and then to mySQL on the fly.