gotcloud icon indicating copy to clipboard operation
gotcloud copied to clipboard

Use a better `system` function

Open pjvandehaar opened this issue 10 years ago • 1 comments

( This issue should wait until we've merged the runcluster.pl changes on branch peter-develop into master.)

System::Command will handle stderr and stdout. Some examples of its use are here.

To use that, we need to:

  1. Understand, fix, and clean our cpanfile mess. Chris recommends moving to Carton, which builds on cpanm (and its cpanfile). Then somehow link the two Makefiles. Because of our reliance on MAKECMDGOALS in src/Makefile, submakes probably won't work.
  2. Switch the system with $qout in runcluster.pl, which is one that would really benefit from capturing stdout and stderr. Check what qstat and squeue output to stdout and stderr, and whether they're the same. Otherwise, combine stderr and stdout.

@schelcj Is Open3 worth using? I like sticking to core perl when possible, and I don't see any immediate problems with Open3.

pjvandehaar avatar Dec 16 '15 22:12 pjvandehaar

The cpanfile that is there now is for some code I added a while back thatbis probably not used.  I see no reason to limit yourself to core modules. The strength of perl is the CPAN. Carton and cpanm make it simple to manage dependencies. 

Chris Scheller pobox.com/~schelcj

schelcj avatar Dec 16 '15 23:12 schelcj