(e-mail address removed) said:
You've already shown that you don't even know the area of HTTP/CGI as
well as the author of the CGI module does, so you've managed to prove
the point of using the modules.
yes...but it is so cool to know soap or http and it is really pretty
simple...just read one or two RFC's and something about soap and then
you can interface all you want via IO::Socket
Yes, the basic model in those is easy. Yet there are quite a list of
details to remember (the separator character in CGI param lists being
one of them). And to make your program work correctly, you'll have to
get all those details correct.
Also, if it so happens that to get something done, you're only allocated
three hours time, you don't want to spend any time on such pieces of
code that you know someone else has already written (and that have
been widely tested in various of real-life conditions). And definitely
you don't want to end up writing code for all those details again and
again for each of your projects. So, this boils down to writing [and
MAINTAINING!] your own module to implement some functionality (or making
a cut-n-paste of code implementing some functionality) when you're
writing code for some new project where that functionality is needed.
Now, consider a situation where you have done this your own way; having
few hundreds of CGI programs around, each having the CGI functionality
copied from one of the others, but slightly modified, as you realized it
didn't quite work correctly for this specific case. Perhaps even the CGI
functionality is partly intermixed with your application logic, because
you could that way optimize away one variable and three operations.
Then something in the specifications change (like the change from &-
delimited param lists to ;-delimited ones). What do you do to make your
scripts compliant with this change? You hand-edit each of the scripts.
What does the "dumb" programmer who used the module? He replaces the
module, once per each machine where he has those scripts running. With
bad luck there may be couple of scripts that did depend on some detail
of the module interface that did change along with the other changes in
the module, but that's the extent of the change.
One important measure of programmer ability is the maintainability of
the produced code (don't know about you, but in the real life code
is written to be used and modified, not to be thrown away). Modules
inherently improve maintainability, so avoiding the use of them is a
very worrying sign in a programmer.
Of course, if you can show that a module is so badly implemented that
you can do the same thing better, then it's good to have a discussion
with the author of that module, providing your insights and proposals
for improvement -- or even writing a competing module, if the author
doesn't like to implement your proposed changes.
Writing small pieces of throwaway code to learn how some things work
(like for learning CGI), is just fine. But that doesn't give any grounds
for starting a crusade against use of modules, and there's no reason
to brag that you're so smart you can do something that can also be
achieved by a module (especially when you in the same message claim
that what the module does is trivial - and later still show you don't
know the details of even those trivialities). And as the module (with
the details implemented correctly) already existed, you weren't even
creating anything new.
I also did my own code testing to learn/verify some issues of the CGI.
After satisfying my curiosity (and after starting to write real code
where CGI was needed), I switched over to use the module. This is "best
of both worlds" solution: I'm not wasting my time (nor that of my
employer) reimplementing and maintaining something someone else already
does. Still when it is needed, I also know the underlying technology
(which, as you say, is not hard).