Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

I'm about to Learn how to use CGI::Session

by Anonymous Monk
on Jun 11, 2005 at 04:47 UTC ( #465748=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I hope its easy for me to learn how to use this module properly. It sort of scares the heck out of me for some reason :( ~~~~~

First, I have a couple of perl and html files that all require a session token/user from a cookie--- Would it make sense for me to write a separate perl file (lets say to have all the CGI::Session coding to validate, expire, delete, and logout? That way, each of the perl and html files on my website will use "require" to control the session management, ---that way I don't need all the CGI::Session coding throughout my perl and html files. Then I can just call sub routines from and place a simple "&validate" or "&create"

  • Comment on I'm about to Learn how to use CGI::Session

Replies are listed 'Best First'.
Re: I'm about to Learn how to use CGI::Session
by Joost (Canon) on Jun 11, 2005 at 13:08 UTC
Re: I'm about to Learn how to use CGI::Session
by stonecolddevin (Vicar) on Jun 11, 2005 at 10:30 UTC
    That would be a brilliant idea. As you get farther along and into bigger projects, you'll find organization and classification are CRITICAL to your code's success.
    It's pretty much standard to put frequently used functions in a library and call them as needed.
Re: I'm about to Learn how to use CGI::Session
by mda2 (Hermit) on Jun 13, 2005 at 02:21 UTC
    Itīs a good pratice, but if you have a big site, use of CGI to autenticate all page views can are a bad idea. CGI have costs with load, parse, compile and run.

    Eval use of <a href=">modperl to do it. See a good book Writing Apache Modules with Perl and C (See the code samples).

    On modperl environment you have Apache::Session like CGI::Session...

    Compare features (and dates):

  • Apache::Session
  • CGI::Session

    Marco Antonio

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://465748]
Approved by ikegami
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2018-05-24 10:42 GMT
Find Nodes?
    Voting Booth?