/usr/share/perl5/Prophet/CLI/ProgressBar.pm is in libprophet-perl 0.750-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | package Prophet::CLI::ProgressBar;
use Any::Moose 'Role';
use Time::Progress;
use Params::Validate ':all';
sub progress_bar {
my $self = shift;
my %args = validate(@_, {max => 1, format => { optional =>1, default => "%30b %p %L (%E remaining)\r" }});
my $bar = Time::Progress->new();
$bar->attr(max => $args{max});
my $bar_count = 0;
my $format = $args{format};
return sub {
# disable autoflush to make \r work properly
local $| = 1;
print $bar->report( $format, ++$bar_count );
}
}
no Any::Moose 'Role';
1;
|