Show
Ignore:
Timestamp:
11/03/08 07:50:44 (5 years ago)
Author:
hanekomu
Message:

flush STDERR and improve output

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/App-Benchmark/trunk/lib/App/Benchmark.pm

    r22597 r22599  
    2929    $capture->stop; 
    3030 
    31     print "# $_" for $capture->read; 
     31    { 
     32        my $previous_default = select(STDOUT); 
     33        $|++; # autoflush STDOUT 
     34        select(STDERR); 
     35        $|++; # autoflush STDERR 
     36        select($previous_default); 
     37    } 
     38 
     39    chomp(my @lines = $capture->read); 
     40    warn "# $_\n" for @lines; 
     41 
    3242    plan tests => 1; 
    3343    pass('benchmark');