[Omaha.pm] Term::ProgressBar is neato

Dan Linder dan at linder.org
Thu Oct 8 08:52:15 PDT 2009


Very cool.  Happen to know of one that works within a CGI?

DanL

On Thu, Oct 8, 2009 at 09:38, Jay Hannah <jay at jays.net> wrote:
> http://headrattle.blogspot.com/search/label/perl   :)
>
> Here's a super easy CPAN module I started using last week. Ever have a long
> running process that a human is watching, and you want to add a progress
> bar? Here you go!
>
> use Term::ProgressBar;
> my $progress = Term::ProgressBar->new({
>  name => 'MySlowThing()',
>  count => 100,
>  ETA => 'linear',
> });
> $progress->max_update_rate(1);
>
> for (1..100) {
>  sleep 1;
>  $progress->update($_);
> }
>
> Gives you a nifty ASCII timer bar with major and minor movements, updating
> clock, the whole nine. :)
>
> MySlowThing(): 26% [====        *        ]1m16s Left
>
> j
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>



-- 
******************* ***************** ************* ***********
******* ***** *** **
"Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from
the Satires of Juvenal
"I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)
** *** ***** ******* *********** ************* *****************
*******************


More information about the Omaha-pm mailing list