Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2014-09-02 02:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls