Skip to content

Commit e759491

Browse files
committed
Ensure name update from CPAN in case of custodial account
1 parent dff61be commit e759491

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/MetaCPAN/Script/Author.pm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,16 @@ sub index_authors {
9090
$asciiname = q{} unless defined $asciiname;
9191
$email = lc($pauseid) . '@cpan.org'
9292
unless ( $email && Email::Valid->address($email) );
93+
my $is_pause_custodial_account
94+
= ( $name && $name =~ /\(PAUSE Custodial Account\)/ );
9395
log_debug {
9496
Encode::encode_utf8(
9597
sprintf( "Indexing %s: %s <%s>", $pauseid, $name, $email ) );
9698
};
97-
my $conf = $self->author_config( $pauseid, $dates ) || next;
98-
my $put = {
99+
my $conf = $self->author_config( $pauseid, $dates );
100+
next unless ( $conf or $is_pause_custodial_account );
101+
$conf ||= {};
102+
my $put = {
99103
pauseid => $pauseid,
100104
name => $name,
101105
asciiname => ref $asciiname ? undef : $asciiname,
@@ -114,8 +118,7 @@ sub index_authors {
114118
grep {$_} @{ $put->{website} }
115119
];
116120

117-
$put->{is_pause_custodial_account} = 1
118-
if $name and $name =~ /\(PAUSE Custodial Account\)/;
121+
$put->{is_pause_custodial_account} = 1 if $is_pause_custodial_account;
119122

120123
# Now check the format we have is actually correct
121124
my @errors = MetaCPAN::Document::Author->validate($put);

0 commit comments

Comments
 (0)