Acme::ProgressBar -- a simple progress bar for the patient
use Acme::ProgressBar; progress { do_something_slow };
Acme::ProgressBar provides a simple solution designed to provide accurate countdowns. No progress bar object needs to be created, and all the calculation of progress through total time required is handled by the module itself.
progress
progress { unlink $_ for <*> }; progress { while (<>) { $ua->get($_) } }; progress { sleep 5; }
There is only one function exported by default, progress. This function takes a coderef as its lone argument. It will execute this code and display a simple progress bar indicating the time required for ten iterations through the code.
allow other divisions of time (other than ten)
Ricardo SIGNES <rjbs@cpan.org>
Thanks to Steve Lidie for pointing out a stupid error in 1.001: I couldn't count to ten, and he could.
Copyright (C) 2004, Ricardo SIGNES. Available under the same terms as Perl itself.
To install Acme::ProgressBar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::ProgressBar
CPAN shell
perl -MCPAN -e shell install Acme::ProgressBar
For more information on module installation, please visit the detailed CPAN module installation guide.