in reply to HTML::Template and authenticated sessions

You should check out CGI::Session. I personally would not suggest the use of a cookie as a session tracking thingie. I mean, there is always the possibility of the client side (can be a script, browser) not accepting cookies. It is relatively easy to track sessions using server side logic. Based on your session ID (which uniquely identifies each user), you can then output different HTML templates. You would of course have to decide on a convenient naming scheme for your template files, or you could generate these templates in your Perl script itself (based on session ID)

  • Comment on Re: HTML::Template and authenticated sessions

Replies are listed 'Best First'.
Re^2: HTML::Template and authenticated sessions
by dragonchild (Archbishop) on May 10, 2005 at 17:53 UTC
    It is relatively easy to track sessions using server side logic.

    And how do you associate each incoming request with a given session? It's either cookies or some SID on the URL ... unless, of course, you have mastered the HTTP 3.1415926 ESP extension ...


    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
      Yeah, I'd like to second the above question. How the hell do you associate session id's with a client's request with out cookies? Sure you could embed session ids in the url, but that is hideously ugly and very prone to insecurities, such as sharing urls.