HuckinFappy has asked for the wisdom of the Perl Monks concerning the following question:
I must have written 20 different routines in 12 years to run a system command. Most of them are pretty standard, they spawn a command, then analyze both $? and $!, and if $? has a value, analyze it to find what happened. Maybe handles some I/O redirection, using callbacks if we're fancy.
It's just one of the lame things my coworkers and I have to confess to. Despite the sheer number of times we all do this, we've never put it in one central location. Time to fix that mistake
So I'm formalizing something for us. I've looked a little at using IPC::Run as a base, but I'm wondering if anyone has a tutorial for it? It's documentation is extensive, but the module is so vast, i would learn better with good examples
The other questions would be:
- What is your solution? What is your common code for running a system command
- Have you used IPC::Run? What was your experience?
- If you don't use it, is there another good module you've learned to love?
Thanks Brothers!
~Jeff