File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 51
51
};
52
52
53
53
# args
54
- my ( $pauseid , $whois_file );
54
+ my ( $mode , $ pauseid , $whois_file );
55
55
GetOptions(
56
- " whois_file =s" => \$whois_file ,
56
+ " mode =s" => \$mode ,
57
57
" pauseid=s" => \$pauseid ,
58
+ " whois_file=s" => \$whois_file ,
58
59
);
59
60
60
61
# setup
61
- my $es = MetaCPAN::ES-> new( type => " author" );
62
+ my $es = MetaCPAN::ES-> new( index => " author" , ( $mode ? ( mode => $mode ) : () ) );
62
63
63
64
log_info {' Reading 00whois' };
64
- my $authors_data = $whois_file || read_00whois( );
65
+ my $authors_data = read_00whois( $whois_file );
65
66
66
67
if ($pauseid ) {
67
68
log_info {" Indexing 1 author" };
239
240
sub new_authors () {
240
241
for my $id ( keys %$authors_data ) {
241
242
my $whois_data = delete $authors_data -> {$id } || next ;
242
- _update_author( $id , $whois_data );
243
+ _update_author( $id , $whois_data , {} );
243
244
}
244
245
}
245
246
You can’t perform that action at this time.
0 commit comments