NAME
Whatbot::Progress - Provides a basic progress meter
SYNOPSIS
use Whatbot::Progress;
my $progress = Whatbot::Progress->new(
'restrict_updates' => 10,
'max' => 100,
'show_count' => 1
);
for ( my $i = 0; $i <= 100; $i++ ) {
$progress->update($i);
}
$progress->finish();
DESCRIPTION
Whatbot::Progress provides a simple command line progress bar without any dependencies beyond what whatbot requires.
PUBLIC ACCESSORS
- restrict_updates
-
Divisor of the current progress where the progress bar should be updated. Leaving this undefined will cause the progress bar to update every time 'update' is called, otherwise, will only update per multiple.
- max
-
Value of the 100% mark
- show_count
-
Display the current count at the end of the progress bar. This updates depending on the value of
METHODS
- update($value)
-
Update the progress bar with the given value.
- finish()
-
Finish the progress bar by setting to max, restricting updates, and setting a newline.
LICENSE/COPYRIGHT
Be excellent to each other and party on, dudes.