Here, in a nutshell, is my experience of executing a command from perl with minimum fuss and maximum portability:
1. Use system or qx.
2. Get frustrated by limitations of the builtins (or tired of intoning strange POSIX incantations in Latin) and head to CPAN.
3. Quickly find a decent module with good reviews. In my case, there have been several of these over the years. Most recently, IPC::Run and IPC::Cmd. These work well most of the time, particularly on *nixes.
4. Find a common case that one of these modules doesn't handle well, if at all.
5. Wearily fire up another CPAN search, assuming there'll be nothing suitable listed under the 60-odd results returned for distros containing "IPC".
6. Find IPC::System::Simple.
7. Skip through the documentation. Test and verify. Remove boilerplate error massaging/translation code, FIXMEs, TODOs and WTFs.
Fast, simple accessors for the vast majority of cases where that's all that's needed. There are many (perhaps too many) modules that provide more flexibility and a plethora of other features, but this one makes a virtue of its simplicity. The pragmatic, lower case name is nice as well, as it slots in naturally alongside other compile-time conveniences.
My only gripe is that I'd prefer accessors::classic to be called accessors::rw (for read-write) - it's fewer characters to type (which is the point, after all) and more descriptive; and I'd like it to be complemented by a read-only version, accessors::ro.
Added a star as accessors::ro and accessors::rw have been added.
Very simple. Does what it says on the tin. A bit hard to find as it doesn't use the "phrasebook" buzzword, or link to any of the (many) phrasebook design pattern modules, but it's my favourite among them for its sheer simplicity.
Disclaimer: I haven't used this yet, though it would have saved me a lot of time in the past.
This is a great idea which introduces one of Larry Wall's earlier great ideas to his latest brainwave. I'm sure many people have rolled their own ad hoc scripts to save themselves the trouble of manually copying/cutting and pasting the same diff recipe into a moving target, but this looks like a nice declarative interface which leverages other Perl power tools to get the job done in an impeccably lazy way.
Modules like Regexp::Fields, which ships a vast suite of separate patches, will probably benefit from this most in the short term. Long term, who knows? Maybe a metadiff (cf. Template::Generate), which figures out the metapatch from an arbitrary previous version to the current version and makes upgrades a snap?
The only drawback is that Template::Extract still has a few caveats and TODOs, and hasn't been updated for a while.
As of version 1.00, this module no longer requires a perl patch.