Skip to content

Commit 3bd923f

Browse files
committed
include authors in contributors list
1 parent 89a5e65 commit 3bd923f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/MetaCPAN/Web/Role/ReleaseInfo.pm

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,28 @@ sub groom_contributors {
7272
my ( $self, $c, $release ) = @_;
7373

7474
my $contribs = $release->{metadata}{x_contributors} || [];
75+
my $authors = $release->{metadata}{author} || [];
7576

7677
# just in case a lonely contributor makes it as a scalar
7778
$contribs = [$contribs]
7879
if !ref $contribs;
80+
$authors = [$authors]
81+
if !ref $authors;
7982

83+
my %seen = ( lc "$release->{author}\@cpan.org" => 1, );
8084
my @contribs;
81-
for my $contrib (@$contribs) {
85+
86+
for my $contrib ( @$authors, @$contribs ) {
8287
my $name = $contrib;
8388
$name =~ s/\s*<([^<>]+@[^<>]+)>//;
8489
my $info = {
8590
name => $name,
8691
$1 ? ( email => $1 ) : (),
8792
};
8893

94+
next
95+
if $seen{ $info->{email} }++;
96+
8997
# heuristic to autofill pause accounts
9098
if ( !$info->{pauseid}
9199
and $info->{email} =~ /^(.*)\@cpan\.org$/ )

0 commit comments

Comments
 (0)