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

In a way I hope the answer to this question is "no", because I just spent the last while writing some script to handle different kinds of users coming to the site I'm working on, logging in, registering, getting their lost passwords emailed, returning without logging in within a specified period etc, etc. Then a friend (who had never heard of CPAN, unlike me) asked what I was doing and when I told her she said "lots of people must have to do that - isn't there a standard module for it?". And I tried and tried to think of a reason why there wouldn't be. But I couldn't. So tell me the worst at once, doctor...

§ George Sherston

Replies are listed 'Best First'.
Re: CGI::Login ?
by buck_mulligan (Novice) on Aug 31, 2001 at 14:00 UTC
    I believe the answer to this is "kind of". Some of the reasons that there wouldn't be a standard module/set of modules for these sorts of functions are:
    1. different backends (e.g. are the user data stored in a database, a flatfile, etc.?)
    2. different needs (e.g. session management, user history)
    3. different intended environments, exposure, and audiences and thus different constraints/concerns

    And besides, when it really comes down to it all you have to do is: get the username/password (or whatever), compare it to a value stored somewhere, and do something based on the result of this. A very small & trivial portion actually involves CGI.pm (namely, the creating login and post-login interfaces and grabbing CGI variables. Maybe.).

    This being said, I've heard other monks around here talk about several other modules on CPAN that have further abstracted common web tasks into API's for the aspiring perlmonkey to work with.

    Anybody care to mention any of these again?

Re: CGI::Login ?
by jepri (Parson) on Sep 01, 2001 at 06:21 UTC
    if you are using the Apache webserver consider the line of Apache modules, which do lots of stuff similar to what you want: Apache modules

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.