Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: RFC: Proposed tutorial - simple login script using CGI::Application

by eric256 (Parson)
on Jun 19, 2007 at 20:30 UTC ( #622098=note: print w/replies, xml ) Need Help??


in reply to RFC: Proposed tutorial - simple login script using CGI::Application

Hey,

This looks very detailed and i'm actualy anxious to try it out myself. A few points though. I don't like your line numbers. I have an editor that does line numbers and perlmonks itself I have configured for line numbers, your number don't match those and add a layer of confusion. I can't download everything and work from your line numbers and run the scripts, since the line numbers break the script so that part bugs me. Also while mentioning the line numbers it would be nice if they were bold so i could see a line i was curious about and then jump up to your explanation. I don't know if I'm alone, but I like to read the code and only read the text when I am confused.

Second I think any beginner is going to see that huge list of modules and the length of this and be quite afraid. Maybe eliminate some of the unneeded modules? AutoRun and Config are definitely nice, but if you went without your code doesn't get much worse while the prerequisite list will drop down.

Finaly, for the mysql username addition, you probably want to mention they can use the MD5 function in mysql to get that hash. You should be able to just change the example to

insert into user_info (username, password) values ( 'username', md5('password') );


___________
Eric Hodges
  • Comment on Re: RFC: Proposed tutorial - simple login script using CGI::Application
  • Download Code

Replies are listed 'Best First'.
Re^2: RFC: Proposed tutorial - simple login script using CGI::Application
by scorpio17 (Canon) on Jun 19, 2007 at 21:18 UTC
    Eric256,

    My intent, for those who actually want to run the script, was for you to download the files, then run the provided perl one-liner to strip the numbers out. For example, you could download Simple.pm, then run this:

    perl -p -i.orig -e 's/^=\s+\d+\s+= //' Simple.pm
    

    And you'll have a working copy of Simple.pm (no line numbers) and a backup called Simple.pm.orig (line numbers included) that you can use to follow along with the tutorial.

    I'm guessing your editor numbers each file starting at line 1. This makes perfect sense, but if I numbered the listings that way it would get confusing because of the overlap (i.e., 7 listings => 7 line number 1's, etc.). I concatenated all the files together, then ran a script to prepend the numbers, so that each line would have a unique identifier.

    But I'm open to suggestions - if there's a better way to do it, I'm willing to give it a try. I'll wait a few days and see what other people suggest/recommend.

    Thanks for the feedback.

      For the line numbers you could do Simple.pm:10-15 or something like that. I for one would find that much less confusing. Plus once i've downloaded and stripped the line numbers to actualy use it, your directions are now useless because they no longer match the line numbers.


      ___________
      Eric Hodges
      ...download the files, then ... strip the numbers out

      Please don't. That is really inconvenient for your readers/users. PerlMonks supports adding line numbers automatically to code blocks. You can turn it on for yourself while you're writing your post; turn it off again later if you don't want it. As it stands, I'm not at all inclined to download your code.

      I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
Re^2: RFC: Proposed tutorial - simple login script using CGI::Application
by FunkyMonk (Chancellor) on Jun 19, 2007 at 20:50 UTC
    Second I think any beginner is going to see that huge list of modules and the length of this and be quite afraid.
    I liked the contents and wouldn't like to see any of it dropped. What about splitting it into several linked tutorials. Each tutorial could add another feature to the application (a bit like the Catalyst tutorial).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://622098]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-04-19 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?