|more useful options|
Re: A "newbies" thoughts on cgi.pm...by Amoe (Friar)
|on Apr 07, 2002 at 16:18 UTC||Need Help??|
I remember when I first learnt CGI.pm. The first thing I did was stare into the perldoc. I must have pressed enter about a thousand times. But I read it. And I saw in the examples that it was so much easier to use it than anything I could do on my own.
Why was this? Mainly because you can use as much or as little as you like. It goes with Larry's Perl philosophy in this way - it's very easy to speak a subset of CGI.pm. And most people do.
This is why I fail to see the fascination in writing your own param parser. They all end up looking the same anyway - some fat regex to decode the parameters, and setting a hash element to them as they arrive. It's not unmarked territory. It's not even fun.
With CGI.pm, you can use your own methods of HTML generation. It's up to you. As is everything. I don't see why you wouldn't want it to "slurp up STDIN". That's how you would have done your param parsing anyway, isn't it?
Writing a CGI.pm alternative is simply a waste of time, time that could be better spent analysing and augmenting the design of your script itself. So you don't know exactly how it works. I bet you don't know how a lot of things work. I don't think you know what your OS is doing every single second, but does that make you want to go and write your own OS? (Rhetorical.) Even if it did, would you go down that path?
Anyway, not meant to be harsh, just some things to ponder on.--