in reply to Re: A "newbies" thoughts on cgi.pm...
in thread A "newbies" thoughts on cgi.pm...

Two points:
  1. Writing your own CGI.pm or Text::Template or Data::Dumper or whatever is always a good idea, unless you're pressed for time. I didn't bother with CGI.pm for the first dozen CGIs I wrote. (I also didn't make those CGIs available where anyone remotely unfriendly might use them.) I even started writing my own module. And I refuse to agree that it was a bad idea, because I now appreciate CGI.pm more than I ever would have if I had mindlessly followed the "writing a CGI? Use CGI.pm!" advice. I know more about the sorts of problems it's handling for me, and when things break it's likely that I'll be able to immediately infer the root cause of the symptoms I observe.

    Note that I am not advising publicly deploying anything that relies on a home-grown module in an area you're not an expert. But if your aspirations are anywhere above being a mindless code flunky, you will have to reimplement a whole set of wheels. Any experienced programmer will tell you, usually with a self-deprecating laugh, of a whole set of lumpy wheels they carved themselves even though in retrospect it seems like a waste of time.

  2. The assertion that it doesn't matter whether you understand what's going on internally is ridiculous. If you follow that path, you'll find yourself in a room full of monkeys typing frantically on keyboards, changing things randomly until the compiler stops giving those damn syntax errors. We all started out that way, remember? I've inherited a lot of code from people who are still like that in a figurative sense, and that shit ain't Shakespeare.
I know I'm reading too much into the comments I'm responding to, but I just think it's a bad idea to chastise someone for reinventing the wheel. If you manage to convince everyone, there'll be nobody left who really understands how things work. And don't worry -- they'll eventually figure out the advantages of reuse for themselves. In fact, they'll understand the advantages better because they'll know what a pain it must have been to write the stuff they're reusing. As long as it doesn't clutter up CPAN or end up on an accessible (exploitable) server, it's purely a good thing.
  • Comment on Re: Re: A "newbies" thoughts on cgi.pm...