[Bps-public-commit] Prophet branch, master, updated. 0.743-38-gda4308a

Christine Spang spang at bestpractical.com
Sun Feb 20 19:00:22 EST 2011


The branch, master has been updated
       via  da4308a7bcc674c089ade826c0aacdd5c05c0897 (commit)
      from  288c065421bf414f50548a1fda3dec1b0337b98f (commit)

Summary of changes:
 lib/Prophet/CLI/ProgressBar.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit da4308a7bcc674c089ade826c0aacdd5c05c0897
Author: Christine Spang <christine at debian.org>
Date:   Sun Feb 20 18:55:08 2011 -0500

    disable autoflush when printing progress bars
    
    Part of the solution to RT #64674, thanks trs++ for reporting.

diff --git a/lib/Prophet/CLI/ProgressBar.pm b/lib/Prophet/CLI/ProgressBar.pm
index 1a139f5..d2f46a4 100644
--- a/lib/Prophet/CLI/ProgressBar.pm
+++ b/lib/Prophet/CLI/ProgressBar.pm
@@ -14,6 +14,8 @@ sub progress_bar {
     my $bar_count = 0;
     my $format = $args{format};
     return sub {
+       # disable autoflush to make \r work properly
+       $| = 1;
        print $bar->report(  $format, ++$bar_count );
     }
 }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list