Created
February 26, 2010 10:51
-
-
Save nipotan/315629 to your computer and use it in GitHub Desktop.
it's useful if you don't want someone to touch your script without your approval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use Term::ProgressBar; | |
use Time::HiRes qw(sleep); | |
$SIG{INT} = sub {}; | |
my $progress = Term::ProgressBar->new({ | |
name => 'deleting all data', | |
count => 1000, | |
ETA => 'linear', | |
}); | |
$progress->minor(0); | |
for my $i (0 .. 1000) { | |
$progress->update($i); | |
sleep rand(0.3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment