nysus has asked for the wisdom of the Perl Monks concerning the following question:

I'm saving output of prove using the --archive option. Unfortunately, the archive option doesn't capture the entire output from the prove command like comments nor does it capture output from log4perl. How can I capture everything output to the screen when I run prove and save it to a file?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

Replies are listed 'Best First'.
Re: Capturing all screen output from prove command into a file
by MidLifeXis (Monsignor) on Mar 07, 2017 at 18:01 UTC

    See the whole contingent of options available to prove. There are options to merge stdout/stdin (--merge --normalize), as well as the ability to capture comments.

    --MidLifeXis

      Ah, --merge. That did the trick. I missed that in the docs. Thank you.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

        Will you please tell us why you need this?
Re: Capturing all screen output from prove command into a file
by shmem (Chancellor) on Mar 07, 2017 at 19:37 UTC
    How can I capture everything output to the screen when I run prove and save it to a file?

    Although you already got the answer (--merge) - a more general approach (on a unixish system): invoking script(1) does the trick.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re: Capturing all screen output from prove command into a file
by davido (Cardinal) on Mar 08, 2017 at 02:53 UTC

    Common shell redirection would save the few moments it takes to look up documentation on prove's command line switches.


    Dave

Re: Capturing all screen output from prove command into a file
by Anonymous Monk on Mar 07, 2017 at 17:48 UTC
    Why would you ever want to do that?
Re: Capturing all screen output from prove command into a file
by Anonymous Monk on Mar 07, 2017 at 17:55 UTC
    nysus, why u do this? why u ask question like "I'm trying to set myself on fire but dousing myself with water is not working ... what should I douse myself with?" or "I cannot swallow this apple whole, what kind of lubricants should I use to make this apple go down?"
      LMAO xD