Skip to content

Commit d920607

Browse files
committed
Apply perlimports to ./lib
1 parent 4c1e3c4 commit d920607

37 files changed

+73
-87
lines changed

app.psgi

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BEGIN {
88
}
99
use lib "$root_dir/lib";
1010

11-
use Config::ZOMG;
11+
use Config::ZOMG ();
1212
use File::Path ();
1313
use File::Spec ();
1414
use Log::Log4perl ();
@@ -46,7 +46,7 @@ BEGIN {
4646
$SIG{__WARN__} = sub { $logger->warn(@_) };
4747
}
4848

49-
use MetaCPAN::Server;
49+
use MetaCPAN::Server ();
5050

5151
STDERR->autoflush;
5252

bin/check_json.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# PODNAME: check_json.pl
33
use 5.010;
44

5-
use Data::Dumper;
6-
use Cpanel::JSON::XS;
5+
use Data::Dumper qw( Dumper );
6+
use Cpanel::JSON::XS qw( decode_json );
77

88
foreach my $file (@ARGV) {
99
say "Processing $file";

bin/convert_authors.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
use strict;
44
use warnings;
5-
use Cpanel::JSON::XS;
6-
use File::Find;
5+
use Cpanel::JSON::XS qw( decode_json );
6+
use File::Find qw( find );
77

88
my @files;
99
find(

bin/metacpan

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
use strict;
1616
use warnings;
17-
use FindBin;
17+
use FindBin ();
1818
use lib "$FindBin::RealBin/../lib";
19-
use MetaCPAN::Script::Runner;
19+
use MetaCPAN::Script::Runner ();
2020

2121
MetaCPAN::Script::Runner->run;
2222

bin/unlisted_prereqs.pl

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use strict;
77
use warnings;
88
use Perl::PrereqScanner 1.014;
9-
use CPAN::Meta::Requirements;
9+
use CPAN::Meta::Requirements ();
1010
use File::Find::Rule::Perl;
11-
use List::Util qw(sum);
11+
use List::Util qw( sum );
1212
use version 0.77;
1313

1414
# TODO: use CPAN::Meta::Prereqs
@@ -91,7 +91,7 @@ sub check_prereqs {
9191
if version->parse( $reqs->{runtime}{perl} )
9292
<= version->parse($MIN_PERL_VERSION);
9393

94-
use Data::Dumper;
94+
use Data::Dumper ();
9595
$Data::Dumper::Sortkeys = 1;
9696
print Data::Dumper->Dump( [$reqs], ['requires'] );
9797

lib/Catalyst/Authentication/Store/Proxy.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package Catalyst::Authentication::Store::Proxy;
22

33
# ABSTRACT: Delegates authentication logic to the user object
44
use Moose;
5-
use Catalyst::Utils;
5+
use Catalyst::Utils ();
66
use MetaCPAN::Types::TypeTiny qw( HashRef Str );
77

88
has user_class => (

lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package Catalyst::Plugin::Session::Store::ElasticSearch;
44

55
use Moose;
66
extends 'Catalyst::Plugin::Session::Store';
7-
use MooseX::Types::ElasticSearch qw(:all);
7+
use MooseX::Types::ElasticSearch qw( ES );
88

99
has _session_es => (
1010
required => 1,

lib/MetaCPAN/Document/Author.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package MetaCPAN::Document::Author;
33
use MetaCPAN::Moose;
44

55
# load order important for next 2 modules
6-
use ElasticSearchX::Model::Document::Types qw(:all);
6+
use ElasticSearchX::Model::Document::Types qw( Location );
77
use ElasticSearchX::Model::Document;
88

99
# load order not important

lib/MetaCPAN/Document/Favorite.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use warnings;
66
use Moose;
77
use ElasticSearchX::Model::Document;
88

9-
use DateTime;
9+
use DateTime ();
1010
use MetaCPAN::Util;
1111

1212
has id => (

lib/MetaCPAN/Document/Release.pm

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package MetaCPAN::Document::Release;
22

33
use Moose;
44

5-
use DateTime qw();
65
use ElasticSearchX::Model::Document;
76
use MetaCPAN::Types qw( Dependency );
87
use MetaCPAN::Types::TypeTiny qw(
@@ -293,7 +292,7 @@ sub set_first {
293292
# currently, the "first" property is not computed on all releases
294293
# since this feature has not been around when last reindexed
295294
]
296-
} )->count
295+
} )->count
297296
? 0
298297
: 1;
299298

lib/MetaCPAN/Model/Archive.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use Moose;
55
use MooseX::StrictConstructor;
66
use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Bool Str );
77

8-
use Archive::Any;
8+
use Archive::Any ();
99
use Carp qw( croak );
1010
use Path::Tiny qw( path );
1111
use Digest::file qw( digest_file_hex );

lib/MetaCPAN/Model/Release.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Str );
1515
use MetaCPAN::Util qw( fix_version);
1616
use Module::Metadata 1.000012 (); # Improved package detection.
1717
use MooseX::StrictConstructor;
18-
use Path::Tiny qw( path );
19-
use Parse::PMFile;
20-
use Try::Tiny qw( catch try );
18+
use Path::Tiny qw( path );
19+
use Parse::PMFile ();
20+
use Try::Tiny qw( catch try );
2121

2222
with 'MetaCPAN::Role::Logger';
2323

lib/MetaCPAN/Model/User/Account.pm

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ use warnings;
66
use Moose;
77
use ElasticSearchX::Model::Document;
88

9-
use MetaCPAN::Model::User::Identity ();
10-
use MetaCPAN::Types qw( Identity );
11-
use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Dict Str );
9+
use MetaCPAN::Types qw( Identity );
10+
use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Dict Str );
1211
use MetaCPAN::Util;
1312

