Weird giant name

This commit is contained in:
Your Name 2017-04-02 18:32:53 -04:00
parent e5bf35099a
commit abfdabd0d5
4 changed files with 10 additions and 3 deletions

Binary file not shown.

View file

@ -55,7 +55,6 @@ sub new_module {
{
my @banned = do {open (my $fh, "<banned.lst"); map {chomp; $Dist::mod_to_dist{$_} // $_} <$fh>};
use Data::Dumper;
print Dumper(\@banned);
sub _is_banned {
my $module = shift;
my $dist = $Dist::mod_to_dist{$module} // $module;
@ -93,12 +92,17 @@ sub get_deps {
}
sub print_deps {
my $self = shift;
$self->_print_deps(0, []);
}
sub _print_deps {
my ($self, $level, $v) = @_;
for my $dep ($self->depends->@*) {
my $name = $dep->name;
print ((" " x $level), $name, "\n");
$dep->print_deps($level+1, [@$v, $name]) unless ($name ~~ @$v);
$dep->_print_deps($level+1, [@$v, $name]) unless ($name ~~ @$v);
}
}

Binary file not shown.

View file

@ -12,6 +12,9 @@ use DateTime;
my $start_time = time();
my $start_dt = DateTime->now();
my $cache = retrieve $ARGV[0];
my $first_count =()= grep {exists $cache->{jobstatus}{$_}{tested}} keys $cache->{jobstatus}->%*;
my $first_count = 0+$cache->{jobstatus}->%*;
my $dists = 0+$cache->{modules}->@*;
@ -19,7 +22,7 @@ while (1) {
sleep(2);
my $cache = eval {retrieve $ARGV[0]};
next unless $cache;
my $count = 0+$cache->{jobstatus}->%*;
my $count =()= grep {exists $cache->{jobstatus}{$_}{tested}} keys $cache->{jobstatus}->%*;
my $rate = ($count-$first_count)/(time()-$start_time);
my $tocomplete = ($rate == 0? sub{-1} : sub{($dists-$count)/$rate})->();