Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by Anonymous Monk
on Jun 11, 2005 at 04:47 UTC ( [id://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 authorize.pl) 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 authorize.pl" 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 authorize.pl and place a simple "&validate" or "&create"

Thanks

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 (Parson) 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.
    meh.
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="http://perl.apache.org>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
    Rio-PM

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://465748]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found