in reply to perl or bash in cgi scripts?
Obviously, it is a trade-off. When you incorporate shell-command calls directly into your Perl module, the sometimes-significant risk that you run is that (a) something might change in the underlying environment, and (b) that you might one day need to move the software to an environment where what you have done will no longer apply.
I do not consider efficiency to be a valid consideration, but reliability, availability, and serviceability (what IBM likes to call “RAS”) most-definitely is. So, tempting though it might be to “just go for Whatever Works,” sometimes that decision is very sorely and very soon regretted.
Quite a few of the modules that are available in CPAN are, effectively, “operating-system abstraction layers.” When installed on different operating systems, these modules actually install different code. But they continue to work (insofar as possible or practical) “the same way.” Such modules often turn out to be quite useful, but of course with varying degrees of success.
For what it might be worth, I detest “shell scripting” and advocate against it wherever possible. In my humble, the scripting capabilities of a shell are not designed to be “for serious programming,” and this is not the place where “serious programming” belongs. I am, of course, perfectly aware that a one Mr. Korn and his followers would steadfastly disagree with me, and I respect that (and them). I advocate that “you have a bountiful banquet of designed-to-be programming languages at your beck and call; so choose one and use it.” (That is to say, “Choose Perl, o’course ...”) ;-)
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl or bash in cgi scripts?
by cdarke (Prior) on Jan 07, 2011 at 11:07 UTC | |
by jffry (Hermit) on Jan 07, 2011 at 17:47 UTC |