The core SelectSaver module is useful for this problem.

  use SelectSaver;

  {
    my $guard = SelectSaver->new($local_test_output_collecting_fh);

    run_test_code;
  }

  # the local fh got the test prints, but prints out here go to the previous
  # target

-- 
rjbs

Attachment: signature.asc
Description: Digital signature

Reply via email to