Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: At what point do you rewrite that old shell script in Perl?

by dragonchild (Archbishop)
on Apr 11, 2008 at 23:17 UTC ( [id://679884]=note: print w/replies, xml ) Need Help??


in reply to At what point do you rewrite that old shell script in Perl?

Rewriting anything that currently works is dangerous and should only be undertaken when the product in question cannot be extended to a specific enhancement need without an inordinate amount of unsafe practices. This goes for any piece of code, period.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: At what point do you rewrite that old shell script in Perl?

Replies are listed 'Best First'.
Re^2: At what point do you rewrite that old shell script in Perl?
by jhourcle (Prior) on Apr 12, 2008 at 02:12 UTC

    I'll add -- or you have to port it to another environment, and it has dependancies that you can't rely on.

    Eg, if I'm going to have to move from a BSD to an ATT unix, and do something with parsing ps output, and suddenly have to deal with the difference in options between systems. (it's one thing to move it completely, but I don't want to maintain two variants if I don't have to.

Re^2: At what point do you rewrite that old shell script in Perl?
by rudder (Scribe) on Apr 12, 2008 at 05:30 UTC

    Well, that said, things aren't so clear cut. Often, existing scripts limp along with tolerable inadequacies. And maybe they already use unsafe practices, but those transgressions have been overlooked since the scripts work most of the time, and when they don't, it's not too much work to clean up messes and run the script again.

    Thanks for your answer though. As I read it, the answer is: you've got to use your judgement and consider how hard it will be to add further enhancements and how unsafe the current script is.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://679884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2025-11-17 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.