Skip to content

Commit

Permalink
Fix downgrading of dependencies
Browse files Browse the repository at this point in the history
Of course in Perl 5 it's all about references. Has to be taken into
account when porting code from Perl 6.
  • Loading branch information
niner committed Apr 22, 2018
1 parent 503a599 commit fde8197
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions server/updatelist.pl
Expand Up @@ -109,16 +109,18 @@ sub downgrade {
if exists $depends->{test} and exists $depends->{test}{requires};
}
foreach (qw(depends build-depends test-depends)) {
$meta->{$_} = grep {
$_ !~ /:from/
}
map {
(ref $_ and ref $_ eq 'HASH') ? $_->{name} : $_
}
grep {
defined $_
}
$meta->{$_}
$meta->{$_} = [
grep {
$_ !~ /:from/
}
map {
(ref $_ and ref $_ eq 'HASH') ? $_->{name} : $_
}
grep {
defined $_
}
@{ $meta->{$_} }
]
if exists $meta->{$_};
}

Expand Down

0 comments on commit fde8197

Please sign in to comment.