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

I am looking into session management options for perl and i have found CGI::Session and Apache::session. I have noticed that Apache::session does have an oracle driver, where as CGI::Session does not, which would be nice since we are using oracle. Anyone have a preference for one over the other?

Replies are listed 'Best First'.
Re: CGI-Session Vs. Apache-Session
by jdtoronto (Prior) on Dec 31, 2003 at 16:40 UTC
    CGI::Session was originally written as a wrapper around Apache::Session. CGI::Session is more flexible and offers easier access to the session itself to store info in the actual session.

    Whether the DB driver is important is twfold. If you need to only store a little information for a short period of time then use a FILE driver with either to reduce overhead. I use persistent sessions and store a lot of info on them, for me the DB makes more sense - we don't actually do a lot of session access but we store upwards of 50,000 sessions at any given time.

    There is a shell for sriting a new storage module for CGI::Session, but I can offer you no advice - I have never written one.

    jdtoronto

Re: CGI-Session Vs. Apache-Session
by talexb (Chancellor) on Dec 31, 2003 at 16:18 UTC

    Well, I used CGI::Session and it works fine. I use the file method for storing the sessions and it works OK.

    You could always install the module and extend it to handle Oracle. I can't imagine it's that complicated to do, but it does depend on your level of expertise with Perl and DBI.

    Alex / talexb / Toronto

    Life is short: get busy!

Re: CGI-Session Vs. Apache-Session
by perrin (Chancellor) on Dec 31, 2003 at 16:40 UTC
    The Apache::Session Oracle driver works. If you prefer CGI::Session (which is more actively supported by its author), you can probably use the PostgreSQL driver with minimal changes.