The Spanish Inquisition wrote:
> Alan J. Flavell wrote:
>
>> Your apparent unwillingness to step right up and discuss the
>> substantive issues raised by John B does rather convey a message, you
>> know.
>
> Oh yes? What message is that? That I suck at my job?
No: that what you did, copy the source of a Thunderbird email message
and tweaking, is something I certainly wouldn't recommend if others have
to maintain the code at a point in time.
As I stated: spending one hour, or even two, at studying MIME::Lite will
give you the knowledge for not only solving the specific problem you
had, but will also give you something that might come in handy in the
feature.
I admit that not all CPAN modules are perfect, but as I stated, they get
better if people use them, instead of making up their own stuff.
At one time I was working on a Perl application that had 600+ (!) hand
coded Perl modules. About 6 people had been working on it, after each
other. Quite a lot of modules had code that was redundant, either
because someone else had added the code to another module, or worse, it
was a copy paste job.
Because everything was programmed in a hurry (since programming =
pressing keys must have been the impression they, or at least the
manager had) there was *zero* documentation.
Now I claim that a lot of those modules could have been replaced by CPAN
stuff. Yes, in some cases a wrapper would have been required.
Oh, I was replacing a programmer who gave up after 3 months, who
replaced a programmer who gave up after 3 months. I "left" them after a
similar time (I got fired, for non-related things, if you want to know,
email me). Anyway, I was already looking around for a different job.
If a module does x% of what you want, it might save you time. If it's a
well known module, and I think I can say that about MIME::Lite, you
might make your code easier to maintain, since there is a probability
that other programmers understand a part of your code, because they have
seen it before.
>> If you've been so widely active as you say, one wonders how many
>> maintenance programmers are cursing your name in the meantime (or
>> maybe they just tossed the code out and started again, as so often
>> happens with hand-knitted code).
>
> One wonders, but one doesn't know, does one? Tossing code out and
> starting over again can be a very healthy approach in my experience.
> One learns, doesn't one?
If you can toss out a CPAN module, and replace it by better code, please
do so. You benefit, and maybe I benefit. And if your code is better, the
person who is going to maintain your code might have already seen it.
> Or is refusing to agree with a fundamentalist application of
> principles 'refusing to learn'.
I consider "my code is better than yours (CPAN)" quite a
fundamentalistic view
> What do you want me to do? Confess? Repent?
>
> I for one wouldn't hire a programmer who demonstrates such rigidity as
> I meet here.
And I wouldn't hire a programmer who says: I copied the source of an
email and tweaked it a bit, because it was faster then reading CPAN
documentation

Especially since I might have to maintain that code.
> I rather work with flexible people.
Me too. And going to CPAN, picking a module, and taking the time to
learn it is what I call fexible. Copy and pasting something and tweaking
until it works, is not programming in my book.
I know Perl is often used to write run once programs. But I started to
keep those "run once" scripts, and notice that I often re use them,
because I forced myself to even code what I consider run once code in
such a way that I still can read it after 2 months.
> But then again, I don't
> have to go begging for Perl jobs on the web, quite the contrary
> actually.
I have to do that, for several reasons.
--
John Small Perl scripts:
http://johnbokma.com/perl/
Perl programmer available:
http://castleamber.com/
Happy Customers:
http://castleamber.com/testimonials.html