J
James Willmore
"I" was not told. I am not the original poster.
Sorry. Didn't mean to offend.
There is no problem using it. I am pretty sure it does it's work
pretty well. And I was not talking about this special case.
If you need the script to work without installing other 20 modules
from CPAN, this will do.
I disagree. I also think that your statement about "20 modules" is a
bit extreme. If I were to read into this, I'd say you're using a
dialup connection and are frustrated about the fact that you have a
hard time maintaining Perl and all the modules. I could be wrong.
I have seen some modules that have quite a few dependencies. Most of
them (the dependencies) were core Perl modules. When the core Perl
modules go out of date, it's time to upgrade Perl. It's like that
*everywhere*. When you see apps failing to install on a Linux system
- and they fail because of an outdated kernel version, it's time to
upgrade the kernel - and *all* the applications that are dependent
upon the kernel (like iptables). Granted, this example is Linux, but
it illustrates the fact that it's not just Perl, it's a lot of other
software/hardware/etc out there.
I was talking about the principle of checking CPAN for trivial
problems. Don't get me wrong, this may not be a trivial problem if
you have to run this script on GB or TB of data, several times a
minute/second. But if you run it once a day/week on some MB, should
be ok.
No - read on ...
The main think is productivity and what I am advocating is
"balance." Sometimes is faster/better your own, sometimes some CPAN
module. Decide when to go for one or the other is the difficult
part.
Again, I disagree. Why spend the extra time to find out that someone
else has already figured out what you need to do - and has *tested*
it. Sounds like you speak out of frustration and not anything
practical.
Let's look at something that's been posted *many* times here - the
famous "I can't use sendmail to send email in my script" example.
This issue would be moot if the person would just use one of the
*many* email modules available. Now you don't have to worry about
*what* the system you're using uses to send email. In fact, you could
use a system without *any* email server. Our NTP server at work uses
.... a Perl script ... to send email. No email services are on the
system at all. It uses a module to do this.
I suppose you *could* code using sockets and a whole lot of other
basic idioms of code to accomplish this. But you could *never* be
quite sure you have tested the code enough. Or that it would work
after, say, a system upgrade. With modules, this issue is reduced,
even eliminated, because the maintainers would take the time to apply
the appropriate fixes to the code. You just upgrade and, in most
cases, problem solved *before* you even know there's a problem
But, if you feel the need to "roll your own", then you're entitled to
do so
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
"Nuclear war would really set back cable." -- Ted Turner