File: simple.t

package info (click to toggle)
libterm-progressbar-quiet-perl 0.31-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 72 kB
  • sloc: perl: 51; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!perl
use strict;
use warnings;
use lib 'lib';
use Test::More tests => 1;
use_ok('Term::ProgressBar::Quiet');

my @todo     = ( 'x' x 10 );
my $progress = Term::ProgressBar::Quiet->new(
    { name => 'Todo', count => scalar(@todo), ETA => 'linear' } );

my $i = 0;
foreach my $todo (@todo) {

    # do something with $todo
    $progress->update( ++$i );
}
$progress->message('All done');