Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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

In reply to Never Write Another Login Script Again! by jbeninger

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (4)
    As of 2018-06-19 09:39 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (112 votes). Check out past polls.