| [reply] |
I don't think you are doing it right. I mean, the idea is
good, but the execution is poorly. Sure, you have eliminated
the include path. But what about the path to perl? Why depend
on perl being installed? What if the installed perl was configured
with the "wrong" options? What about missing system libraries,
or wrong versions of them, or strangely set LD_LIBRARY_PATHs?
Why depend on that?
No, the least thing you should do is write a C program,
include a Perl interpreter from the C program, and run
your Perl code from within that interpreter. And then when
you compile, statically link everything in. Only then you
have a reasonable chance someone else will be able to run
it. And it's really neat for the maintenance programmer.
But it might even be better if you put this program on a
bootable CD-ROM, so you will sure it's going to be run in
the right OS.
Code reuse is for wussies.
Abigail | [reply] |
Hello :)
I don't use perl when a shell script will do.
Sometimes the best way to keep things simple is to use total overkill. If I can do all my work in Perl, then anyone who needs to maintain it (including me) only needs to know one language. I can also increase the time I can spend on fine-tuning my Perl skills (including time spent coding in Perl) if I don't have to write/learn more shell script.
The most specialized/smallest tool isn't always the best for a job. Especially when you consider how projects have a strange way of growing beyond their original specifications. Just something to consider.
| [reply] |
| [reply] |
I misread the root node. This is a bad idea. I use modules for two reasons - it's faster to reuse someone else's code and they get to maintain it. It's up to me to keep my copy of their module up to sync (if I'm doing that) but in general it's a time saving measure. I don't have the time to write new code when I've got tested and stable code available in a module. I also don't have time to maintain code that someone else is willing to do for free on their own time.
Module use is pragmatic.
Seeking Green geeks in Minnesota
| [reply] |
This is a bad idea because now if the module is fixed, you have to track down every script that uses it. Which turns the idea of a "module" into "cut and paste". Which is generally considered a Bad Thing... | [reply] |