Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
naikonta,

Thank you for the feedback.

About the number of modules used... I probably didn't give enough background. When I first began working with CGI::Appliction, creating a login form was one of the first things I wanted to do. CGI::Application assumes you're already familiar with CGI and HTML::Template, so if you're not, there's a fairly steep learning curve (but less so than, say, Catalyst! IMO). Browsing the list of plugins on CPAN (to avoid "reinventing the wheel") I found CGI::Application::Plugin::Authentication. At first, I thought this would be all I needed. But then I realized that it required CGI::Application::Plugin::Storable (unless you want to maintain state with cookies). And it also requires CGI::Application::Plugin::DBH, if you want your passwords stored in a database, instead of a text file. Well, the DBH plugin is really just a wrapper around DBI, so you have to read the documentation for both, but that's still not enough, because at that level it's independent of which database you actually plan to use. Once you decide on, say, mysql, then you have to look up the mysql specific driver modules to learn how to configure things properly, etc. So, what happened to me (and I suspect everyone else that goes down this path) is that you start looking at "just one module" and before you know it you've downloaded about 20 things from CPAN and have two dozen browser windows open to all the various documentation files and while you know all these things are supposed to work together (and each part may, in fact, have good docs and good examples), there is no example of everything put together in final form. So that's what I wanted to do. Too many tutorials are made up of code snippets, and the reader is left having to "connect the dots". The other problem is too much documentation. I am barely scratching the surface of what modules like DBI and Storable are capable of. But for what I want to do, I don't need to know 99% of what's documented - so it's a shame to spend all day reading it trying to find the one detail that you DO need to know.

As for the line numbers, I'm going to point the finger at Randal Schwartz. I love Randal! And his articles way-back-when in Web Techniques magazine really helped me learn how to program in perl. And he ALWAYS showed complete code listings with each line numbered, for easy reference. So I did my stuff the same way. I agree, it would be nice to upload a working demo online somewhere, maybe with a downloadable tar ball of all the code, to save people from having to download each piece and then strip off the line numbers (oh the horror!). But I don't currently have an ISP that allows CGI scripts, so that's not possible.

Including backlinks is an excellent idea. I actually had thought of that myself, but was too lazy to do it. I'll try to add that in, later.

One more thing - regarding my claim that it works. I'm running perl5.8, apache2, and red hat linux (RHEL4). So if anyone out there is trying to develop on win32, er, your milage may vary.


In reply to Re^2: RFC: Proposed tutorial - simple login script using CGI::Application by scorpio17
in thread RFC: Proposed tutorial - simple login script using CGI::Application by scorpio17

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-19 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found