Skip to content

Commit 54e3174

Browse files
committed
tidy
1 parent eabc9f7 commit 54e3174

20 files changed

+114
-92
lines changed

bin/author.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
my $es = MetaCPAN::ES->new( index => "author" );
6262

6363
log_info {'Reading 00whois'};
64-
my $authors_data = read_00whois( $whois_file );
64+
my $authors_data = read_00whois($whois_file);
6565

6666
if ($pauseid) {
6767
log_info {"Indexing 1 author"};

bin/backpan.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ()
5555
(
5656
$undo
5757
or exists $cpan_file_map->{$author}{$archive}
58-
)
58+
)
5959
? 'cpan'
6060
: 'backpan',
6161
$release->{_id}

bin/backup.pl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,14 @@ ()
152152
}
153153

154154
sub run_backup {
155-
my $filename = join( '-',
156-
DateTime->now->strftime('%F'),
157-
grep {defined} $index );
155+
my $filename
156+
= join( '-', DateTime->now->strftime('%F'), grep {defined} $index );
158157

159158
my $file = $home->child( qw< var backup >, "$filename.json.gz" );
160159
$file->parent->mkpath unless ( -e $file->parent );
161160
my $fh = IO::Zlib->new( "$file", 'wb4' );
162161

163-
my $es = MetaCPAN::ES->new( index => $index );
162+
my $es = MetaCPAN::ES->new( index => $index );
164163
my $scroll = $es->scroll(
165164
scroll => '1m',
166165
body => {

bin/check.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use MetaCPAN::Ingest qw< read_02packages_fh >;
1010

1111
# args
12-
my ( $errors_only, $max_errors, $module );
12+
my ( $errors_only, $max_errors, $module );
1313
GetOptions(
1414
"errors_only" => \$errors_only,
1515
"max_errors" => \$max_errors,

bin/checksum.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# args
1313
my $limit = 1000;
14-
my ( $dry_run );
14+
my ($dry_run);
1515
GetOptions(
1616
"dry_run" => \$dry_run,
1717
"limit=i" => \$limit,

bin/cover.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
= map { $_ => 1 } qw< branch condition statement subroutine total >;
2626

2727
my $es_release = MetaCPAN::ES->new( index => "release" );
28-
my $es_cover = MetaCPAN::ES->new( index => "cover" );
28+
my $es_cover = MetaCPAN::ES->new( index => "cover" );
2929
my $bulk_cover = $es_cover->bulk();
3030

3131
my $data = retrieve_cover_data();
@@ -36,8 +36,8 @@
3636
for my $version ( keys %{ $data->{$dist} } ) {
3737
my $release = $dist . '-' . $version;
3838
my $rel_check = $es_release->search(
39-
size => 0,
40-
body => {
39+
size => 0,
40+
body => {
4141
query => { term => { name => $release } },
4242
},
4343
);

bin/cve.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
$cve_dev_url //= 'https://hackeriet.github.io/cpansa-feed/cpansa_dev.json';
4545

4646
my $es_release = MetaCPAN::ES->new( index => "release" );
47-
my $es_cve = MetaCPAN::ES->new( index => "cve" );
48-
my $bulk_cve = $es_cve->bulk();
47+
my $es_cve = MetaCPAN::ES->new( index => "cve" );
48+
my $bulk_cve = $es_cve->bulk();
4949

5050
my $data = retrieve_cve_data();
5151

@@ -143,7 +143,7 @@
143143
};
144144

145145
my $releases = $es_release->search(
146-
body => {
146+
body => {
147147
query => $query,
148148
_source => [qw< version name author >],
149149
size => 2000,

bin/external.pl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
and grep { $_ eq $external_source } qw< cygwin debian >;
2424

2525
# setup
26-
my $es = MetaCPAN::ES->new( index => "distribution" );
27-
my $bulk = $es->bulk();
26+
my $es = MetaCPAN::ES->new( index => "distribution" );
27+
my $bulk = $es->bulk();
2828
my $scroll = $es->scroll(
2929
scroll => '10m',
3030
body => {
@@ -34,8 +34,6 @@
3434
},
3535
);
3636

37-
38-
3937
my $ret;
4038

4139
$ret = run_cygwin() if $external_source eq 'cygwin';

bin/first.pl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
use MetaCPAN::ES;
99

1010
# args
11-
my ( $distribution );
12-
GetOptions(
13-
"distribution=s" => \$distribution,
14-
);
11+
my ($distribution);
12+
GetOptions( "distribution=s" => \$distribution, );
1513

1614
# setup
1715
my $es = MetaCPAN::ES->new( index => "distribution" );
@@ -40,7 +38,7 @@
4038
$release
4139
? log_debug {
4240
"@{[ $release->name ]} by @{[ $release->author ]} was first"
43-
}
41+
}
4442
: log_warn {
4543
"no release found for distribution @{[$distribution->name]}"
4644
};

bin/latest.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ ( $bulk, $source, $status )
302302

303303
log_info {
304304
$status eq 'latest' ? 'Upgrading ' : 'Downgrading ',
305-
'release ', $release->{name}
305+
'release ', $release->{name}
306306
};
307307

308308
# Get all the files for the release.

0 commit comments

Comments
 (0)