diff --git a/lib/MetaCPAN/Script/Role/Contributor.pm b/lib/MetaCPAN/Script/Role/Contributor.pm index 52f532822..5aa0b928e 100644 --- a/lib/MetaCPAN/Script/Role/Contributor.pm +++ b/lib/MetaCPAN/Script/Role/Contributor.pm @@ -104,6 +104,10 @@ has email_mapping => ( is => 'ro', default => sub { {} }, ); +has author_mapping => ( + is => 'ro', + default => sub { {} }, +); sub get_contributors { my ( $self, $release ) = @_; @@ -124,13 +128,13 @@ sub get_contributors { } $authors = [ grep { $_ ne 'unknown' } @$authors ]; - my $author = eval { - $self->es->get_source( es_doc_path('author'), id => $author_name ); + my $author_mapping = $self->author_mapping; + my $author_email = $author_mapping->{$author_name} //= eval { + $self->es->get_source( es_doc_path('author'), id => $author_name ) + ->{email}; } or return []; - my $author_email = $author->{email}; - my $author_info = { email => [ lc "$author_name\@cpan.org",