File tree 21 files changed +30
-50
lines changed
21 files changed +30
-50
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ use Mojo::Base 'Mojolicious';
22
22
use File::Temp ();
23
23
use List::Util qw( any ) ;
24
24
use MetaCPAN::Script::Runner ();
25
- use Search::Elasticsearch ();
26
25
use Try::Tiny qw( catch try ) ;
27
26
use MetaCPAN::Server::Config ();
28
27
use MetaCPAN::Types::TypeTiny qw( ES ) ;
Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ use ElasticSearchX::Model::Document::Types qw( Location );
7
7
use ElasticSearchX::Model::Document;
8
8
9
9
# load order not important
10
- use Gravatar::URL ();
11
- use MetaCPAN::Document::Author::Profile ();
12
- use MetaCPAN::Types qw( ESBool Profile ) ;
13
- use MetaCPAN::Types::TypeTiny qw(
10
+ use Gravatar::URL ();
11
+ use MetaCPAN::Types qw( ESBool Profile ) ;
12
+ use MetaCPAN::Types::TypeTiny qw(
14
13
ArrayRef
15
14
ArrayRefPromote
16
15
Blog
Original file line number Diff line number Diff line change @@ -10,19 +10,11 @@ use ElasticSearchX::Model::Document;
10
10
use List::Util qw( any ) ;
11
11
use MetaCPAN::Document::Module ();
12
12
use MetaCPAN::Types qw( ESBool Module ) ;
13
- use MetaCPAN::Types::TypeTiny qw(
14
- ArrayRef
15
- Int
16
- Maybe
17
- Num
18
- ScalarRef
19
- Stat
20
- Str
21
- ) ;
22
- use MetaCPAN::Util qw( numify_version true false) ;
23
- use Plack::MIME ();
24
- use Pod::Text ();
25
- use Try::Tiny qw( catch try ) ;
13
+ use MetaCPAN::Types::TypeTiny qw( ArrayRef Int Maybe Num ScalarRef Stat Str ) ;
14
+ use MetaCPAN::Util qw( numify_version true false) ;
15
+ use Plack::MIME ();
16
+ use Pod::Text ();
17
+ use Try::Tiny qw( catch try ) ;
26
18
27
19
Plack::MIME-> add_type( ' .t' => ' text/x-script.perl' );
28
20
Plack::MIME-> add_type( ' .pod' => ' text/x-pod' );
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ package MetaCPAN::Document::Release;
3
3
use Moose;
4
4
5
5
use ElasticSearchX::Model::Document;
6
- use MetaCPAN::Document::Dependency ();
7
- use MetaCPAN::Types qw( ESBool Dependency ) ;
8
- use MetaCPAN::Types::TypeTiny qw(
6
+ use MetaCPAN::Types qw( Dependency ESBool ) ;
7
+ use MetaCPAN::Types::TypeTiny qw(
9
8
ArrayRef
10
9
HashRefCPANMeta
11
10
Num
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use Moose;
5
5
6
6
use ElasticSearchX::Model;
7
7
use MetaCPAN::ESConfig qw( es_config) ;
8
- use Module::Runtime qw( require_module use_package_optimistically) ;
8
+ use Module::Runtime qw( require_module use_package_optimistically ) ;
9
9
10
10
my %indexes ;
11
11
my $docs = es_config-> documents;
Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ use warnings;
6
6
use Moose;
7
7
use ElasticSearchX::Model::Document;
8
8
9
- use MetaCPAN::Model::User::Identity ();
10
- use MetaCPAN::Types qw( ESBool Identity ) ;
11
- use MetaCPAN::Types::TypeTiny qw( ArrayRef Dict Str ) ;
12
- use MetaCPAN::Util qw( true false) ;
9
+ use MetaCPAN::Types qw( Identity ) ;
10
+ use MetaCPAN::Types::TypeTiny qw( ArrayRef Dict Str ) ;
11
+ use MetaCPAN::Util qw( true false) ;
13
12
14
13
=head1 PROPERTIES
15
14
Original file line number Diff line number Diff line change @@ -2,13 +2,12 @@ package MetaCPAN::Query::Search;
2
2
3
3
use MetaCPAN::Moose;
4
4
5
- use Const::Fast qw( const ) ;
6
- use Hash::Merge qw( merge ) ;
7
- use List::Util qw( min uniq ) ;
8
- use Log::Contextual qw( :log :dlog ) ;
9
- use MetaCPAN::ESConfig qw( es_doc_path ) ;
10
- use MetaCPAN::Types::TypeTiny qw( Object Str ) ;
11
- use MetaCPAN::Util qw( MAX_RESULT_WINDOW hit_total true false ) ;
5
+ use Const::Fast qw( const ) ;
6
+ use Hash::Merge qw( merge ) ;
7
+ use List::Util qw( min uniq ) ;
8
+ use Log::Contextual qw( :log :dlog ) ;
9
+ use MetaCPAN::ESConfig qw( es_doc_path ) ;
10
+ use MetaCPAN::Util qw( MAX_RESULT_WINDOW hit_total true false ) ;
12
11
use MooseX::StrictConstructor;
13
12
14
13
with ' MetaCPAN::Query::Role::Common' ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use Cpanel::JSON::XS qw( decode_json encode_json );
8
8
use DateTime ();
9
9
use IO::Zlib ();
10
10
use Log::Contextual qw( :log :dlog ) ;
11
- use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str CommaSepOption ) ;
11
+ use MetaCPAN::Types::TypeTiny qw( Bool CommaSepOption Int Path Str ) ;
12
12
use MetaCPAN::Util qw( true false ) ;
13
13
use MetaCPAN::ESConfig qw( es_config ) ;
14
14
use Moose;
Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ use warnings;
5
5
6
6
use Moose;
7
7
8
- use MetaCPAN::ESConfig qw( es_doc_path ) ;
9
- use Log::Contextual qw( :log ) ;
10
- use Ref::Util qw( is_arrayref ) ;
8
+ use Log::Contextual qw( :log ) ;
11
9
12
10
use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ) ;
13
11
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use Moose::Role;
5
5
use Log::Contextual qw( :log :dlog ) ;
6
6
use MetaCPAN::ESConfig qw( es_doc_path ) ;
7
7
use MetaCPAN::Util qw( true false ) ;
8
- use Ref::Util qw( is_arrayref ) ;
8
+ use Ref::Util ( );
9
9
10
10
sub update_contributors {
11
11
my ( $self , $query ) = @_ ;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ use DateTime ();
8
8
use DateTime::Format::ISO8601 ();
9
9
use HTTP::Tiny ();
10
10
use Log::Contextual qw( :log :dlog ) ;
11
- use MetaCPAN::Server::Config ();
12
11
use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Str Uri ) ;
13
12
use Moose;
14
13
use Sys::Hostname qw( hostname ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use Ref::Util qw(
18
18
is_plain_hashref
19
19
is_ref
20
20
) ;
21
- use Cpanel::JSON::XS ();
22
21
use Sub::Exporter -setup => {
23
22
exports => [ qw(
24
23
root_dir
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ use MetaCPAN::TestHelpers qw( fakecpan_dir );
21
21
use MetaCPAN::Types::TypeTiny qw( HashRef Path ) ;
22
22
use MetaCPAN::Util qw( true false ) ;
23
23
use MooseX::Types::ElasticSearch qw( ES ) ;
24
- use Search::Elasticsearch ();
25
24
use Test::More;
26
25
27
26
has es_client => (
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use Test::Routine;
4
4
5
5
use MetaCPAN::ESConfig qw( es_doc_path ) ;
6
6
use MetaCPAN::Server::Test ();
7
- use MetaCPAN::Types::TypeTiny qw( ES ArrayRef HashRef InstanceOf Str ) ;
7
+ use MetaCPAN::Types::TypeTiny qw( ES HashRef Str ) ;
8
8
use Test::More;
9
9
use Try::Tiny qw( try ) ;
10
10
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ use warnings;
3
3
4
4
use lib ' t/lib' ;
5
5
6
- use MetaCPAN::Query;
6
+ use MetaCPAN::Query () ;
7
7
use MetaCPAN::Server::Test ();
8
8
use Test::More;
9
- use Scalar::Util qw( weaken refaddr) ;
9
+ use Scalar::Util qw( refaddr weaken ) ;
10
10
11
11
my $es = MetaCPAN::Server::Test::es();
12
12
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use warnings;
3
3
4
4
use lib ' t/lib' ;
5
5
6
- use MetaCPAN::Server::Test qw( query) ;
6
+ use MetaCPAN::Server::Test qw( query ) ;
7
7
use Test::More;
8
8
9
9
my $query = query()-> release;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use strict;
2
2
use warnings;
3
3
use lib ' t/lib' ;
4
4
5
- use MetaCPAN::Server::Test qw( query es_result ) ;
5
+ use MetaCPAN::Server::Test qw( es_result query ) ;
6
6
use MetaCPAN::Util qw( true false ) ;
7
7
use Test::More;
8
8
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use strict;
2
2
use warnings;
3
3
use lib ' t/lib' ;
4
4
5
- use MetaCPAN::Server::Test qw( query es_result ) ;
5
+ use MetaCPAN::Server::Test qw( es_result ) ;
6
6
use MetaCPAN::Util qw( true false) ;
7
7
use Test::More;
8
8
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use warnings;
3
3
use lib ' t/lib' ;
4
4
5
5
use MetaCPAN::ESConfig qw( es_doc_path ) ;
6
- use MetaCPAN::Server::Test qw( app GET query es test_psgi ) ;
6
+ use MetaCPAN::Server::Test qw( app es GET query test_psgi ) ;
7
7
use Test::More;
8
8
9
9
my $query = query();
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ use strict;
2
2
use warnings;
3
3
use lib ' t/lib' ;
4
4
5
- use Cpanel::JSON::XS ();
6
5
use MetaCPAN::TestHelpers qw( test_release ) ;
7
6
use MetaCPAN::Util qw( true false ) ;
8
7
use Test::More;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ use strict;
2
2
use warnings;
3
3
use lib ' t/lib' ;
4
4
5
- use Cpanel::JSON::XS ();
6
5
use MetaCPAN::TestHelpers qw( test_release ) ;
7
6
use MetaCPAN::Util qw( true false) ;
8
7
use Test::More;
You can’t perform that action at this time.
0 commit comments