Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Capture the make status

by daxim (Chaplain)
on Aug 26, 2013 at 12:02 UTC ( #1050950=note: print w/ replies, xml ) Need Help??

in reply to [SOLVED] Capture the make status

Yes, the vexing problem of chdir being global. Separate your commands, thus:

use File::chdir qw($CWD); use IPC::System::Simple qw(runx); { local $CWD = '...'; runx [0], 'make', 'this'; }
At the end of the block, the working directory will snap back to what it was before. If the directory cannot be changed, it throws an exception. runx as shown will throw an exception if the return code is not 0.

Comment on Re: Capture the make status
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2015-11-28 21:21 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (745 votes), past polls