X-Git-Url: https://git.donarmstrong.com/?p=term-progressbar.git;a=blobdiff_plain;f=lib%2FTerm%2FProgressBar.pm;h=f61956ad1a0cfefdaff00aee463c4498aec775bb;hp=f1ed1dc1e3fe3b1414d32ec18a803a44000464b3;hb=1194702ec43c994abcf387b52c03b8532c8d5f3c;hpb=3797cda1b0da9caa24c7ff35e910e1f318c77918 diff --git a/lib/Term/ProgressBar.pm b/lib/Term/ProgressBar.pm index f1ed1dc..f61956a 100644 --- a/lib/Term/ProgressBar.pm +++ b/lib/Term/ProgressBar.pm @@ -75,6 +75,8 @@ bar for the same width. } } +see eg/simle_use.pl + Here is a simple example. The process considers all the numbers between 0 and MAX, and updates the progress bar whenever it finds one. Note that the progress bar update will be very erratic. See below for a smoother example. @@ -97,6 +99,8 @@ distribution set (it is not installed as part of the module). $progress->update($_) } +See eg/smooth_bar.pl + This example calls update for each value considered. This will result in a much smoother progress update, but more program time is spent updating the bar than doing the "real" work. See below to remedy this. This example does @@ -145,7 +149,7 @@ distribution set (it is not installed as part of the module. my $progress = Term::ProgressBar->new({name => 'Powers', count => $max, - ETA => linear, }); + ETA => 'linear', }); $progress->max_update_rate(1); my $next_update = 0; @@ -250,7 +254,7 @@ use constant DEBUG => 0; use vars qw($PACKAGE $VERSION); $PACKAGE = 'Term-ProgressBar'; -$VERSION = '2.09'; +$VERSION = '2.11'; # ---------------------------------- # CLASS CONSTRUCTION