Skip to content

Commit

Permalink
Merge pull request #1816 from metacpan/haarg/no-duplicate-provides
Browse files Browse the repository at this point in the history
remove duplication of provides
  • Loading branch information
oalders committed Nov 20, 2016
2 parents d7001aa + 85e4eef commit 41cefae
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions lib/MetaCPAN/Web/Controller/Release.pm
Expand Up @@ -190,20 +190,18 @@ sub _files_to_categories {

if ( $f->{documentation} and @modules ) {
push @{ $ret->{modules} }, $f;
for my $m (@modules) {
push @{ $ret->{provides} },
map +{
%info,
package => $_->{name},
authorized => $_->{authorized}
},
grep {
defined $_->{name}
and $_->{name} ne $f->{documentation}
and $_->{indexed}
and $_->{authorized}
} @modules;
}
push @{ $ret->{provides} },
map +{
%info,
package => $_->{name},
authorized => $_->{authorized}
},
grep {
defined $_->{name}
and $_->{name} ne $f->{documentation}
and $_->{indexed}
and $_->{authorized}
} @modules;
}
elsif (@modules) {
push @{ $ret->{provides} },
Expand Down

0 comments on commit 41cefae

Please sign in to comment.