Image::Synchronize::ProgressBar - A simple progress bar that also works in closures.
$pb = Image::Synchronize::ProgressBar->new(%options);
Creates a new instance of the progress bar. Accepts the following options (mostly similar to Term::ProgressBar):
The target count for the progress bar. When the progress count reaches this value, then the task is assumed to be complete.
The filehandle to output to. Defaults to STDERR.
The name of the progress bar. This name is printed at the left-hand side of the progress bar.
Should the progress bar be displayed? If set to a true value, then the progress bar is always displayed. If set to a false value, then the progress bar is not displayed, but the message method still prints to standard output (unlike for the
silentoption). If not set, then the progress bar is displayed only if the program detects that it is running interactively.
This option is not inherited from
If set to a true value, then the progress bar does nothing. In particular, it does not print anything when you call the message method on it. Is ignored if
show_baris defined. For an alternative, see
The width of the terminal. Use if the automatic detection fails.
The progress bar is removed when the task is complete, and displays an estimate of how long it will take for the task to complete.
$pb->add($amount); $pb->add; # adds 1
Add the indicated
$amount, or 1, toward the target of the progress bar.
Declare the task to be complete.
Prints a message (like print), taking into account the progress bar.
This module uses the following non-core Perl modules:
Louis Strous <LS@quae.nl>
Copyright (c) 2016-2018 Louis Strous.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.