We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a751870 commit af1a139Copy full SHA for af1a139
bin/suggest.pl
@@ -9,12 +9,16 @@
9
use MetaCPAN::ES;
10
11
# args
12
-my $all;
13
my $days = 1;
+my ( $all, $mode );
14
GetOptions(
15
"all" => \$all,
16
- "days=i" => \$days
+ "days=i" => \$days,
17
+ "mode=s" => \$mode,
18
);
19
+# TODO: find a better way
20
+my @es_mode = ( $mode ? (mode => $mode) : () );
21
+$mode and $mode eq 'test' and Log::Log4perl::init('log4perl_test.conf');
22
23
if ($all) {
24
update_all();
@@ -60,7 +64,7 @@ ()
60
64
}
61
65
62
66
sub _update_slice ($range) {
63
- my $es = MetaCPAN::ES->new( type => "file" );
67
+ my $es = MetaCPAN::ES->new( index => "file", @es_mode );
68
69
my $files = $es->scroll(
70
scroll => '5m',
0 commit comments