http://qs321.pair.com?node_id=272390

Greetings High and Mighty Monks.

I've got a module I'm considering putting on CPAN, and I'd like your thoughts on the issue. As I can already hear the impending forehead *slap* as I find the 99%-functionally-equivalent module that's already on CPAN, I'd just like to mention that I've done a fair bit of searching, and haven't seen anything quite like this yet.

The Pitch
How many times have you gotten started on a new project, only to have to go through the tedious, yet necessary process of setting up a user/session management system? Logging in, logging out, "Forgot my password"...

Well no more! Now with a minimal amount of setup, you too can have a fully-functional user login system based on CGI::Application!

By simply including the line:
    use base LoginRequired::DBI;
in your application, all of your login difficulties will disappear! If someone calls the script without being logged in, they're brought to the login screen. If they've forgotten their password, they can have it emailed to them. If they don't have an account, they can create one.

The Small Print
Okay, it's obviously not *quite* as simple as that, but the as-yet-unwritten pod will provide the details on how to use each of these features. Most of the setup involves things like defining database username and password, and column-names for the logins, password, email, etc. Most of these have defaults, so it's literally a 2-minute job to make a LoginRequired application.

I've tried to make the module generic in the sense that it can be easily modified for different databases and different methods of storing sessions (right now it uses Apache::Session). But I've also tried to restrict it to four basic operations to prevent it from getting too bloated (login, logout, retrieve password, and create user).

I'm already looking forward to the day when I won't even have to think the word "login" again. What do you think of the whole thing?

James Beninger