1413
=head1 PROPERTIES

lib/MetaCPAN/Pod/Renderer.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use MetaCPAN::Moose;
44

55
use MetaCPAN::Pod::XHTML;
66
use MetaCPAN::Types::TypeTiny qw( Uri );
7-
use Pod::Markdown;
8-
use Pod::Simple::JustPod ();
9-
use Pod::Text ();
7+
use Pod::Markdown ();
8+
use Pod::Simple::JustPod ();
9+
use Pod::Text ();
1010

1111
has perldoc_url_prefix => (
1212
is => 'ro',

lib/MetaCPAN/Role/HasConfig.pm

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use FindBin ();
66
use Config::ZOMG ();
77
use MetaCPAN::Types::TypeTiny qw( HashRef );
88
use MetaCPAN::Util qw( checkout_root );
9-
use Module::Runtime qw( require_module );
109

1110
# Done like this so can be required by a role
1211
sub config {

lib/MetaCPAN/Role/Script.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package MetaCPAN::Role::Script;
22

33
use Moose::Role;
44

5-
use ElasticSearchX::Model::Document::Types qw(:all);
5+
use ElasticSearchX::Model::Document::Types qw( ES );
66
use MetaCPAN::Util qw( checkout_root );
77
use Log::Contextual qw( :log :dlog );
88
use MetaCPAN::Model ();

lib/MetaCPAN/Script/Backup.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use strict;
44
use warnings;
55
use feature qw( state );
66

7-
use DateTime;
7+
use DateTime ();
88
use IO::Zlib ();
99
use Cpanel::JSON::XS qw( decode_json encode_json );
1010
use Log::Contextual qw( :log :dlog );
@@ -94,7 +94,7 @@ sub run_restore {
9494
my $self = shift;
9595

9696
return log_fatal { $self->restore, q{ doesn't exist} }
97-
unless ( -e $self->restore );
97+
unless ( -e $self->restore );
9898
log_info { 'Restoring from ', $self->restore };
9999

100100
my @bulk;

lib/MetaCPAN/Script/Latest.pm

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use warnings;
55

66
use Log::Contextual qw( :log );
77
use Moose;
8-
use Parse::CPAN::Packages::Fast;
9-
use CPAN::DistnameInfo;
10-
use DateTime::Format::ISO8601 ();
11-
use MetaCPAN::Types::TypeTiny qw( Bool Str );
8+
use Parse::CPAN::Packages::Fast ();
9+
use CPAN::DistnameInfo ();
10+
use DateTime::Format::ISO8601 ();
11+
use MetaCPAN::Types::TypeTiny qw( Bool Str );
1212

1313
with 'MetaCPAN::Role::Script', 'MooseX::Getopt';
1414

lib/MetaCPAN/Script/Mirrors.pm

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ package MetaCPAN::Script::Mirrors;
33
use strict;
44
use warnings;
55

6-
use Cpanel::JSON::XS ();
7-
use Log::Contextual qw( :log :dlog );
8-
use MetaCPAN::Document::Mirror ();
6+
use Cpanel::JSON::XS ();
7+
use Log::Contextual qw( :log :dlog );
98
use Moose;
109

1110
with 'MetaCPAN::Role::Script', 'MooseX::Getopt';

lib/MetaCPAN/Script/Package.pm

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ package MetaCPAN::Script::Package;
22

33
use Moose;
44

5-
use CPAN::DistnameInfo ();
6-
use IO::Uncompress::Gunzip ();
7-
use Log::Contextual qw( :log );
8-
use MetaCPAN::Document::Package ();
9-
use MetaCPAN::Types::TypeTiny qw( Bool );
5+
use CPAN::DistnameInfo ();
6+
use IO::Uncompress::Gunzip ();
7+
use Log::Contextual qw( :log );
8+
use MetaCPAN::Types::TypeTiny qw( Bool );
109

1110
with 'MooseX::Getopt', 'MetaCPAN::Role::Script';
1211

lib/MetaCPAN/Script/Permission.pm

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ package MetaCPAN::Script::Permission;
22

33
use Moose;
44

5-
use Log::Contextual qw( :log );
6-
use MetaCPAN::Document::Permission ();
7-
use MetaCPAN::Types::TypeTiny qw( Bool );
8-
use PAUSE::Permissions ();
5+
use Log::Contextual qw( :log );
6+
use MetaCPAN::Types::TypeTiny qw( Bool );
7+
use PAUSE::Permissions ();
98

109
with 'MooseX::Getopt', 'MetaCPAN::Role::Script';
1110

lib/MetaCPAN/Script/Release.pm

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ use MetaCPAN::Script::Runner ();
1414
use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str );
1515
use Moose;
1616
use PerlIO::gzip;
17-
use Try::Tiny qw( catch try );
18-
use Path::Tiny qw(path);
17+
use Try::Tiny qw( catch try );
1918

2019
with 'MetaCPAN::Role::Script', 'MooseX::Getopt',
2120
'MetaCPAN::Script::Role::Contributor';

lib/MetaCPAN/Script/Runner.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55

66
use Config::ZOMG ();
77
use File::Path ();
8-
use Hash::Merge::Simple qw(merge);
8+
use Hash::Merge::Simple qw( merge );
99
use Module::Pluggable search_path => ['MetaCPAN::Script'];
1010
use Module::Runtime ();
1111
use Try::Tiny qw( catch try );

lib/MetaCPAN/Script/Session.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package MetaCPAN::Script::Session;
33
use strict;
44
use warnings;
55

6-
use DateTime;
6+
use DateTime ();
77
use Moose;
88

99
with 'MetaCPAN::Role::Script', 'MooseX::Getopt';

lib/MetaCPAN/Script/Tickets.pm

+7-8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ use namespace::autoclean;
66
# Some issue with rt.cpan.org's cert
77
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
88

9-
use HTTP::Request::Common qw( GET );
10-
use Log::Contextual qw( :log :dlog );
11-
use MetaCPAN::Types::TypeTiny ();
12-
use Text::CSV_XS ();
13-
use Net::GitHub::V4 ();
14-
use Ref::Util qw( is_hashref is_ref );
15-
use URI::Escape qw( uri_escape );
9+
use HTTP::Request::Common qw( GET );
10+
use Log::Contextual qw( :log :dlog );
11+
use Text::CSV_XS ();
12+
use Net::GitHub::V4 ();
13+
use Ref::Util qw( is_hashref is_ref );
14+
use URI::Escape qw( uri_escape );
1615

1716
with 'MetaCPAN::Role::Script', 'MooseX::Getopt';
1817

@@ -231,7 +230,7 @@ sub parse_tsv {
231230
source => $self->rt_dist_url( $row->{dist} ),
232231
active => $row->{active},
233232
closed => $row->{inactive},
234-
map { $_ => $row->{$_} + 0 }
233+
map { $_ => $row->{$_} + 0 }
235234
grep { not /^(dist|active|inactive)$/ }
236235
keys %$row,
237236
};

lib/MetaCPAN/Script/Watcher.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use strict;
44
use warnings;
55
use Moose;
66

7-
use CPAN::DistnameInfo;
8-
use Cpanel::JSON::XS qw( decode_json );
9-
use Log::Contextual qw( :log );
7+
use CPAN::DistnameInfo ();
8+
use Cpanel::JSON::XS qw( decode_json );
9+
use Log::Contextual qw( :log );
1010
use MetaCPAN::Util;
1111
use MetaCPAN::Types::TypeTiny qw( Bool );
1212

lib/MetaCPAN/Server.pm

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ use Moose;
44

55
## no critic (Modules::RequireEndWithOne)
66
use Catalyst qw( +MetaCPAN::Role::Fastly::Catalyst ), '-Log=warn,error,fatal';
7-
use Digest::SHA ();
8-
use Log::Log4perl::Catalyst;
9-
use Plack::Builder qw( builder enable );
10-
use Plack::Middleware::ReverseProxy;
11-
use Ref::Util qw( is_arrayref is_hashref );
7+
use Digest::SHA ();
8+
use Log::Log4perl::Catalyst ();
9+
use Plack::Builder qw( builder enable );
10+
use Ref::Util qw( is_arrayref is_hashref );
1211

1312
extends 'Catalyst';
1413

lib/MetaCPAN/Server/Action/Deserialize.pm

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package MetaCPAN::Server::Action::Deserialize;
22
use Moose;
33
extends 'Catalyst::Action::Deserialize';
4-
use Cpanel::JSON::XS qw(encode_json);
54

65
around serialize_bad_request => sub {
76
my $orig = shift;

lib/MetaCPAN/Server/Controller.pm

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ package MetaCPAN::Server::Controller;
33
use Moose;
44
use namespace::autoclean;
55

6-
use Cpanel::JSON::XS ();
7-
use Moose::Util ();
8-
use MetaCPAN::Types::TypeTiny qw( HashRef );
9-
use MetaCPAN::Util qw( single_valued_arrayref_to_scalar );
6+
use MetaCPAN::Util qw( single_valued_arrayref_to_scalar );
107

118
BEGIN { extends 'Catalyst::Controller'; }
129

lib/MetaCPAN/Server/Controller/File.pm

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package MetaCPAN::Server::Controller::File;
33
use strict;
44
use warnings;
55

6-
use ElasticSearchX::Model::Util;
76
use Moose;
87
use MetaCPAN::Util qw( single_valued_arrayref_to_scalar );
98

lib/MetaCPAN/Server/Controller/Source.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use strict;
44
use warnings;
55

66
use Moose;
7-
use Plack::App::Directory;
8-
use Plack::MIME;
7+
use Plack::App::Directory ();
8+
use Plack::MIME ();
99

1010
BEGIN { extends 'MetaCPAN::Server::Controller' }
1111

0 commit comments

Comments
 (0)