Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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.

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 having an uproarious good time at the Monastery: (7)
As of 2016-10-26 22:18 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (350 votes). Check out past polls.