From 8c8ddfc020e92f46e7de3b8d50c53c8f053dd1ab Mon Sep 17 00:00:00 2001 From: Dan Book Date: Wed, 1 May 2019 18:20:31 -0400 Subject: [PATCH 001/725] cpanfile cleanup * quote versions consistently * '>= VERSION' is the same as specifying 'VERSION' * '>=' as a separate argument is not supported * minor style consistency --- cpanfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cpanfile b/cpanfile index f219174d8..cb7bbc367 100644 --- a/cpanfile +++ b/cpanfile @@ -1,6 +1,6 @@ requires 'perl', '5.010'; -requires 'Archive::Any', 0.0942; +requires 'Archive::Any', '0.0942'; requires 'Archive::Tar', '2.04'; requires 'Authen::SASL', '2.16'; requires 'BackPAN::Index', '0.42'; @@ -30,11 +30,11 @@ requires 'CatalystX::Fastly::Role::Response', '0.06'; requires 'CatalystX::InjectComponent'; requires 'CatalystX::RoleApplicator'; requires 'Config::General'; -requires 'Config::ZOMG', '>=', '1.000000'; +requires 'Config::ZOMG', '1.000000'; requires 'Const::Fast'; requires 'Cpanel::JSON::XS', '3.0115'; requires 'Cwd'; -requires 'DBD::SQLite', '>=1.50'; +requires 'DBD::SQLite', '1.50'; requires 'DBI', '1.616'; requires 'Data::DPath'; requires 'Data::Dump'; @@ -67,7 +67,7 @@ requires 'File::stat'; requires 'Find::Lib'; requires 'FindBin'; requires 'Gazelle'; -requires 'Getopt::Long::Descriptive', '>= 0.103'; +requires 'Getopt::Long::Descriptive', '0.103'; requires 'Git::Helpers'; requires 'Gravatar::URL'; requires 'HTML::Entities'; @@ -100,17 +100,17 @@ requires 'MIME::Base64', '3.15'; requires 'MetaCPAN::Moose'; requires 'MetaCPAN::Pod::XHTML'; requires 'MetaCPAN::Role', '0.06'; -requires 'Minion', '>= 9.03'; +requires 'Minion', '9.03'; requires 'Minion::Backend::SQLite'; requires 'Module::Load'; requires 'Module::Metadata', '1.000022'; requires 'Module::Pluggable'; requires 'Module::Runtime'; -requires 'Mojo::Pg', '>= 4.08'; +requires 'Mojo::Pg', '4.08'; requires 'Mojolicious::Plugin::MountPSGI', '0.14'; requires 'Mojolicious::Plugin::OpenAPI'; -requires 'Mojolicious::Plugin::Web::Auth', '>= 0.17'; -requires 'Moose', ' >= 2.1403'; +requires 'Mojolicious::Plugin::Web::Auth', '0.17'; +requires 'Moose', '2.1403'; requires 'Moose::Role'; requires 'Moose::Util'; requires 'MooseX::Aliases'; @@ -124,7 +124,7 @@ requires 'MooseX::Getopt::OptionTypeMap'; requires 'MooseX::StrictConstructor'; requires 'MooseX::Types'; requires 'MooseX::Types::Common::String'; -requires 'MooseX::Types::ElasticSearch', ' == 0.0.4'; +requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; requires 'MooseX::Types::Path::Class::MoreCoercions'; requires 'MooseX::Types::Structured'; @@ -139,9 +139,9 @@ requires 'PAUSE::Permissions'; requires 'Parse::CPAN::Packages::Fast', '0.09'; requires 'Parse::CSV', '2.04'; requires 'Parse::PMFile', '0.41'; -requires 'Path::Class', '>= 0.36'; +requires 'Path::Class', '0.36'; requires 'Path::Class::File'; -requires 'Path::Iterator::Rule', '>=1.011'; +requires 'Path::Iterator::Rule', '1.011'; requires 'PerlIO::gzip'; requires 'Pithub', '0.01033'; requires 'Plack', '1.0039'; @@ -179,23 +179,23 @@ requires 'base'; requires 'feature'; requires 'namespace::autoclean'; requires 'strict'; -requires 'strictures', 1; +requires 'strictures', '1'; requires 'utf8'; requires 'version', '0.9901'; requires 'warnings'; test_requires 'App::Prove'; test_requires 'CPAN::Faker', '0.010'; -test_requires 'Code::TidyAll', '>= 0.47'; +test_requires 'Code::TidyAll', '0.47'; test_requires 'Code::TidyAll::Plugin::UniqueLines'; test_requires 'Devel::Confess'; test_requires 'File::Copy'; test_requires 'HTTP::Cookies'; test_requires 'LWP::ConsoleLogger::Easy'; -test_requires 'MetaCPAN::Client', '>=', '2.017000'; +test_requires 'MetaCPAN::Client', '2.017000'; test_requires 'Module::Faker', '0.015'; test_requires 'Module::Faker::Dist', '0.010'; -test_requires 'Perl::Tidy' => '20181120'; +test_requires 'Perl::Tidy', '20181120'; test_requires 'Plack::Test::Agent'; test_requires 'Test::Code::TidyAll'; test_requires 'Test::More', '0.99'; From a8384e40659b13a70734ebc3706a335bb228ecdb Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 7 May 2019 16:07:54 -0400 Subject: [PATCH 002/725] Move IRC notifications to metacpan-infra --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8464da066..5b356d3b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ notifications: - olaf@wundersolutions.com on_success: always on_failure: always - irc: "irc.perl.org#metacpan-travis" + irc: "irc.perl.org#metacpan-infra" env: global: From 3aa68d10ecf1ff759f9fcc684deca5c4351013e9 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 8 May 2019 17:26:17 +0200 Subject: [PATCH 003/725] fix remove_identity --- lib/MetaCPAN/Model/User/Account.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index d130f5074..04d86f9aa 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -148,7 +148,7 @@ sub get_identities { sub remove_identity { my ( $self, $identity ) = @_; - my $ids = $self->identities; + my $ids = $self->identity; my ($id) = grep { $_->{name} eq $identity } @$ids; @$ids = grep { $_->{name} ne $identity } @$ids; From 1363c755f9560df30b9398479a21f6df972c1330 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Thu, 16 May 2019 15:41:05 -0400 Subject: [PATCH 004/725] Add rsync to container for index updates Running `index-cpan.sh` requires that `rsync` is installed within the container. It was previously removed from the `metacpan-base` image, and as the api is the container that will make use of it (or a container based on its image), adding it into the image. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 523da8bc6..4e43df46f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ WORKDIR /metacpan-api # modules is tested by the test suite. Removing the tests, reduces the overall # size of the images. RUN mkdir /CPAN \ + && apt-get update \ + && apt-get install -y rsync \ && cpm install --global --without-test \ && rm -fr /root/.cpanm /root/.perl-cpm /var/cache/apt/lists/* /tmp/* From 9777188a959998b01b5d2e573190596bd5e3ea68 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Sun, 18 Nov 2018 16:14:57 -0500 Subject: [PATCH 005/725] Add model for Cover Using `MetaCPAN::API::Model::User` as an example, migrate the query from `MetaCPAN::Query::Cover` into the new module structure. --- lib/MetaCPAN/API/Model/Cover.pm | 31 +++++++++++++++++++++++++++++++ lib/MetaCPAN/API/Plugin/Model.pm | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 lib/MetaCPAN/API/Model/Cover.pm diff --git a/lib/MetaCPAN/API/Model/Cover.pm b/lib/MetaCPAN/API/Model/Cover.pm new file mode 100644 index 000000000..43134d3a9 --- /dev/null +++ b/lib/MetaCPAN/API/Model/Cover.pm @@ -0,0 +1,31 @@ +package MetaCPAN::API::Model::Cover; + +use MetaCPAN::Moose; + +with 'MetaCPAN::API::Model::Role::ES'; + +sub find_release_coverage { + my ( $self, $release ) = @_; + + my $query = +{ term => { release => $release } }; + + my $res = $self->_run_query( + index => 'cover', + type => 'cover', + body => { + query => $query, + size => 999, + } + ); + $res->{hits}{total} or return {}; + + return +{ + %{ $res->{hits}{hits}[0]{_source} }, + url => "http://cpancover.com/latest/$release/index.html", + }; +} + +__PACKAGE__->meta->make_immutable; + +1; + diff --git a/lib/MetaCPAN/API/Plugin/Model.pm b/lib/MetaCPAN/API/Plugin/Model.pm index 157e0230e..b997f8a5b 100644 --- a/lib/MetaCPAN/API/Plugin/Model.pm +++ b/lib/MetaCPAN/API/Plugin/Model.pm @@ -10,6 +10,7 @@ use MetaCPAN::Model::Search (); # New models use MetaCPAN::API::Model::User (); use MetaCPAN::API::Model::Download (); +use MetaCPAN::API::Model::Cover (); has app => sub { Carp::croak 'app is required' }, weak => 1; @@ -31,6 +32,11 @@ has user => sub { return MetaCPAN::API::Model::User->new( es => $self->app->es ); }; +has cover => sub { + my $self = shift; + return MetaCPAN::API::Model::Cover->new( es => $self->app->es ); +}; + sub register { my ( $plugin, $app, $conf ) = @_; $plugin->app($app); @@ -39,6 +45,7 @@ sub register { $app->helper( 'model.download' => sub { $plugin->download } ); $app->helper( 'model.search' => sub { $plugin->search } ); $app->helper( 'model.user' => sub { $plugin->user } ); + $app->helper( 'model.cover' => sub { $plugin->cover } ); } 1; From 00099695ff89d869999ff4bc71890bf9caa0311b Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Sun, 18 Nov 2018 23:17:46 -0500 Subject: [PATCH 006/725] Add Mojolicious based Cover controller Now that there's a new model, create a controller that uses the model and test it. --- lib/MetaCPAN/API/Controller/Cover.pm | 16 ++++++++++ t/api/controller/cover.t | 46 ++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 lib/MetaCPAN/API/Controller/Cover.pm create mode 100644 t/api/controller/cover.t diff --git a/lib/MetaCPAN/API/Controller/Cover.pm b/lib/MetaCPAN/API/Controller/Cover.pm new file mode 100644 index 000000000..7479b5154 --- /dev/null +++ b/lib/MetaCPAN/API/Controller/Cover.pm @@ -0,0 +1,16 @@ +package MetaCPAN::API::Controller::Cover; + +use Mojo::Base 'Mojolicious::Controller'; + +sub lookup { + my $c = shift; + return unless $c->openapi->valid_input; + my $args = $c->validation->output; + + my $results = $c->model->cover->find_release_coverage( $args->{name} ); + return $c->render( openapi => $results ) if $results; + $c->rendered(404); +} + +1; + diff --git a/t/api/controller/cover.t b/t/api/controller/cover.t new file mode 100644 index 000000000..36c39739e --- /dev/null +++ b/t/api/controller/cover.t @@ -0,0 +1,46 @@ +use Mojo::Base -strict; + +use Test::More; +use Test::Mojo; +use Mojo::JSON qw(true false); + +my $t = Test::Mojo->new('MetaCPAN::API'); +my %expect = ( + 'Devel-GoFaster-0.000' => { + criteria => { + branch => '12.50', + condition => '0.00', + statement => '63.64', + subroutine => '71.43', + total => '46.51', + }, + distribution => 'Devel-GoFaster', + release => 'Devel-GoFaster-0.000', + url => 'http://cpancover.com/latest/Devel-GoFaster-0.000/index.html', + version => '0.000', + }, + 'Try-Tiny-0.27' => { + criteria => { + branch => '78.95', + condition => '46.67', + statement => '95.06', + subroutine => '100.00', + total => '86.58', + }, + distribution => 'Try-Tiny', + release => 'Try-Tiny-0.27', + url => 'http://cpancover.com/latest/Try-Tiny-0.27/index.html', + version => '0.27', + }, +); + +for my $release ( keys %expect ) { + my $expected = $expect{$release}; + subtest "Check $release" => sub { + + $t->get_ok("/v1/cover/$release")->status_is(200)->json_is($expected) + ->or( sub { diag $t->tx->res->dom } ); + + }; +} +done_testing; From bfb72aa9d93f6e47f23c750acc7437ec3f976a06 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Sun, 18 Nov 2018 23:19:00 -0500 Subject: [PATCH 007/725] Add common definitions Something like ErrorModel is going to be used everywhere, and there will be more. Creating definitions/common to collect them all. --- root/static/definitions/common.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 root/static/definitions/common.yml diff --git a/root/static/definitions/common.yml b/root/static/definitions/common.yml new file mode 100644 index 000000000..4835b3059 --- /dev/null +++ b/root/static/definitions/common.yml @@ -0,0 +1,13 @@ +--- + +ErrorModel: + type: "object" + required: + - "code" + - "message" + properties: + code: + type: "integer" + format: "int32" + message: + type: "string" From e4439fe10264c85926340a25bf3fe8c8e94b54c2 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Sun, 18 Nov 2018 23:22:30 -0500 Subject: [PATCH 008/725] Add coverage specs Define the cover spec and connect the route to use the new controller. --- root/static/requests/cover.yml | 28 ++++++++++++++++++++++++++++ root/static/v1.yml | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 root/static/requests/cover.yml diff --git a/root/static/requests/cover.yml b/root/static/requests/cover.yml new file mode 100644 index 000000000..bd7a7c5e9 --- /dev/null +++ b/root/static/requests/cover.yml @@ -0,0 +1,28 @@ +--- + +cover: + get: + tags: + - Coverage + operationId: cover + x-mojo-to: Cover#lookup + summary: Get coverage details about a release + parameters: + - name: name + in: path + description: | + The name of the Release + type: string + required: true + responses: + 200: + description: Release response + schema: + type: object + properties: + name: + type: string + default: + description: "unexpected error" + schema: + $ref: "../definitions/common.yml#/ErrorModel" diff --git a/root/static/v1.yml b/root/static/v1.yml index 46e00989d..59c0f3ff1 100644 --- a/root/static/v1.yml +++ b/root/static/v1.yml @@ -22,3 +22,5 @@ paths: $ref: "requests/search.yml#/search_web" /search/first: $ref: "requests/search.yml#/search_first" + /cover/{name}: + $ref: "requests/cover.yml#/cover" From df2ecef8fc363d55f933a545f7bae8c3cb229010 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sun, 28 Apr 2019 08:34:45 +0200 Subject: [PATCH 009/725] Added file input support for Script::Cover + fixed test --- lib/MetaCPAN/Script/Cover.pm | 17 ++++++++-- t/00_setup.t | 1 + t/lib/MetaCPAN/TestServer.pm | 9 ++++++ t/server/controller/cover.t | 20 ++++++------ t/var/cover.json | 60 +++--------------------------------- 5 files changed, 40 insertions(+), 67 deletions(-) diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 6b51441ac..28ac161e9 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -5,7 +5,8 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Bool Uri); +use MetaCPAN::Types qw( Bool Str Uri); +use Path::Class qw( file ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -30,6 +31,14 @@ has test => ( documentation => 'Test mode (pulls smaller development data set)', ); +has json_file => ( + is => 'ro', + isa => Str, + default => 0, + documentation => + 'Path to JSON file to be read instead of URL (for testing)', +); + my %valid_keys = map { $_ => 1 } qw< branch condition statement subroutine total >; @@ -96,6 +105,11 @@ sub index_cover_data { sub retrieve_cover_data { my $self = shift; + if ( $self->json_file ) { + my $file = file( $self->json_file ); + return decode_json( $file->slurp ); + } + my $url = $self->test ? $self->cover_dev_url : $self->cover_url; log_info { 'Fetching data from ', $url }; @@ -129,4 +143,3 @@ Retrieves the CPAN cover data from its source and updates our ES information. =cut - diff --git a/t/00_setup.t b/t/00_setup.t index 27150a789..d6d925af5 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -105,6 +105,7 @@ $server->prepare_user_test_data; $server->index_cpantesters; $server->index_mirrors; $server->index_favorite; +$server->index_cover; ok( MetaCPAN::Script::Tickets->new_with_options( diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 58d55b7e3..a874bd9a7 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -4,6 +4,7 @@ use MetaCPAN::Moose; use MetaCPAN::DarkPAN (); use MetaCPAN::Script::Author (); +use MetaCPAN::Script::Cover (); use MetaCPAN::Script::CPANTestersAPI (); use MetaCPAN::Script::Favorite (); use MetaCPAN::Script::First (); @@ -226,6 +227,14 @@ sub index_mirrors { 'index mirrors' ); } +sub index_cover { + my $self = shift; + + local @ARGV = ( 'cover', '--json_file', 't/var/cover.json' ); + ok( MetaCPAN::Script::Cover->new_with_options( $self->_config )->run, + 'index cover' ); +} + sub index_permissions { my $self = shift; diff --git a/t/server/controller/cover.t b/t/server/controller/cover.t index 512605661..d39bbf178 100644 --- a/t/server/controller/cover.t +++ b/t/server/controller/cover.t @@ -7,7 +7,7 @@ use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; my %expect = ( - 'Devel-GoFaster-0.000' => { + 'MetaFile-Both-1.1' => { criteria => { branch => '12.50', condition => '0.00', @@ -15,12 +15,12 @@ my %expect = ( subroutine => '71.43', total => '46.51', }, - distribution => 'Devel-GoFaster', - release => 'Devel-GoFaster-0.000', - url => 'http://cpancover.com/latest/Devel-GoFaster-0.000/index.html', - version => '0.000', + distribution => 'MetaFile-Both', + release => 'MetaFile-Both-1.1', + url => 'http://cpancover.com/latest/MetaFile-Both-1.1/index.html', + version => '1.1', }, - 'Try-Tiny-0.27' => { + 'Pod-With-Generator-1' => { criteria => { branch => '78.95', condition => '46.67', @@ -28,10 +28,10 @@ my %expect = ( subroutine => '100.00', total => '86.58', }, - distribution => 'Try-Tiny', - release => 'Try-Tiny-0.27', - url => 'http://cpancover.com/latest/Try-Tiny-0.27/index.html', - version => '0.27', + distribution => 'Pod-With-Generator', + release => 'Pod-With-Generator-1', + url => 'http://cpancover.com/latest/Pod-With-Generator-1/index.html', + version => '1', }, ); diff --git a/t/var/cover.json b/t/var/cover.json index d8dfe901c..279474b99 100644 --- a/t/var/cover.json +++ b/t/var/cover.json @@ -1,6 +1,6 @@ { - "Devel-GoFaster" : { - "0.000" : { + "MetaFile-Both" : { + "1.1" : { "coverage" : { "total" : { "branch" : "12.50", @@ -10,36 +10,10 @@ "total" : "46.51" } } - }, - "0.001" : { - "coverage" : { - "total" : { - "branch" : "12.50", - "condition" : "0.00", - "statement" : "61.90", - "subroutine" : "71.43", - "total" : "45.24" - } - } } }, - "Try-Tiny" : { - "0.22" : { - "coverage" : { - "total" : {} - } - }, - "0.23" : { - "coverage" : { - "total" : {} - } - }, - "0.24" : { - "coverage" : { - "total" : {} - } - }, - "0.27" : { + "Pod-With-Generator" : { + "1" : { "coverage" : { "total" : { "branch" : "78.95", @@ -50,30 +24,6 @@ "total" : "86.58" } } - }, - "0.28" : { - "coverage" : { - "total" : { - "branch" : "78.95", - "condition" : "46.67", - "pod" : "100.00", - "statement" : "95.06", - "subroutine" : "100.00", - "total" : "86.58" - } - } - }, - "0.30" : { - "coverage" : { - "total" : { - "branch" : "78.95", - "condition" : "46.67", - "pod" : "100.00", - "statement" : "94.87", - "subroutine" : "100.00", - "total" : "86.30" - } - } } } -} \ No newline at end of file +} From a09056b397b61c7fc63ea1f69154847821fc08ed Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Thu, 23 May 2019 10:56:41 -0400 Subject: [PATCH 010/725] Add server set up as part of the test Previously the Test::Mojo application would use the default ES server which doesn't have all the test data populated, not the testing "fake" server. By using MetaCPAN::TestServer, the "fake" server is populated and the configuration for that server is passed into the Mojolicious application for testing. --- t/api/controller/cover.t | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/t/api/controller/cover.t b/t/api/controller/cover.t index 36c39739e..e638db2e5 100644 --- a/t/api/controller/cover.t +++ b/t/api/controller/cover.t @@ -1,10 +1,21 @@ use Mojo::Base -strict; +use lib 't/lib'; use Test::More; use Test::Mojo; use Mojo::JSON qw(true false); -my $t = Test::Mojo->new('MetaCPAN::API'); +use MetaCPAN::Model::Search (); +use MetaCPAN::TestServer (); +my $server = MetaCPAN::TestServer->new; + +my $t = Test::Mojo->new( + 'MetaCPAN::API' => { + es => $server->es_client, + secret => 'just a test', + } +); + my %expect = ( 'Devel-GoFaster-0.000' => { criteria => { From e465669543f3dbf4d563b2611b85902d257492c8 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Thu, 23 May 2019 10:58:42 -0400 Subject: [PATCH 011/725] Change test data to match model test Switching the data back to the test data that is used in the model tests as it's known to be populated in the test instance. --- t/api/controller/cover.t | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/t/api/controller/cover.t b/t/api/controller/cover.t index e638db2e5..7d61310dc 100644 --- a/t/api/controller/cover.t +++ b/t/api/controller/cover.t @@ -17,7 +17,7 @@ my $t = Test::Mojo->new( ); my %expect = ( - 'Devel-GoFaster-0.000' => { + 'MetaFile-Both-1.1' => { criteria => { branch => '12.50', condition => '0.00', @@ -25,12 +25,12 @@ my %expect = ( subroutine => '71.43', total => '46.51', }, - distribution => 'Devel-GoFaster', - release => 'Devel-GoFaster-0.000', - url => 'http://cpancover.com/latest/Devel-GoFaster-0.000/index.html', - version => '0.000', + distribution => 'MetaFile-Both', + release => 'MetaFile-Both-1.1', + url => 'http://cpancover.com/latest/MetaFile-Both-1.1/index.html', + version => '1.1', }, - 'Try-Tiny-0.27' => { + 'Pod-With-Generator-1' => { criteria => { branch => '78.95', condition => '46.67', @@ -38,10 +38,10 @@ my %expect = ( subroutine => '100.00', total => '86.58', }, - distribution => 'Try-Tiny', - release => 'Try-Tiny-0.27', - url => 'http://cpancover.com/latest/Try-Tiny-0.27/index.html', - version => '0.27', + distribution => 'Pod-With-Generator', + release => 'Pod-With-Generator-1', + url => 'http://cpancover.com/latest/Pod-With-Generator-1/index.html', + version => '1', }, ); From e515f05b81220857bf2b78e1b6cef2c088ed0c3e Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Thu, 23 May 2019 14:33:05 -0400 Subject: [PATCH 012/725] Add placeholder parameter The placeholder parameter tells Mojolicious how to parse the path. In this case, Mojolicious will parse the path with relaxed placeholders, which means parsing the path by slashes only. The default being slashes and dots ([^/.]+) which isn't good for CPAN releases due to dots in the version numbers. --- root/static/requests/cover.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/root/static/requests/cover.yml b/root/static/requests/cover.yml index bd7a7c5e9..07e7bb117 100644 --- a/root/static/requests/cover.yml +++ b/root/static/requests/cover.yml @@ -14,6 +14,9 @@ cover: The name of the Release type: string required: true + # tell Mojolicious to use relaxed placeholders when + # parsing this parameter (dots are allowed) + x-mojo-placeholder: "#" responses: 200: description: Release response From 12bdc74adbf2cfbfecbc9041e025402237fdbf24 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Fri, 24 May 2019 16:46:04 -0400 Subject: [PATCH 013/725] Add detailed response data for cover Now that this code is working it's important to return the right results. --- root/static/requests/cover.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/root/static/requests/cover.yml b/root/static/requests/cover.yml index 07e7bb117..639e96730 100644 --- a/root/static/requests/cover.yml +++ b/root/static/requests/cover.yml @@ -23,8 +23,37 @@ cover: schema: type: object properties: - name: + url: type: string + description: URL for cpancover report + version: + type: string + description: Package version string + release: + type: string + description: Package name with version + criteria: + type: object + description: CPAN Cover results + properties: + total: + type: string + description: Percentage of total code coverage + condition: + type: string + description: Percentage of condition code coverage + statement: + type: string + description: Percentage of statement code coverage + branch: + type: string + description: Percentage of branch code coverage + subroutine: + type: string + description: Percentage of subroutine code coverage + distribution: + type: string + description: Name of the distribution default: description: "unexpected error" schema: From e6ca19cbf3a60d350e152cd79754803908d3e231 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Mon, 25 Nov 2019 18:47:38 -0500 Subject: [PATCH 014/725] Increase release limit for perl versions endpoint --- lib/MetaCPAN/Query/Release.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index a679b5b7e..5f00007b6 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -549,9 +549,10 @@ sub all_by_author { sub versions { my ( $self, $dist ) = @_; + my $size = $dist eq 'perl' ? 1000 : 250; my $body = { query => { term => { distribution => $dist } }, - size => 250, + size => $size, sort => [ { date => 'desc' } ], fields => [ qw( name date author version status maturity authorized download_url) From eb1a97e58c433b9c76d5ffbddf1fc89c2d975e37 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 28 Nov 2019 17:52:37 +0100 Subject: [PATCH 015/725] block indexing weird perl-like archives --- lib/MetaCPAN/Script/Release.pm | 47 +++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 0821a2d62..b7302b202 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -85,6 +85,48 @@ has _bulk_size => ( default => 10, ); +my @skip_dists = ( + + # specific dists to skip. it's ugly to have all of these hard coded, but + # it works for now + qw( + AEPAGE/perl5.00502Tk800.011-win32-586.zip + ANDYD/perl5.002b1h.tar.gz + BMIDD/perl5.004_02-AlphaNTPreComp.tar.gz + BMIDD/perl5.00402-bindist04-msvcAlpha.tar.gz + BMIDD/perl5.00402-bindist05-msvcAlpha.tar.gz + GRABZIT/perl.2.3.0.zip + GSAR/perl5.00401-bindist02-bc.tar.gz + GSAR/perl5.00401-bindist-bc.tar.gz + GSAR/perl5.00402-bindist03-bc.tar.gz + GSAR/perl5.00402-bindist04-bc.tar.gz + GSAR/perl5.00402-bindist04-bc.zip + HOOO/perl-0.0017.tar.gz + JBAKER/perl-5.005_02+apache1.3.3+modperl-1.16-bin-bindist1-i386-win32-vc5.zip + KRISHPL/perl-5.6-info.tar.gz + LMOLNAR/perl5.00402-bindist01-dos-djgpp.zip + LMOLNAR/perl5.00503-bin-1-dos-djgpp.zip + MSCHWERN/perl-1.0_15.tar.gz + RCLAMP/perl-1.0_16.tar.gz + SREZIC/perl-5.005-basicmods-bin-0-arm-linux.tar.gz + SREZIC/perl-5.005-minimal-bin-0-arm-linux.tar.gz + SREZIC/perl-5.005-minimal-bin-1-arm-linux.tar.gz + SREZIC/perl-5.005-Tk-800.023-bin-0-arm-linux.tar.gz + ), + +# ILYAZ has lots of old weird os2 files that don't fit as dists or perl releases + qr{/ILYAZ/os2/[^/]+/perl_\w+\.zip\z}, + qr{/ILYAZ/os2/perl[^/]+\.zip\z}, + + # Strip off any files in a Perl6 folder + # e.g. http://www.cpan.org/authors/id/J/JD/JDV/Perl6/ + # As here we are indexing perl5 only + qr{/Perl6/}, +); + +my ($SKIP_MATCH) = map qr/$_/, join '|', + map +( ref $_ ? $_ : qr{/\Q$_\E\z} ), @skip_dists; + sub run { my $self = shift; my ( undef, @args ) = @{ $self->extra_argv }; @@ -138,10 +180,7 @@ sub run { } } - # Strip off any files in a Perl6 folder - # e.g. http://www.cpan.org/authors/id/J/JD/JDV/Perl6/ - # As here we are indexing perl5 only - @files = grep { $_ !~ m{/Perl6/} } @files; + @files = grep $_ !~ $SKIP_MATCH, @files; log_info { scalar @files, " archives found" } if ( @files > 1 ); From f6a99309148fec22b0567965bcbed22d3d438b16 Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Thu, 5 Dec 2019 12:00:27 -0500 Subject: [PATCH 016/725] Do not refresh morbo app when log is updated We do not need to restart the webapp every time there is a log entry in var/log/metacpan.log otherwise we will end up always restarting in development. This is similar to the fix applied to the docker repo Upstream-URL: https://github.com/metacpan/metacpan-docker/pull/51 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index cc4c34cad..76bd9675d 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ PGDB=db:5432 -API_SERVER=morbo -l http://*:5000 -w . --verbose +API_SERVER=morbo -l http://*:5000 -w app.psgi -w bin -w lib -w templates --verbose From fd5dacaa9676040a5e39bb2baf39efd33fd59961 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 5 Dec 2019 17:35:34 +0100 Subject: [PATCH 017/725] Use ES_TEST in tests Since moving to the docker env we need to make sure tests don't clobber data in the dev elasticsearch instance but use the elasticsearch_test one. --- .travis.yml | 1 + etc/metacpan_testing.pl | 2 +- t/lib/MetaCPAN/Server/Test.pm | 2 +- t/lib/MetaCPAN/TestServer.pm | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b356d3b5..9cbbb2d0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: # We use a non-standard port to avoid trashing production # but travis will have it running on the standard port. - ES=localhost:9200 + - ES_TEST=localhost:9200 # Instantiate Catalyst models using metacpan_server_testing.conf - METACPAN_SERVER_CONFIG_LOCAL_SUFFIX=testing diff --git a/etc/metacpan_testing.pl b/etc/metacpan_testing.pl index 7d7881ea5..a56f70d5a 100644 --- a/etc/metacpan_testing.pl +++ b/etc/metacpan_testing.pl @@ -1,5 +1,5 @@ { - es => ($ENV{ES} || 'localhost:9900'), + es => ($ENV{ES_TEST} || 'localhost:9900'), port => '5900', die_on_error => 1, level => ($ENV{TEST_VERBOSE} ? 'info' : 'warn'), diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index cfe8240b0..fbd1ab258 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -40,7 +40,7 @@ sub app { require MetaCPAN::Model; sub model { - MetaCPAN::Model->new( es => ( $ENV{ES} ||= 'localhost:9900' ) ); + MetaCPAN::Model->new( es => ( $ENV{ES_TEST} ||= 'localhost:9200' ) ); } 1; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index a874bd9a7..1260a6faa 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -79,11 +79,11 @@ sub _build_config { sub _build_es_home { my $self = shift; - my $es_home = $ENV{ES}; + my $es_home = $ENV{ES_TEST}; if ( !$es_home ) { my $es_home = $ENV{ES_HOME} or die <<'USAGE'; -Please set $ENV{ES} to a running instance of Elasticsearch, eg +Please set ${ES_TEST} to a running instance of Elasticsearch, eg 'localhost:9200' or set $ENV{ES_HOME} to the directory containing Elasticsearch USAGE @@ -114,7 +114,7 @@ sub _build_es_server { diag 'Connecting to Elasticsearch on ' . $self->_es_home; try { - $ENV{ES} = $server->start->[0]; + $ENV{ES_TEST} = $server->start->[0]; } catch { diag(<<"EOF"); From 3758228db7c28b33f2a31f5573e8835b7cee2e5a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 5 Dec 2019 16:19:04 -0500 Subject: [PATCH 018/725] Stop saving cpanfile.snapshot in AWS --- .travis.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9cbbb2d0a..c97b50b09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,10 +108,3 @@ cache: - local - ~/perl5 - t/var/darkpan - -addons: - artifacts: - debug: true - s3_region: "us-east-1" - paths: - - $TRAVIS_BUILD_DIR/cpanfile.snapshot From fc1e12813a1fd07ececfc6f38a359e8ef78fc3f0 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 27 Dec 2018 09:21:12 +0100 Subject: [PATCH 019/725] Added checksums (md5/sha256) to release archives + download_url endpoint --- lib/MetaCPAN/Document/File/Set.pm | 42 +++++++++++++++++++-- lib/MetaCPAN/Document/Release.pm | 5 +++ lib/MetaCPAN/Model/Archive.pm | 25 +++++++++++- lib/MetaCPAN/Model/Release.pm | 14 ++++--- lib/MetaCPAN/Query/Release.pm | 19 ++++++++++ lib/MetaCPAN/Script/Mapping/CPAN/Release.pm | 10 +++++ t/server/controller/download_url.t | 23 +++++++++-- 7 files changed, 125 insertions(+), 13 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index 446faa8fe..37f7ab79a 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -8,6 +8,7 @@ use List::Util qw( max ); use MetaCPAN::Query::File; use MetaCPAN::Query::Favorite; +use MetaCPAN::Query::Release; extends 'ElasticSearchX::Model::Document::Set'; @@ -43,6 +44,22 @@ sub _build_query_favorite { ); } +has query_release => ( + is => 'ro', + isa => 'MetaCPAN::Query::Release', + lazy => 1, + builder => '_build_query_release', + handles => [qw< get_checksums >], +); + +sub _build_query_release { + my $self = shift; + return MetaCPAN::Query::Release->new( + es => $self->es, + index_name => $self->index->name, + ); +} + my @ROGUE_DISTRIBUTIONS = qw( Acme-DependOnEverything Bundle-Everything @@ -320,15 +337,34 @@ sub find_download_url { my $res = $self->size(1)->query($query) - ->source( [ 'download_url', 'date', 'status' ] ) + ->source( [ 'release', 'download_url', 'date', 'status' ] ) ->search_type('dfs_query_then_fetch')->sort( \@sort )->raw->all; return unless $res->{hits}{total}; - my $hit = $res->{hits}{hits}[0]; + my @checksums; + + my $hit = $res->{hits}{hits}[0]; + my $release = exists $hit->{_source} ? $hit->{_source}{release} : undef; + + if ($release) { + my $checksums = $self->get_checksums($release); + @checksums = ( + ( + $checksums->{checksum_md5} + ? ( checksum_md5 => $checksums->{checksum_md5} ) + : () + ), + ( + $checksums->{checksum_sha256} + ? ( checksum_sha256 => $checksums->{checksum_sha256} ) + : () + ), + ); + } return +{ %{ $hit->{_source} }, - %{ $hit->{inner_hits}{module}{hits}{hits}[0]{_source} }, + %{ $hit->{inner_hits}{module}{hits}{hits}[0]{_source} }, @checksums, }; } diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index d6cffce81..b59fd9fc4 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -146,6 +146,11 @@ has download_url => ( builder => '_build_download_url', ); +has [qw(checksum_md5 checksum_sha256)] => ( + is => 'ro', + isa => Str, +); + has [qw(distribution name)] => ( is => 'ro', required => 1, diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index fa8d62ad9..0ee1040ab 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -3,12 +3,13 @@ package MetaCPAN::Model::Archive; use v5.10; use Moose; use MooseX::StrictConstructor; -use MetaCPAN::Types qw(AbsFile AbsDir ArrayRef Bool); +use MetaCPAN::Types qw(AbsFile AbsDir ArrayRef Bool Str); use Archive::Any; use Carp; use File::Temp (); use Path::Class (); +use Digest::file qw( digest_file_hex ); =head1 NAME @@ -68,6 +69,28 @@ has _extractor => ( }, ); +# MD5 digest for the archive file +has file_digest_md5 => ( + is => 'ro', + isa => Str, + lazy => 1, + default => sub { + my $self = shift; + digest_file_hex( $self->file, 'MD5' ); + }, +); + +# SHA256 digest for the archive file +has file_digest_sha256 => ( + is => 'ro', + isa => Str, + lazy => 1, + default => sub { + my $self = shift; + digest_file_hex( $self->file, 'SHA-256' ); + }, +); + # Holding the File::Temp::Dir object here is necessary to keep it # alive until the object is destroyed. Path::Class::Dir will not hold # onto the ojbect. diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index 96f720768..c74cacfba 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -194,12 +194,14 @@ sub _build_document { my $dependencies = $self->dependencies; my $document = DlogS_trace {"adding release $_"} +{ - abstract => MetaCPAN::Util::strip_pod( $meta->abstract ), - archive => $self->filename, - author => $self->author, - date => $self->date . q{}, - dependency => $dependencies, - distribution => $self->distribution, + abstract => MetaCPAN::Util::strip_pod( $meta->abstract ), + archive => $self->filename, + author => $self->author, + checksum_md5 => $self->archive->file_digest_md5, + checksum_sha256 => $self->archive->file_digest_sha256, + date => $self->date . q{}, + dependency => $dependencies, + distribution => $self->distribution, # CPAN::Meta->license *must* be called in list context # (and *may* return multiple strings). diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 5f00007b6..bd9005f67 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -254,6 +254,25 @@ sub get_files { return { files => [ map { $_->{_source} } @{ $ret->{hits}{hits} } ] }; } +sub get_checksums { + my ( $self, $release ) = @_; + + my $query = +{ query => { term => { name => $release } } }; + + my $ret = $self->es->search( + index => $self->index_name, + type => 'release', + body => { + query => $query, + size => 1, + _source => [qw< checksum_md5 checksum_sha256 >], + } + ); + + return {} unless @{ $ret->{hits}{hits} }; + return $ret->{hits}{hits}[0]{_source}; +} + sub _activity_filters { my ( $self, $params, $start ) = @_; my ( $author, $distribution, $module, $new_dists ) diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm index 2467d3dfe..95b0440f9 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm @@ -40,6 +40,16 @@ sub mapping { "index" : "not_analyzed", "type" : "string" }, + "checksum_md5" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "checksum_sha256" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, "date" : { "format" : "strict_date_optional_time||epoch_millis", "type" : "date" diff --git a/t/server/controller/download_url.t b/t/server/controller/download_url.t index dbac91408..3e17b18cb 100644 --- a/t/server/controller/download_url.t +++ b/t/server/controller/download_url.t @@ -14,7 +14,12 @@ my $app = MetaCPAN::Server->new->to_app(); my $test = Plack::Test->create($app); my @tests = ( - [ 'no parameters', '/download_url/Moose', 'latest', '0.02' ], + [ + 'no parameters', + '/download_url/Moose', + 'latest', + '0.02', + ], [ 'version == (1)', '/download_url/Moose?version===0.01', 'cpan', '0.01' @@ -42,7 +47,9 @@ my @tests = ( [ 'version >=', '/download_url/Moose?version=>=0.01', 'latest', '0.02' ], [ 'range >, <', '/download_url/Try::Tiny?version=>0.21,<0.27', - 'cpan', '0.24' + 'cpan', '0.24', + '1a12a51cfeb7e2c301e4ae093c7ecdfb', + '9b7a1af24c0256973d175369ebbdc25ec01e2452a97f2d3ab61481c826f38d81', ], [ 'range >, <, !', @@ -62,7 +69,8 @@ my @tests = ( ); for (@tests) { - my ( $title, $url, $status, $version ) = @$_; + my ( $title, $url, $status, $version, $checksum_md5, $checksum_sha256 ) + = @$_; subtest $title => sub { my $res = $test->request( GET $url ); @@ -88,6 +96,15 @@ for (@tests) { ok( is_hashref($content), 'content is a JSON object' ); is( $content->{status}, $status, "correct status ($status)" ); is( $content->{version}, $version, "correct version ($version)" ); + if ($checksum_md5) { + is( $content->{checksum_md5}, + $checksum_md5, "correct checksum_md5 ($checksum_md5)" ); + } + if ($checksum_sha256) { + is( $content->{checksum_sha256}, + $checksum_sha256, + "correct checksum_sha256 ($checksum_sha256)" ); + } }; } From 9fa56d74d20878a9b616f2f72a2f4ea0ea8491c9 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 6 Dec 2019 13:48:28 -0500 Subject: [PATCH 020/725] Update tidying deps --- cpanfile | 6 +-- cpanfile.snapshot | 114 ++++++++++++++++++++++++---------------------- 2 files changed, 62 insertions(+), 58 deletions(-) diff --git a/cpanfile b/cpanfile index cb7bbc367..763486a16 100644 --- a/cpanfile +++ b/cpanfile @@ -186,7 +186,7 @@ requires 'warnings'; test_requires 'App::Prove'; test_requires 'CPAN::Faker', '0.010'; -test_requires 'Code::TidyAll', '0.47'; +test_requires 'Code::TidyAll', '0.74'; test_requires 'Code::TidyAll::Plugin::UniqueLines'; test_requires 'Devel::Confess'; test_requires 'File::Copy'; @@ -195,7 +195,7 @@ test_requires 'LWP::ConsoleLogger::Easy'; test_requires 'MetaCPAN::Client', '2.017000'; test_requires 'Module::Faker', '0.015'; test_requires 'Module::Faker::Dist', '0.010'; -test_requires 'Perl::Tidy', '20181120'; +test_requires 'Perl::Tidy', '20191203'; test_requires 'Plack::Test::Agent'; test_requires 'Test::Code::TidyAll'; test_requires 'Test::More', '0.99'; @@ -205,6 +205,6 @@ test_requires 'Test::Perl::Critic'; test_requires 'Test::RequiresInternet'; test_requires 'Test::Routine', '0.012'; test_requires 'Test::Routine::Util', '0'; -test_requires 'Test::Vars'; +test_requires 'Test::Vars', '0.014'; author_requires 'Plack::Middleware::Rewrite'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b21112b48..557231c5e 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1102,40 +1102,44 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Code-TidyAll-0.69 - pathname: D/DR/DROLSKY/Code-TidyAll-0.69.tar.gz - provides: - Code::TidyAll 0.69 - Code::TidyAll::Cache 0.69 - Code::TidyAll::CacheModel 0.69 - Code::TidyAll::CacheModel::Shared 0.69 - Code::TidyAll::Config::INI::Reader 0.69 - Code::TidyAll::Git::Precommit 0.69 - Code::TidyAll::Git::Prereceive 0.69 - Code::TidyAll::Git::Util 0.69 - Code::TidyAll::Plugin 0.69 - Code::TidyAll::Plugin::CSSUnminifier 0.69 - Code::TidyAll::Plugin::JSBeautify 0.69 - Code::TidyAll::Plugin::JSHint 0.69 - Code::TidyAll::Plugin::JSLint 0.69 - Code::TidyAll::Plugin::JSON 0.69 - Code::TidyAll::Plugin::MasonTidy 0.69 - Code::TidyAll::Plugin::PHPCodeSniffer 0.69 - Code::TidyAll::Plugin::PerlCritic 0.69 - Code::TidyAll::Plugin::PerlTidy 0.69 - Code::TidyAll::Plugin::PerlTidySweet 0.69 - Code::TidyAll::Plugin::PodChecker 0.69 - Code::TidyAll::Plugin::PodSpell 0.69 - Code::TidyAll::Plugin::PodTidy 0.69 - Code::TidyAll::Plugin::SortLines 0.69 - Code::TidyAll::Result 0.69 - Code::TidyAll::Role::HasIgnore 0.69 - Code::TidyAll::Role::RunsCommand 0.69 - Code::TidyAll::Role::Tempdir 0.69 - Code::TidyAll::SVN::Precommit 0.69 - Code::TidyAll::SVN::Util 0.69 - Code::TidyAll::Util::Zglob 0.69 - Test::Code::TidyAll 0.69 + Code-TidyAll-0.74 + pathname: D/DR/DROLSKY/Code-TidyAll-0.74.tar.gz + provides: + Code::TidyAll 0.74 + Code::TidyAll::Cache 0.74 + Code::TidyAll::CacheModel 0.74 + Code::TidyAll::CacheModel::Shared 0.74 + Code::TidyAll::Config::INI::Reader 0.74 + Code::TidyAll::Git::Precommit 0.74 + Code::TidyAll::Git::Prereceive 0.74 + Code::TidyAll::Git::Util 0.74 + Code::TidyAll::Plugin 0.74 + Code::TidyAll::Plugin::CSSUnminifier 0.74 + Code::TidyAll::Plugin::GenericTransformer 0.74 + Code::TidyAll::Plugin::GenericValidator 0.74 + Code::TidyAll::Plugin::JSBeautify 0.74 + Code::TidyAll::Plugin::JSHint 0.74 + Code::TidyAll::Plugin::JSLint 0.74 + Code::TidyAll::Plugin::JSON 0.74 + Code::TidyAll::Plugin::MasonTidy 0.74 + Code::TidyAll::Plugin::PHPCodeSniffer 0.74 + Code::TidyAll::Plugin::PerlCritic 0.74 + Code::TidyAll::Plugin::PerlTidy 0.74 + Code::TidyAll::Plugin::PerlTidySweet 0.74 + Code::TidyAll::Plugin::PodChecker 0.74 + Code::TidyAll::Plugin::PodSpell 0.74 + Code::TidyAll::Plugin::PodTidy 0.74 + Code::TidyAll::Plugin::SortLines 0.74 + Code::TidyAll::Result 0.74 + Code::TidyAll::Role::GenericExecutable 0.74 + Code::TidyAll::Role::HasIgnore 0.74 + Code::TidyAll::Role::RunsCommand 0.74 + Code::TidyAll::Role::Tempdir 0.74 + Code::TidyAll::SVN::Precommit 0.74 + Code::TidyAll::SVN::Util 0.74 + Code::TidyAll::Util::Zglob 0.74 + Code::TidyAll::Zglob 0.74 + Test::Code::TidyAll 0.74 requirements: Capture::Tiny 0 Config::INI::Reader 0 @@ -7012,27 +7016,27 @@ DISTRIBUTIONS strict 0 version 0.77 warnings 0 - Perl-Tidy-20181120 - pathname: S/SH/SHANCOCK/Perl-Tidy-20181120.tar.gz - provides: - Perl::Tidy 20181120 - Perl::Tidy::Debugger 20181120 - Perl::Tidy::DevNull 20181120 - Perl::Tidy::Diagnostics 20181120 - Perl::Tidy::FileWriter 20181120 - Perl::Tidy::Formatter 20181120 - Perl::Tidy::HtmlWriter 20181120 - Perl::Tidy::IOScalar 20181120 - Perl::Tidy::IOScalarArray 20181120 - Perl::Tidy::IndentationItem 20181120 - Perl::Tidy::LineBuffer 20181120 - Perl::Tidy::LineSink 20181120 - Perl::Tidy::LineSource 20181120 - Perl::Tidy::Logger 20181120 - Perl::Tidy::Tokenizer 20181120 - Perl::Tidy::VerticalAligner 20181120 - Perl::Tidy::VerticalAligner::Alignment 20181120 - Perl::Tidy::VerticalAligner::Line 20181120 + Perl-Tidy-20191203 + pathname: S/SH/SHANCOCK/Perl-Tidy-20191203.tar.gz + provides: + Perl::Tidy 20191203 + Perl::Tidy::Debugger 20191203 + Perl::Tidy::DevNull 20191203 + Perl::Tidy::Diagnostics 20191203 + Perl::Tidy::FileWriter 20191203 + Perl::Tidy::Formatter 20191203 + Perl::Tidy::HtmlWriter 20191203 + Perl::Tidy::IOScalar 20191203 + Perl::Tidy::IOScalarArray 20191203 + Perl::Tidy::IndentationItem 20191203 + Perl::Tidy::LineBuffer 20191203 + Perl::Tidy::LineSink 20191203 + Perl::Tidy::LineSource 20191203 + Perl::Tidy::Logger 20191203 + Perl::Tidy::Tokenizer 20191203 + Perl::Tidy::VerticalAligner 20191203 + Perl::Tidy::VerticalAligner::Alignment 20191203 + Perl::Tidy::VerticalAligner::Line 20191203 requirements: ExtUtils::MakeMaker 0 PerlIO-gzip-0.20 From 5fc572a3f690d5c73f12792e09aa65346b66d2dd Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 6 Dec 2019 13:49:46 -0500 Subject: [PATCH 021/725] Tidy --- lib/MetaCPAN/Document/File/Set.pm | 2 +- lib/MetaCPAN/Query/File.pm | 2 +- lib/MetaCPAN/Query/Release.pm | 4 ++-- lib/MetaCPAN/Script/Author.pm | 10 +++++----- lib/MetaCPAN/Script/Backup.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 4 ++-- lib/MetaCPAN/Script/Mapping.pm | 2 +- lib/MetaCPAN/Script/Mirrors.pm | 2 +- lib/MetaCPAN/Script/Snapshot.pm | 2 +- lib/MetaCPAN/Script/Suggest.pm | 2 +- lib/MetaCPAN/Script/Tickets.pm | 2 +- lib/MetaCPAN/Server/Controller.pm | 4 ++-- t/document/module.t | 2 +- t/release/prefer-meta-json.t | 4 ++-- t/server/controller/download_url.t | 14 ++++++-------- 15 files changed, 28 insertions(+), 30 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index 37f7ab79a..fc259fb59 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -256,7 +256,7 @@ sub find_download_url { # exclude backpan if dev, and # require released modules if neither dev nor explicit version my @filters - = $dev ? { not => { term => { status => 'backpan' } } } + = $dev ? { not => { term => { status => 'backpan' } } } : !$explicit_version ? { term => { maturity => 'released' } } : (); diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 62b4039ee..0752b2135 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -173,7 +173,7 @@ sub interesting_files { } }, map { - { prefix => { 'name' => $_ } }, + { prefix => { 'name' => $_ } }, { prefix => { 'path' => $_ } }, # With "prefix" we don't need the plural "s". diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index bd9005f67..25c0888d0 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -752,9 +752,9 @@ sub _get_provided_modules { return unless $provided_modules->{hits}{total}; return [ - map { $_->{name} } + map { $_->{name} } grep { $_->{indexed} && $_->{authorized} } - map { @{ $_->{_source}{module} } } + map { @{ $_->{_source}{module} } } @{ $provided_modules->{hits}{hits} } ]; } diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index e81a69b22..2f1b363e0 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -73,7 +73,7 @@ sub index_authors { while ( my ( $pauseid, $data ) = each %$authors ) { my ( $name, $email, $homepage, $asciiname ) = ( @$data{qw(fullname email homepage asciiname)} ); - $name = undef if ( ref $name ); + $name = undef if ( ref $name ); $asciiname = q{} unless defined $asciiname; $email = lc($pauseid) . '@cpan.org' unless ( $email && Email::Valid->address($email) ); @@ -88,7 +88,7 @@ sub index_authors { asciiname => ref $asciiname ? undef : $asciiname, email => $email, website => $homepage, - map { $_ => $conf->{$_} } + map { $_ => $conf->{$_} } grep { defined $conf->{$_} } keys %$conf }; $put->{website} = [ $put->{website} ] @@ -96,8 +96,8 @@ sub index_authors { $put->{website} = [ # normalize www.homepage.com to http://www.homepage.com - map { $_->scheme ? $_->as_string : 'http://' . $_->as_string } - map { URI->new($_)->canonical } + map { $_->scheme ? $_->as_string : 'http://' . $_->as_string } + map { URI->new($_)->canonical } grep {$_} @{ $put->{website} } ]; @@ -163,7 +163,7 @@ sub author_config { # Get the most recent version my ($file) = sort { $dir->file($b)->stat->mtime <=> $dir->file($a)->stat->mtime } - grep {m/author-.*?\.json/} readdir($dh); + grep {m/author-.*?\.json/} readdir($dh); return $fallback unless ($file); $file = $dir->file($file); return $fallback if !-e $file; diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 446c6da0c..980c5be07 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -206,7 +206,7 @@ sub run_purge { if ( $mtime->clone->truncate( to => 'week' ) != $mtime->clone->truncate( to => 'day' ) ) { - log_info {"Removing old backup $file"}; + log_info {"Removing old backup $file"}; return log_info {'Not (dry run)'} if ( $self->dry_run ); $file->remove; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 4fcec8ff8..44e7d6561 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -87,8 +87,8 @@ sub run { my @module_filters = { term => { 'module.indexed' => 1 } }; push @module_filters, @filter - ? { terms => { "module.name" => \@filter } } - : { exists => { field => "module.name" } }; + ? { terms => { "module.name" => \@filter } } + : { exists => { field => "module.name" } }; # This query will be used to produce a (scrolled) list of # 'file' type records where the module.name matches the diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 65e819f45..d52d27b1c 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -273,7 +273,7 @@ sub copy_type { # else ... do copy by monthly slices - my $dt = DateTime->new( year => 1994, month => 1 ); + my $dt = DateTime->new( year => 1994, month => 1 ); my $end_time = DateTime->now()->add( months => 1 ); while ( $dt < $end_time ) { diff --git a/lib/MetaCPAN/Script/Mirrors.pm b/lib/MetaCPAN/Script/Mirrors.pm index 238635e2a..d17e9b310 100644 --- a/lib/MetaCPAN/Script/Mirrors.pm +++ b/lib/MetaCPAN/Script/Mirrors.pm @@ -34,7 +34,7 @@ sub index_mirrors { Dlog_trace {"Indexing $_"} $mirror; $type->put( { - map { $_ => $mirror->{$_} } + map { $_ => $mirror->{$_} } grep { defined $mirror->{$_} } keys %$mirror } ); diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index a6de9c363..d4137a4ff 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -152,7 +152,7 @@ sub run_snapshot { my $snap_name = $self->snap_stub . '_' . $date; my $indices = join ',', @{ $self->indices }; - my $data = { + my $data = { "ignore_unavailable" => 0, "include_global_state" => 1, "indices" => $indices, diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index d4065c576..faa03edc7 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -29,7 +29,7 @@ sub run { my $self = shift; if ( $self->all ) { - my $dt = DateTime->new( year => 1994, month => 1 ); + my $dt = DateTime->new( year => 1994, month => 1 ); my $end_time = DateTime->now->add( months => 1 ); while ( $dt < $end_time ) { diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 875b48ef1..c18b9e0da 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -218,7 +218,7 @@ sub parse_tsv { source => $self->rt_dist_url(http://github.com/$row-%3E%7Bdist%7D), active => $row->{active}, closed => $row->{inactive}, - map { $_ => $row->{$_} + 0 } + map { $_ => $row->{$_} + 0 } grep { not /^(dist|active|inactive)$/ } keys %$row, }; diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 2d65d1a5d..2bb5c4b01 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -152,8 +152,8 @@ sub join : ActionClass('Deserialize') { while ( my ( $join, $config ) = each %$joins ) { my $has_many = ref $config->{type}; - my ($type) = $has_many ? @{ $config->{type} } : $config->{type}; - my $cself = $config->{self} || $join; + my ($type) = $has_many ? @{ $config->{type} } : $config->{type}; + my $cself = $config->{self} || $join; next unless ( grep { $_ eq $join } @req_joins ); my $data = $is_get diff --git a/t/document/module.t b/t/document/module.t index 8e90a9b49..ed6caabd4 100644 --- a/t/document/module.t +++ b/t/document/module.t @@ -101,7 +101,7 @@ subtest set_associated_pod => sub { { package PodFile; ## no critic - sub new { bless { path => $_[1] }, $_[0]; } + sub new { bless { path => $_[1] }, $_[0]; } sub path { $_[0]->{path} } sub name { $_[0]->{name} ||= ( $_[0]->{path} =~ m{([^\/]+)$} )[0] } sub full_path { '.../' . $_[0]->{path} } diff --git a/t/release/prefer-meta-json.t b/t/release/prefer-meta-json.t index 9190ca7d1..901e56b1b 100644 --- a/t/release/prefer-meta-json.t +++ b/t/release/prefer-meta-json.t @@ -42,8 +42,8 @@ is( $release->metadata->{'meta-spec'}{version}, 2, 'meta_spec version is 2' ); is( scalar @modules, 2, 'file contains two modules' ); - is( $modules[0]->name, 'Prefer::Meta::JSON', 'module name ok' ); - is( $modules[0]->indexed, 1, 'main module indexed' ); + is( $modules[0]->name, 'Prefer::Meta::JSON', 'module name ok' ); + is( $modules[0]->indexed, 1, 'main module indexed' ); is( $modules[1]->name, 'Prefer::Meta::JSON::Gremlin', 'module name ok' ); is( $modules[1]->indexed, 0, 'module not indexed' ); diff --git a/t/server/controller/download_url.t b/t/server/controller/download_url.t index 3e17b18cb..7cd03194b 100644 --- a/t/server/controller/download_url.t +++ b/t/server/controller/download_url.t @@ -14,12 +14,7 @@ my $app = MetaCPAN::Server->new->to_app(); my $test = Plack::Test->create($app); my @tests = ( - [ - 'no parameters', - '/download_url/Moose', - 'latest', - '0.02', - ], + [ 'no parameters', '/download_url/Moose', 'latest', '0.02', ], [ 'version == (1)', '/download_url/Moose?version===0.01', 'cpan', '0.01' @@ -46,8 +41,10 @@ my @tests = ( ], [ 'version >=', '/download_url/Moose?version=>=0.01', 'latest', '0.02' ], [ - 'range >, <', '/download_url/Try::Tiny?version=>0.21,<0.27', - 'cpan', '0.24', + 'range >, <', + '/download_url/Try::Tiny?version=>0.21,<0.27', + 'cpan', + '0.24', '1a12a51cfeb7e2c301e4ae093c7ecdfb', '9b7a1af24c0256973d175369ebbdc25ec01e2452a97f2d3ab61481c826f38d81', ], @@ -96,6 +93,7 @@ for (@tests) { ok( is_hashref($content), 'content is a JSON object' ); is( $content->{status}, $status, "correct status ($status)" ); is( $content->{version}, $version, "correct version ($version)" ); + if ($checksum_md5) { is( $content->{checksum_md5}, $checksum_md5, "correct checksum_md5 ($checksum_md5)" ); From 8542b643b788e83f11fcd315e068c5e01c1bf568 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Fri, 6 Dec 2019 16:22:33 -0500 Subject: [PATCH 022/725] Added checksum backfilling script --- lib/MetaCPAN/Script/Checksum.pm | 120 ++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 lib/MetaCPAN/Script/Checksum.pm diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm new file mode 100644 index 000000000..8c0deba65 --- /dev/null +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -0,0 +1,120 @@ +package MetaCPAN::Script::Checksum; + +use Moose; + +use Log::Contextual qw( :log ); +use MetaCPAN::Types qw( Bool Int ); + +use Digest::file qw( digest_file_hex ); + +with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; + +=head1 SYNOPSIS + +Fill checksums for releases + +=cut + +has limit => ( + is => 'ro', + isa => Int, + default => 1000, +); + +has dry_run => ( + is => 'ro', + isa => Bool, + default => 1, +); + +sub run { + my $self = shift; + + my $bulk; + if ( !$self->dry_run ) { + $bulk = $self->es->bulk_helper( + index => $self->index->name, + type => 'release', + ); + } else { + log_warn { "--- DRY-RUN ---" }; + } + + log_info { "Searching for releases missing checksums" }; + + my $scroll = $self->es->scroll_helper( + index => $self->index->name, + type => 'release', + scroll => '10m', + body => { + query => { + not => { + exists => { + field => "checksum_md5" + } + } + } + }, + fields => [qw( id name download_url )], + ); + + log_warn { "Found " . $scroll->total . " releases" }; + log_warn { "Limit is " . $self->limit }; + + my $count = 0; + + while ( my $p = $scroll->next ) { + if ( $count++ == $self->limit ) { + log_info { "Max number of changes reached." }; + last; + } + + log_info { "Adding checksums for " . $p->{fields}{name}->[0] }; + + if ( my $download_url = $p->{fields}{download_url} ) { + my $file = "/CPAN/authors" . $p->{fields}{download_url}->[0] =~ s/^.*authors//r; + my $checksum_md5 = digest_file_hex( $file, 'MD5' ); + my $checksum_sha256 = digest_file_hex( $file, 'SHA-256' ); + + if ( $self->dry_run ) { + log_info { "--- MD5: " . $checksum_md5 } + log_info { "--- SHA256: " . $checksum_sha256 } + } else { + $bulk->update({ + id => $p->{_id}, + doc => { checksum_md5 => $checksum_md5, checksum_sha256 => $checksum_sha256 }, + doc_as_upsert => 1, + }); + } + + } else { + log_info { $p->{fields}{name}->[0] . " is missing a download_url"}; + } + } + + if ( !$self->dry_run ) { + $bulk->flush; + } + + log_info {'Finished adding checksums'}; +} + + +__PACKAGE__->meta->make_immutable; +1; + +=pod + +=head1 SYNOPSIS + + # bin/metacpan checksum --[no-]dry_run --limit X + +=head1 DESCRIPTION + +Backfill checksums for releases + +=head2 dry_run + +Don't update - just show what would have been updated + +=cut From 328714b4c9ebc08a9a417c310846f64c9e8fd6f9 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 6 Dec 2019 22:04:59 -0500 Subject: [PATCH 023/725] Tidy lib/MetaCPAN/Script/Checksum.pm --- lib/MetaCPAN/Script/Checksum.pm | 52 ++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 8c0deba65..6595debeb 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -36,28 +36,29 @@ sub run { index => $self->index->name, type => 'release', ); - } else { - log_warn { "--- DRY-RUN ---" }; + } + else { + log_warn {"--- DRY-RUN ---"}; } - log_info { "Searching for releases missing checksums" }; + log_info {"Searching for releases missing checksums"}; my $scroll = $self->es->scroll_helper( index => $self->index->name, type => 'release', scroll => '10m', - body => { - query => { + body => { + query => { not => { exists => { - field => "checksum_md5" + field => "checksum_md5" } - } - } + } + } }, fields => [qw( id name download_url )], ); - + log_warn { "Found " . $scroll->total . " releases" }; log_warn { "Limit is " . $self->limit }; @@ -65,30 +66,40 @@ sub run { while ( my $p = $scroll->next ) { if ( $count++ == $self->limit ) { - log_info { "Max number of changes reached." }; + log_info {"Max number of changes reached."}; last; } log_info { "Adding checksums for " . $p->{fields}{name}->[0] }; if ( my $download_url = $p->{fields}{download_url} ) { - my $file = "/CPAN/authors" . $p->{fields}{download_url}->[0] =~ s/^.*authors//r; - my $checksum_md5 = digest_file_hex( $file, 'MD5' ); + my $file = "/CPAN/authors" . $p->{fields}{download_url}->[0] + =~ s/^.*authors//r; + my $checksum_md5 = digest_file_hex( $file, 'MD5' ); my $checksum_sha256 = digest_file_hex( $file, 'SHA-256' ); if ( $self->dry_run ) { log_info { "--- MD5: " . $checksum_md5 } log_info { "--- SHA256: " . $checksum_sha256 } - } else { - $bulk->update({ - id => $p->{_id}, - doc => { checksum_md5 => $checksum_md5, checksum_sha256 => $checksum_sha256 }, - doc_as_upsert => 1, - }); + } + else { + $bulk->update( + { + id => $p->{_id}, + doc => { + checksum_md5 => $checksum_md5, + checksum_sha256 => $checksum_sha256 + }, + doc_as_upsert => 1, + } + ); } - } else { - log_info { $p->{fields}{name}->[0] . " is missing a download_url"}; + } + else { + log_info { + $p->{fields}{name}->[0] . " is missing a download_url" + }; } } @@ -99,7 +110,6 @@ sub run { log_info {'Finished adding checksums'}; } - __PACKAGE__->meta->make_immutable; 1; From 546545fbe4034f9a3bc030339852cc0510703a31 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sat, 7 Dec 2019 11:25:56 -0500 Subject: [PATCH 024/725] Checksum: fix CPAN directory path for production --- lib/MetaCPAN/Script/Checksum.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 6595debeb..d106c9572 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -11,7 +11,7 @@ with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; =head1 SYNOPSIS -Fill checksums for releases +Fill checksums for releases =cut @@ -73,7 +73,8 @@ sub run { log_info { "Adding checksums for " . $p->{fields}{name}->[0] }; if ( my $download_url = $p->{fields}{download_url} ) { - my $file = "/CPAN/authors" . $p->{fields}{download_url}->[0] + my $file + = $self->cpan . "/authors" . $p->{fields}{download_url}->[0] =~ s/^.*authors//r; my $checksum_md5 = digest_file_hex( $file, 'MD5' ); my $checksum_sha256 = digest_file_hex( $file, 'SHA-256' ); @@ -117,7 +118,7 @@ __PACKAGE__->meta->make_immutable; =head1 SYNOPSIS - # bin/metacpan checksum --[no-]dry_run --limit X + # bin/metacpan checksum --[no-]dry_run --limit X =head1 DESCRIPTION From b12679efb55dcc95c296c1812f60d50e83645f61 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:07:52 -0500 Subject: [PATCH 025/725] Update Docker to address linter's suggestions --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e43df46f..23e19ba49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,9 @@ WORKDIR /metacpan-api # size of the images. RUN mkdir /CPAN \ && apt-get update \ - && apt-get install -y rsync \ + && apt-get install -y --no-install-recommends rsync \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ && cpm install --global --without-test \ && rm -fr /root/.cpanm /root/.perl-cpm /var/cache/apt/lists/* /tmp/* @@ -19,4 +21,4 @@ VOLUME /CPAN EXPOSE 5000 -CMD /wait-for-it.sh ${PGDB} -- ${API_SERVER} ./bin/api.pl +CMD [ "/wait-for-it.sh", "${PGDB}", "--", "${API_SERVER}", "./bin/api.pl" ] From 77cbc4cd6f611c9dc83b9f925488994c4ef4e926 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:13:11 -0500 Subject: [PATCH 026/725] Install test modules in Docker image as well We'll never run tests on production, but this allows us to have a dev environment which matches production. That will be better for debugging, even if it makes for slightly larger images. --- Dockerfile | 2 +- cpanfile | 48 +++++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 23e19ba49..14a8df2c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir /CPAN \ && apt-get install -y --no-install-recommends rsync \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ - && cpm install --global --without-test \ + && cpm install --global \ && rm -fr /root/.cpanm /root/.perl-cpm /var/cache/apt/lists/* /tmp/* VOLUME /CPAN diff --git a/cpanfile b/cpanfile index 763486a16..3708e9fdc 100644 --- a/cpanfile +++ b/cpanfile @@ -184,27 +184,29 @@ requires 'utf8'; requires 'version', '0.9901'; requires 'warnings'; -test_requires 'App::Prove'; -test_requires 'CPAN::Faker', '0.010'; -test_requires 'Code::TidyAll', '0.74'; -test_requires 'Code::TidyAll::Plugin::UniqueLines'; -test_requires 'Devel::Confess'; -test_requires 'File::Copy'; -test_requires 'HTTP::Cookies'; -test_requires 'LWP::ConsoleLogger::Easy'; -test_requires 'MetaCPAN::Client', '2.017000'; -test_requires 'Module::Faker', '0.015'; -test_requires 'Module::Faker::Dist', '0.010'; -test_requires 'Perl::Tidy', '20191203'; -test_requires 'Plack::Test::Agent'; -test_requires 'Test::Code::TidyAll'; -test_requires 'Test::More', '0.99'; -test_requires 'Test::Most'; -test_requires 'Test::OpenID::Server', '0.03'; -test_requires 'Test::Perl::Critic'; -test_requires 'Test::RequiresInternet'; -test_requires 'Test::Routine', '0.012'; -test_requires 'Test::Routine::Util', '0'; -test_requires 'Test::Vars', '0.014'; +# test requirements +requires 'App::Prove'; +requires 'Code::TidyAll', '0.74'; +requires 'Code::TidyAll::Plugin::UniqueLines'; +requires 'CPAN::Faker', '0.010'; +requires 'Devel::Confess'; +requires 'File::Copy'; +requires 'HTTP::Cookies'; +requires 'LWP::ConsoleLogger::Easy'; +requires 'MetaCPAN::Client', '2.017000'; +requires 'Module::Faker', '0.015'; +requires 'Module::Faker::Dist', '0.010'; +requires 'Perl::Tidy', '20191203'; +requires 'Plack::Test::Agent'; +requires 'Test::Code::TidyAll'; +requires 'Test::More', '0.99'; +requires 'Test::Most'; +requires 'Test::OpenID::Server', '0.03'; +requires 'Test::Perl::Critic'; +requires 'Test::RequiresInternet'; +requires 'Test::Routine', '0.012'; +requires 'Test::Routine::Util', '0'; +requires 'Test::Vars', '0.014'; -author_requires 'Plack::Middleware::Rewrite'; +# author requirements +requires 'Plack::Middleware::Rewrite'; From 3cb84e914279663d6f54bf328b492ae84088448a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:14:20 -0500 Subject: [PATCH 027/725] Sort cpanfile deps --- cpanfile | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/cpanfile b/cpanfile index 3708e9fdc..3f8cdd789 100644 --- a/cpanfile +++ b/cpanfile @@ -4,12 +4,7 @@ requires 'Archive::Any', '0.0942'; requires 'Archive::Tar', '2.04'; requires 'Authen::SASL', '2.16'; requires 'BackPAN::Index', '0.42'; -requires 'CHI', '0.60'; -requires 'CPAN::DistnameInfo', '0.12'; -requires 'CPAN::Meta', '2.150005'; # Avoid issues with List::Util dep under carton install. -requires 'CPAN::Meta::Requirements', '2.140'; -requires 'CPAN::Meta::YAML', '0.018'; -requires 'CPAN::Repository::Perms'; +requires 'base'; requires 'Captcha::reCAPTCHA', '0.99'; requires 'Catalyst', '5.90103'; requires 'Catalyst::Action::RenderView'; @@ -29,23 +24,28 @@ requires 'Catalyst::View::JSON', '0.36'; requires 'CatalystX::Fastly::Role::Response', '0.06'; requires 'CatalystX::InjectComponent'; requires 'CatalystX::RoleApplicator'; +requires 'CHI', '0.60'; requires 'Config::General'; requires 'Config::ZOMG', '1.000000'; requires 'Const::Fast'; +requires 'CPAN::DistnameInfo', '0.12'; requires 'Cpanel::JSON::XS', '3.0115'; +requires 'CPAN::Meta', '2.150005'; # Avoid issues with List::Util dep under carton install. +requires 'CPAN::Meta::Requirements', '2.140'; +requires 'CPAN::Meta::YAML', '0.018'; +requires 'CPAN::Repository::Perms'; requires 'Cwd'; -requires 'DBD::SQLite', '1.50'; -requires 'DBI', '1.616'; requires 'Data::DPath'; requires 'Data::Dump'; requires 'Data::Dumper'; requires 'Data::Printer', '0.38'; requires 'DateTime', '1.24'; requires 'DateTime::Format::ISO8601'; +requires 'DBD::SQLite', '1.50'; +requires 'DBI', '1.616'; requires 'Devel::ArgNames'; requires 'Digest::MD5'; requires 'Digest::SHA'; -requires 'EV'; requires 'ElasticSearchX::Model', '2.0.1'; requires 'Email::Address'; requires 'Email::Sender::Simple'; @@ -54,26 +54,28 @@ requires 'Email::Valid', '1.198'; requires 'Encode'; requires 'Encoding::FixLatin'; requires 'Encoding::FixLatin::XS'; +requires 'EV'; requires 'Exporter'; requires 'ExtUtils::HasCompiler'; +requires 'feature'; requires 'File::Basename'; requires 'File::Find'; requires 'File::Find::Rule'; requires 'File::Find::Rule::Perl'; requires 'File::Spec'; requires 'File::Spec::Functions'; -requires 'File::Temp'; requires 'File::stat'; -requires 'Find::Lib'; +requires 'File::Temp'; requires 'FindBin'; +requires 'Find::Lib'; requires 'Gazelle'; requires 'Getopt::Long::Descriptive', '0.103'; requires 'Git::Helpers'; requires 'Gravatar::URL'; +requires 'Hash::Merge::Simple'; requires 'HTML::Entities'; requires 'HTML::TokeParser::Simple'; requires 'HTTP::Request::Common'; -requires 'Hash::Merge::Simple'; requires 'IO::All'; requires 'IO::Interactive'; requires 'IO::Prompt'; @@ -81,35 +83,35 @@ requires 'IO::String'; requires 'IO::Uncompress::Bunzip2'; requires 'IO::Zlib'; requires 'IPC::Run3'; -requires 'LWP::Protocol::https'; -requires 'LWP::UserAgent', '6.15'; -requires 'LWP::UserAgent::Paranoid'; requires 'List::AllUtils', '0.09'; requires 'List::MoreUtils', '0.413'; requires 'List::Util', '1.45'; requires 'Log::Any::Adapter'; requires 'Log::Any::Adapter::Log4perl'; requires 'Log::Contextual'; -requires 'Log::Log4perl'; -requires 'Log::Log4perl::Appender::ScreenColoredLevels'; requires 'Log::Dispatch'; requires 'Log::Dispatch::Syslog'; +requires 'Log::Log4perl'; +requires 'Log::Log4perl::Appender::ScreenColoredLevels'; requires 'Log::Log4perl::Catalyst'; requires 'Log::Log4perl::Layout::JSON'; -requires 'MIME::Base64', '3.15'; +requires 'LWP::Protocol::https'; +requires 'LWP::UserAgent', '6.15'; +requires 'LWP::UserAgent::Paranoid'; requires 'MetaCPAN::Moose'; requires 'MetaCPAN::Pod::XHTML'; requires 'MetaCPAN::Role', '0.06'; +requires 'MIME::Base64', '3.15'; requires 'Minion', '9.03'; requires 'Minion::Backend::SQLite'; requires 'Module::Load'; requires 'Module::Metadata', '1.000022'; requires 'Module::Pluggable'; requires 'Module::Runtime'; -requires 'Mojo::Pg', '4.08'; requires 'Mojolicious::Plugin::MountPSGI', '0.14'; requires 'Mojolicious::Plugin::OpenAPI'; requires 'Mojolicious::Plugin::Web::Auth', '0.17'; +requires 'Mojo::Pg', '4.08'; requires 'Moose', '2.1403'; requires 'Moose::Role'; requires 'Moose::Util'; @@ -130,29 +132,30 @@ requires 'MooseX::Types::Path::Class::MoreCoercions'; requires 'MooseX::Types::Structured'; requires 'MooseX::Types::URI'; requires 'Mozilla::CA'; +requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; requires 'Net::Fastly', '1.05'; requires 'Net::OpenID::Consumer'; requires 'Net::Twitter', '4.01010'; requires 'OrePAN2'; -requires 'PAUSE::Permissions'; requires 'Parse::CPAN::Packages::Fast', '0.09'; requires 'Parse::CSV', '2.04'; requires 'Parse::PMFile', '0.41'; requires 'Path::Class', '0.36'; requires 'Path::Class::File'; requires 'Path::Iterator::Rule', '1.011'; +requires 'PAUSE::Permissions'; requires 'PerlIO::gzip'; requires 'Pithub', '0.01033'; requires 'Plack', '1.0039'; requires 'Plack::App::Directory'; requires 'Plack::Handler::Twiggy'; -requires 'Plack::MIME'; requires 'Plack::Middleware::Header'; requires 'Plack::Middleware::ReverseProxy'; requires 'Plack::Middleware::Rewrite'; requires 'Plack::Middleware::ServerStatus::Lite'; requires 'Plack::Middleware::Session'; +requires 'Plack::MIME'; requires 'Plack::Session::Store'; requires 'Plack::Test'; requires 'Plack::Util::Accessor'; @@ -168,21 +171,18 @@ requires 'Regexp::Common::time'; requires 'Safe', '2.35'; # bug fixes (used by Parse::PMFile) requires 'Search::Elasticsearch', '== 2.03'; requires 'Starman'; +requires 'strict'; +requires 'strictures', '1'; requires 'Throwable::Error'; requires 'Time::Local'; requires 'Try::Tiny', '0.24'; requires 'URI', '1.71'; requires 'URI::Escape'; -requires 'XML::Simple'; -requires 'YAML::XS', '0.67'; # Mojolicious::Plugin::OpenAPI YAML loading -requires 'base'; -requires 'feature'; -requires 'namespace::autoclean'; -requires 'strict'; -requires 'strictures', '1'; requires 'utf8'; requires 'version', '0.9901'; requires 'warnings'; +requires 'XML::Simple'; +requires 'YAML::XS', '0.67'; # Mojolicious::Plugin::OpenAPI YAML loading # test requirements requires 'App::Prove'; From 1b18f7e6a6d8837ee4cc965bb2a4dade726ded58 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:17:04 -0500 Subject: [PATCH 028/725] Remove ENV PERL_MM_USE_DEFAULT=1 --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14a8df2c6..3d93a8418 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM metacpan/metacpan-base:latest -ENV PERL_MM_USE_DEFAULT=1 - COPY cpanfile cpanfile.snapshot /metacpan-api/ WORKDIR /metacpan-api From 92297c04f71d56cee68a974e9c7d00529e28fa50 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:20:10 -0500 Subject: [PATCH 029/725] Pin rsync version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3d93a8418..06620575e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /metacpan-api # size of the images. RUN mkdir /CPAN \ && apt-get update \ - && apt-get install -y --no-install-recommends rsync \ + && apt-get install -y --no-install-recommends rsync=3.1.3-6 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && cpm install --global \ From ef3f503041061e1d4807976cf97fcb29383e146a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:21:05 -0500 Subject: [PATCH 030/725] Remove Twiggy from cpanfile --- cpanfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cpanfile b/cpanfile index 3f8cdd789..363ff3267 100644 --- a/cpanfile +++ b/cpanfile @@ -149,7 +149,6 @@ requires 'PerlIO::gzip'; requires 'Pithub', '0.01033'; requires 'Plack', '1.0039'; requires 'Plack::App::Directory'; -requires 'Plack::Handler::Twiggy'; requires 'Plack::Middleware::Header'; requires 'Plack::Middleware::ReverseProxy'; requires 'Plack::Middleware::Rewrite'; From 0dac8b1aa978f75d354a342c2f245f08e1078c30 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:22:11 -0500 Subject: [PATCH 031/725] Remove Config::General from cpanfile --- cpanfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cpanfile b/cpanfile index 363ff3267..3f69ad641 100644 --- a/cpanfile +++ b/cpanfile @@ -25,7 +25,6 @@ requires 'CatalystX::Fastly::Role::Response', '0.06'; requires 'CatalystX::InjectComponent'; requires 'CatalystX::RoleApplicator'; requires 'CHI', '0.60'; -requires 'Config::General'; requires 'Config::ZOMG', '1.000000'; requires 'Const::Fast'; requires 'CPAN::DistnameInfo', '0.12'; From 21ee2326928e937014b2ae730057be4d05b55307 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:23:55 -0500 Subject: [PATCH 032/725] Remove pragmas from cpanfile --- cpanfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cpanfile b/cpanfile index 3f69ad641..f9bd84fb4 100644 --- a/cpanfile +++ b/cpanfile @@ -4,7 +4,6 @@ requires 'Archive::Any', '0.0942'; requires 'Archive::Tar', '2.04'; requires 'Authen::SASL', '2.16'; requires 'BackPAN::Index', '0.42'; -requires 'base'; requires 'Captcha::reCAPTCHA', '0.99'; requires 'Catalyst', '5.90103'; requires 'Catalyst::Action::RenderView'; @@ -169,16 +168,13 @@ requires 'Regexp::Common::time'; requires 'Safe', '2.35'; # bug fixes (used by Parse::PMFile) requires 'Search::Elasticsearch', '== 2.03'; requires 'Starman'; -requires 'strict'; requires 'strictures', '1'; requires 'Throwable::Error'; requires 'Time::Local'; requires 'Try::Tiny', '0.24'; requires 'URI', '1.71'; requires 'URI::Escape'; -requires 'utf8'; requires 'version', '0.9901'; -requires 'warnings'; requires 'XML::Simple'; requires 'YAML::XS', '0.67'; # Mojolicious::Plugin::OpenAPI YAML loading From d064c8e297ca5dc4a3d41636ed4bbf804b8ac91d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 7 Dec 2019 23:30:00 -0500 Subject: [PATCH 033/725] Remove Gazelle from cpanfile --- cpanfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cpanfile b/cpanfile index f9bd84fb4..2adc51830 100644 --- a/cpanfile +++ b/cpanfile @@ -66,7 +66,6 @@ requires 'File::stat'; requires 'File::Temp'; requires 'FindBin'; requires 'Find::Lib'; -requires 'Gazelle'; requires 'Getopt::Long::Descriptive', '0.103'; requires 'Git::Helpers'; requires 'Gravatar::URL'; From c1306be157c6f96e9261e7d7d8e872ccd009edb7 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Dec 2019 09:58:12 -0500 Subject: [PATCH 034/725] Add .hadolint.yaml --- .hadolint.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .hadolint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 000000000..b757c9278 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,4 @@ +--- +ignored: + # PDL3007 asks you to pin the FROM version explicitly to a release tag. + - DL3007 From 06e8b2f1978917cfd705ceaba2df22899d57404e Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 15 Nov 2017 17:31:47 -0500 Subject: [PATCH 035/725] Delete bin/get_fields.pl This was useful for the very first iteration of the API, which stored all of the author JSON config files in a single directory. --- bin/get_fields.pl | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 bin/get_fields.pl diff --git a/bin/get_fields.pl b/bin/get_fields.pl deleted file mode 100644 index b1a81b7c8..000000000 --- a/bin/get_fields.pl +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env perl -# PODNAME: get_fields.pl -use Data::Dumper; -use Cpanel::JSON::XS; -use File::Find::Rule; -use File::Basename; -use Path::Class; - -my $current_dir = dirname( __FILE__ ); -my $author_dir = Path::Class::Dir->new( $current_dir, '..', 'conf' ); -my @files = File::Find::Rule->file->name( '*.json' )->in( $author_dir ); - -my %fields; - -foreach my $file ( @files ) { - warn "Processing $file"; - my $hash; - - eval { - $hash = decode_json( do { local( @ARGV, $/ ) = $file; <> } ); - } or print "\terror in $file: $@"; - - while ( my ($author, $info) = each %{$hash} ) { - my @local_fields = keys %{$info}; - @fields{@local_fields} = @local_fields; - } -} - -print $_ for sort keys %fields; From 89a42da9293b875d836d3914aadd8fdd6d0cb164 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 16 Nov 2017 09:40:44 -0500 Subject: [PATCH 036/725] Misc cleanup --- t/testrules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/testrules.yml b/t/testrules.yml index 3534e9659..77d108c0c 100644 --- a/t/testrules.yml +++ b/t/testrules.yml @@ -12,4 +12,4 @@ seq: - seq: t/server/controller/user/favorite.t - par: - - t/**.t + - t/**.t From 3e41414338ec39bcedd08fe02b2aa1664a598ef0 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sun, 8 Dec 2019 10:10:49 -0500 Subject: [PATCH 037/725] Checksum script: allow unlimited + update doc --- lib/MetaCPAN/Script/Checksum.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index d106c9572..933ae4579 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -65,7 +65,7 @@ sub run { my $count = 0; while ( my $p = $scroll->next ) { - if ( $count++ == $self->limit ) { + if ( $self->limit >= 0 and $count++ >= $self->limit ) { log_info {"Max number of changes reached."}; last; } @@ -95,7 +95,6 @@ sub run { } ); } - } else { log_info { @@ -126,6 +125,14 @@ Backfill checksums for releases =head2 dry_run -Don't update - just show what would have been updated +Don't update - just show what would have been updated (default) + +=head2 no-dry_run + +Update records + +=head2 limit + +Max number of records to update. default=1000, for unlimited set to -1 =cut From 69051a357f6dc2ba45d7866dbd529defd3adf5a7 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Dec 2019 10:39:15 -0500 Subject: [PATCH 038/725] Use Path::Tiny in lib/MetaCPAN/Model/Release.pm --- lib/MetaCPAN/Model/Release.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index c74cacfba..d8d8fb982 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -15,7 +15,7 @@ use MetaCPAN::Types qw(ArrayRef AbsFile Str); use MetaCPAN::Util qw( fix_version); use Module::Metadata 1.000012 (); # Improved package detection. use MooseX::StrictConstructor; -use Path::Class (); +use Path::Tiny qw(path); use Parse::PMFile; use Try::Tiny qw( catch try ); @@ -337,10 +337,7 @@ sub _build_files { my $extract_dir = $self->extract; File::Find::find( sub { - my $child - = -d $File::Find::name - ? Path::Class::Dir->new($File::Find::name) - : Path::Class::File->new($File::Find::name); + my $child = path($File::Find::name); return if $self->_is_broken_file($File::Find::name); my $relative = $child->relative($extract_dir); my $stat = do { From c9d68484a112392d88a71ea3c7731436921c99e4 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Dec 2019 10:40:12 -0500 Subject: [PATCH 039/725] Use Path::Tiny in lib/MetaCPAN/Role/Logger.pm --- lib/MetaCPAN/Role/Logger.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index f9b1bdaa0..7916d8199 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -5,7 +5,7 @@ use Moose::Role; use MetaCPAN::Types qw(:all); use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; -use Path::Class (); +use Path::Tiny qw( path ); has level => ( is => 'ro', @@ -58,7 +58,7 @@ sub _build_logger { if ( $c->{class} =~ /Appender::File$/ && $c->{filename} ) { # Create the log file's parent directory if necessary. - Path::Class::File->new( $c->{filename} )->parent->mkpath; + path( $c->{filename} )->parent->mkpath; } my $app = Log::Log4perl::Appender->new( $c->{class}, %$c ); From 636f49156676b57075dfa462308fa1bd1506cd22 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Dec 2019 10:43:01 -0500 Subject: [PATCH 040/725] Use Path::Tiny in t/lib/MetaCPAN/TestHelpers.pm --- t/lib/MetaCPAN/TestHelpers.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index 1f804de7c..2f7ee6a4f 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -8,7 +8,7 @@ use Cpanel::JSON::XS; use FindBin; use Git::Helpers qw( checkout_root ); use MetaCPAN::Script::Runner; -use Path::Class qw( dir ); +use Path::Tiny qw( path ); use Test::More; use Test::Routine::Util; use Try::Tiny qw( catch try ); @@ -84,7 +84,7 @@ sub test_release { # If the first arg is a string, treat it like 'AUTHOR/Release-Name'. if ( !ref( $_[0] ) ) { - my ( $author, $name ) = split /\//, shift; + my ( $author, $name ) = split m{/}, shift; $release = { name => $name, author => $author }; } @@ -98,27 +98,27 @@ sub get_config { my $config = do { # build_config expects test to be t/*.t - local $FindBin::RealBin = dir( undef, checkout_root(), 't' ); + local $FindBin::RealBin = path( checkout_root(), 't' ); MetaCPAN::Script::Runner->build_config; }; return $config; } sub tmp_dir { - my $dir = dir( checkout_root(), 'var', 't', 'tmp' ); + my $dir = path( checkout_root(), 'var', 't', 'tmp' ); $dir->mkpath; return $dir; } sub fakecpan_dir { my $dir = tmp_dir(); - my $fakecpan = $dir->subdir('fakecpan'); + my $fakecpan = $dir->child('fakecpan'); $fakecpan->mkpath; return $fakecpan; } sub fakecpan_configs_dir { - my $source = dir( undef, checkout_root(), 'test-data', 'fakecpan' ); + my $source = path( checkout_root(), 'test-data', 'fakecpan' ); $source->mkpath; return $source; } From 2f1aeb13757d3419f71c2fe6513e1234b278be91 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Dec 2019 10:44:46 -0500 Subject: [PATCH 041/725] Use Path::Tiny in t/server/controller/pod.t --- t/server/controller/pod.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/server/controller/pod.t b/t/server/controller/pod.t index 2fc7aae9b..7fb948fca 100644 --- a/t/server/controller/pod.t +++ b/t/server/controller/pod.t @@ -6,16 +6,16 @@ use Cpanel::JSON::XS (); use HTTP::Request::Common qw( GET ); use MetaCPAN::Server (); use MetaCPAN::TestHelpers; -use Path::Class qw(dir); +use Path::Tiny qw(path); use Plack::Test; use Test::More; use Try::Tiny qw( catch try ); -my $dir = dir( MetaCPAN::Server->model('Source')->base_dir, +my $dir = path( MetaCPAN::Server->model('Source')->base_dir, 'DOY/Moose-0.02/Moose-0.02' ); $dir->mkpath; -my $file = $dir->file('binary.bin'); +my $file = $dir->child('binary.bin'); $file->openw->print( "\x00" x 10 ); my %tests = ( From 7e25022eddddf39ec94fa7286ee82642c60ead6b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 6 Dec 2019 23:23:19 -0500 Subject: [PATCH 042/725] Be explicit about config suffix in test env --- lib/MetaCPAN/API.pm | 5 +++-- lib/MetaCPAN/Role/HasConfig.pm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/API.pm b/lib/MetaCPAN/API.pm index c0589e269..09f08c0ca 100644 --- a/lib/MetaCPAN/API.pm +++ b/lib/MetaCPAN/API.pm @@ -39,8 +39,9 @@ sub startup { unless ( $self->config->{config_override} ) { $self->config( Config::ZOMG->new( - name => 'metacpan_server', - path => $self->home->to_string, + local_suffix => $ENV{HARNESS_ACTIVE} ? 'testing' : 'local', + name => 'metacpan_server', + path => $self->home->to_string, )->load ); } diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index e28699724..ddb898cd6 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -38,8 +38,9 @@ sub _zomg { my $path = shift; my $config = Config::ZOMG->new( - name => 'metacpan_server', - path => $path, + local_suffix => $ENV{HARNESS_ACTIVE} ? 'testing' : 'local', + name => 'metacpan_server', + path => $path, ); return $config->open; From f19499335ac00d5ed663895e4ccd565c54dd1a25 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Dec 2019 12:40:37 -0500 Subject: [PATCH 043/725] Switch some tests to Path::Tiny --- t/00_setup.t | 31 +++++++++++++++---------------- t/model/archive.t | 18 +++++++++--------- t/model/release/dependencies.t | 2 +- t/model/release/metadata.t | 2 +- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/t/00_setup.t b/t/00_setup.t index d6d925af5..b5c3fe673 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -4,7 +4,6 @@ use lib 't/lib'; use CPAN::Faker 0.010; use Devel::Confess; -use File::Copy qw( copy ); use MetaCPAN::Script::Tickets (); use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( @@ -31,7 +30,7 @@ BEGIN { # Ensure we're starting fresh my $tmp_dir = tmp_dir(); -$tmp_dir->rmtree; +$tmp_dir->remove_tree; $tmp_dir->mkpath; ok( $tmp_dir->stat, "$tmp_dir exists for testing" ); @@ -46,26 +45,26 @@ my $mod_faker = 'Module::Faker::Dist::WithPerl'; eval "require $mod_faker" or die $@; ## no critic (StringyEval) my $fakecpan_dir = fakecpan_dir(); -$fakecpan_dir->rmtree; +$fakecpan_dir->remove_tree; $fakecpan_dir = fakecpan_dir(); # recreate dir my $fakecpan_configs = fakecpan_configs_dir(); my $cpan = CPAN::Faker->new( { - source => $fakecpan_configs->subdir('configs')->stringify, + source => $fakecpan_configs->child('configs')->stringify, dest => $fakecpan_dir->stringify, dist_class => $mod_faker, } ); ok( $cpan->make_cpan, 'make fake cpan' ); -$fakecpan_dir->subdir('authors')->mkpath; -$fakecpan_dir->subdir('indices')->mkpath; +$fakecpan_dir->child('authors')->mkpath; +$fakecpan_dir->child('indices')->mkpath; # make some changes to 06perms.txt { - my $perms_file = $fakecpan_dir->subdir('modules')->file('06perms.txt'); + my $perms_file = $fakecpan_dir->child('modules')->child('06perms.txt'); my $perms = $perms_file->slurp; $perms =~ s/^Some,LOCAL,f$/Some,MO,f/m; my $fh = $perms_file->openw; @@ -84,16 +83,16 @@ local $Parse::PMFile::VERBOSE = $ENV{TEST_VERBOSE} ? 9 : 0; my $src_dir = $fakecpan_configs; -$src_dir->file('00whois.xml') - ->copy_to( $fakecpan_dir->file(qw(authors 00whois.xml)) ); +$src_dir->child('00whois.xml') + ->copy( $fakecpan_dir->child(qw(authors 00whois.xml)) ); -copy( $src_dir->file('author-1.0.json'), - $fakecpan_dir->file(qw(authors id M MO MO author-1.0.json)) ); +$src_dir->child('author-1.0.json') + ->copy( $fakecpan_dir->child(qw(authors id M MO MO author-1.0.json)) ); -copy( $src_dir->file('bugs.tsv'), $fakecpan_dir->file('bugs.tsv') ); +$src_dir->child('bugs.tsv')->copy( $fakecpan_dir->child('bugs.tsv') ); -copy( $src_dir->file('mirrors.json'), - $fakecpan_dir->file(qw(indices mirrors.json)) ); +$src_dir->child('mirrors.json') + ->copy( $fakecpan_dir->child(qw(indices mirrors.json)) ); $server->index_permissions; $server->index_packages; @@ -113,11 +112,11 @@ ok( %{$config}, rt_summary_url => uri( scheme => 'file', - path => $fakecpan_dir->file('bugs.tsv')->absolute->stringify, + path => $fakecpan_dir->child('bugs.tsv')->absolute->stringify, ), github_issues => uri( scheme => 'file', - path => $fakecpan_dir->subdir('github')->absolute->stringify + path => $fakecpan_dir->child('github')->absolute->stringify . '/%s/%s.json?per_page=100' ), } diff --git a/t/model/archive.t b/t/model/archive.t index cb8222c7e..ef6c6cfe9 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; +use Digest::SHA qw( sha1_hex ); use MetaCPAN::TestHelpers qw( fakecpan_dir ); use Test::Most; -use Digest::SHA qw( sha1_hex ); my $CLASS = 'MetaCPAN::Model::Archive'; require_ok $CLASS; @@ -35,8 +35,8 @@ subtest 'archive extraction' => sub { ); my $archive = $CLASS->new( - file => fakecpan_dir->file( - '/authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz') + file => fakecpan_dir->child( + '/authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz')->stringify ); ok !$archive->is_impolite; @@ -62,8 +62,8 @@ subtest 'temp cleanup' => sub { { my $archive = $CLASS->new( - file => fakecpan_dir->file( - 'authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz') + file => fakecpan_dir->child( + 'authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz')->stringify ); $tempdir = $archive->extract; @@ -79,8 +79,8 @@ subtest 'temp cleanup' => sub { subtest 'extract once' => sub { my $archive = $CLASS->new( - file => fakecpan_dir->file( - 'authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz') + file => fakecpan_dir->child( + 'authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz')->stringify ); is $archive->extract, $archive->extract; @@ -91,8 +91,8 @@ subtest 'set extract dir' => sub { { my $archive = $CLASS->new( - file => fakecpan_dir->file( - 'authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz'), + file => fakecpan_dir->child( + 'authors/id/L/LO/LOCAL/Some-1.00-TRIAL.tar.gz')->stringify, extract_dir => $temp->dirname ); diff --git a/t/model/release/dependencies.t b/t/model/release/dependencies.t index 83c2555b7..bf4437921 100644 --- a/t/model/release/dependencies.t +++ b/t/model/release/dependencies.t @@ -12,7 +12,7 @@ my $config = get_config(); subtest 'basic dependencies' => sub { my $file - = fakecpan_dir->file( + = fakecpan_dir->child( '/authors/id/M/MS/MSCHWERN/Prereqs-Basic-0.01.tar.gz'); my $release = MetaCPAN::Model::Release->new( diff --git a/t/model/release/metadata.t b/t/model/release/metadata.t index 1499d997c..cc14a1125 100644 --- a/t/model/release/metadata.t +++ b/t/model/release/metadata.t @@ -8,7 +8,7 @@ use MetaCPAN::Script::Runner; use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); use Test::More; -my $authordir = fakecpan_dir->file('authors/id/L/LO/LOCAL'); +my $authordir = fakecpan_dir->child('authors/id/L/LO/LOCAL'); my $config = get_config(); From e6b1b501f2c2b05fd7a84942c12fc22b5761ea14 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Wed, 18 Dec 2019 11:46:50 -0500 Subject: [PATCH 044/725] Skip indexing distributions in a Raku subdir --- lib/MetaCPAN/Script/Release.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index b7302b202..cef047065 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -118,10 +118,10 @@ my @skip_dists = ( qr{/ILYAZ/os2/[^/]+/perl_\w+\.zip\z}, qr{/ILYAZ/os2/perl[^/]+\.zip\z}, - # Strip off any files in a Perl6 folder + # Strip off any files in a Perl6 or Raku folder # e.g. http://www.cpan.org/authors/id/J/JD/JDV/Perl6/ # As here we are indexing perl5 only - qr{/Perl6/}, + qr{/(?:Perl6|Raku)/}, ); my ($SKIP_MATCH) = map qr/$_/, join '|', From 4b990e8a794884132a110b57323f3c9ff392f40b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 9 Mar 2020 12:12:43 -0400 Subject: [PATCH 045/725] Require latest versions of Config::Any and Config::General --- cpanfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpanfile b/cpanfile index 2adc51830..49ea012bf 100644 --- a/cpanfile +++ b/cpanfile @@ -24,6 +24,8 @@ requires 'CatalystX::Fastly::Role::Response', '0.06'; requires 'CatalystX::InjectComponent'; requires 'CatalystX::RoleApplicator'; requires 'CHI', '0.60'; +requires 'Config::Any', '0.32'; +requires 'Config::General', '2.63'; requires 'Config::ZOMG', '1.000000'; requires 'Const::Fast'; requires 'CPAN::DistnameInfo', '0.12'; From 31ac0f47186f8cc6c53f3a955843684142e445c4 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 12 Mar 2020 16:40:48 -0400 Subject: [PATCH 046/725] Update cpanfile.snapshot --- cpanfile.snapshot | 507 +--------------------------------------------- 1 file changed, 3 insertions(+), 504 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 557231c5e..a335329e6 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -23,55 +23,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 URI::Escape 0 - AnyEvent-7.14 - pathname: M/ML/MLEHMANN/AnyEvent-7.14.tar.gz - provides: - AE undef - AE::Log::COLLECT undef - AE::Log::FILTER undef - AE::Log::LOG undef - AnyEvent 7.14 - AnyEvent::Base 7.14 - AnyEvent::CondVar 7.14 - AnyEvent::CondVar::Base 7.14 - AnyEvent::DNS undef - AnyEvent::Debug undef - AnyEvent::Debug::Backtrace undef - AnyEvent::Debug::Wrap undef - AnyEvent::Debug::Wrapped undef - AnyEvent::Debug::shell undef - AnyEvent::Handle undef - AnyEvent::IO undef - AnyEvent::IO::IOAIO undef - AnyEvent::IO::Perl undef - AnyEvent::Impl::Cocoa undef - AnyEvent::Impl::EV undef - AnyEvent::Impl::Event undef - AnyEvent::Impl::EventLib undef - AnyEvent::Impl::FLTK undef - AnyEvent::Impl::Glib undef - AnyEvent::Impl::IOAsync undef - AnyEvent::Impl::Irssi undef - AnyEvent::Impl::POE undef - AnyEvent::Impl::Perl undef - AnyEvent::Impl::Qt undef - AnyEvent::Impl::Qt::Io undef - AnyEvent::Impl::Qt::Timer undef - AnyEvent::Impl::Tk undef - AnyEvent::Impl::UV undef - AnyEvent::Log undef - AnyEvent::Log::COLLECT undef - AnyEvent::Log::Ctx undef - AnyEvent::Log::FILTER undef - AnyEvent::Log::LOG undef - AnyEvent::Loop undef - AnyEvent::Socket undef - AnyEvent::Strict undef - AnyEvent::TLS undef - AnyEvent::Util undef - requirements: - Canary::Stability 0 - ExtUtils::MakeMaker 6.52 Apache-LogFormat-Compiler-0.35 pathname: K/KA/KAZEBURO/Apache-LogFormat-Compiler-0.35.tar.gz provides: @@ -331,7 +282,6 @@ DISTRIBUTIONS CGI::Simple::Standard 1.114 CGI::Simple::Util 1.114 requirements: - ExtUtils::MakeMaker 0 IO::Scalar 0 Test::More 0 CGI-Struct-1.21 @@ -436,58 +386,6 @@ DISTRIBUTIONS Text::Template 0 strict 0 warnings 0 - CPAN-Meta-2.150010 - pathname: D/DA/DAGOLDEN/CPAN-Meta-2.150010.tar.gz - provides: - CPAN::Meta 2.150010 - CPAN::Meta::Converter 2.150010 - CPAN::Meta::Feature 2.150010 - CPAN::Meta::History 2.150010 - CPAN::Meta::Merge 2.150010 - CPAN::Meta::Prereqs 2.150010 - CPAN::Meta::Spec 2.150010 - CPAN::Meta::Validator 2.150010 - Parse::CPAN::Meta 2.150010 - requirements: - CPAN::Meta::Requirements 2.121 - CPAN::Meta::YAML 0.011 - Carp 0 - Encode 0 - Exporter 0 - ExtUtils::MakeMaker 6.17 - File::Spec 0.80 - JSON::PP 2.27300 - Scalar::Util 0 - perl 5.008001 - strict 0 - version 0.88 - warnings 0 - CPAN-Meta-Requirements-2.140 - pathname: D/DA/DAGOLDEN/CPAN-Meta-Requirements-2.140.tar.gz - provides: - CPAN::Meta::Requirements 2.140 - requirements: - B 0 - Carp 0 - ExtUtils::MakeMaker 6.17 - perl 5.006 - strict 0 - version 0.88 - warnings 0 - CPAN-Meta-YAML-0.018 - pathname: D/DA/DAGOLDEN/CPAN-Meta-YAML-0.018.tar.gz - provides: - CPAN::Meta::YAML 0.018 - requirements: - B 0 - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 6.17 - Fcntl 0 - Scalar::Util 0 - perl 5.008001 - strict 0 - warnings 0 CPAN-Repository-0.010 pathname: O/OA/OALDERS/CPAN-Repository-0.010.tar.gz provides: @@ -835,7 +733,6 @@ DISTRIBUTIONS MooseX::Emulate::Class::Accessor::Fast 0.00903 MooseX::Getopt 0.48 MooseX::MethodAttributes::Role::AttrContainer::Inheritable 0.24 - MooseX::Role::WithOverloading 0.09 Path::Class 0.09 Plack 0.9991 Plack::Middleware::Conditional 0 @@ -1149,10 +1046,10 @@ DISTRIBUTIONS Digest::SHA 0 Exporter 0 ExtUtils::MakeMaker 0 + File::Basename 0 File::Find 0 File::Spec 0 File::Which 0 - File::Zglob 0 File::pushd 0 Getopt::Long 0 IPC::Run3 0 @@ -1180,6 +1077,7 @@ DISTRIBUTIONS Try::Tiny 0 base 0 constant 0 + perl 5.008008 strict 0 warnings 0 Code-TidyAll-Plugin-UniqueLines-0.000003 @@ -2527,9 +2425,8 @@ DISTRIBUTIONS MooseX::Types::Structured 0 Scalar::Util 0 Search::Elasticsearch 2.02 - Search::Elasticsearch::Bulk 0 - Search::Elasticsearch::Scroll 0 Sub::Exporter 0 + perl 5.006 strict 0 version 0 warnings 0 @@ -2820,51 +2717,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - ExtUtils-MakeMaker-7.30 - pathname: B/BI/BINGOS/ExtUtils-MakeMaker-7.30.tar.gz - provides: - ExtUtils::Command 7.30 - ExtUtils::Command::MM 7.30 - ExtUtils::Liblist 7.30 - ExtUtils::Liblist::Kid 7.30 - ExtUtils::MM 7.30 - ExtUtils::MM_AIX 7.30 - ExtUtils::MM_Any 7.30 - ExtUtils::MM_BeOS 7.30 - ExtUtils::MM_Cygwin 7.30 - ExtUtils::MM_DOS 7.30 - ExtUtils::MM_Darwin 7.30 - ExtUtils::MM_MacOS 7.30 - ExtUtils::MM_NW5 7.30 - ExtUtils::MM_OS2 7.30 - ExtUtils::MM_QNX 7.30 - ExtUtils::MM_UWIN 7.30 - ExtUtils::MM_Unix 7.30 - ExtUtils::MM_VMS 7.30 - ExtUtils::MM_VOS 7.30 - ExtUtils::MM_Win32 7.30 - ExtUtils::MM_Win95 7.30 - ExtUtils::MY 7.30 - ExtUtils::MakeMaker 7.30 - ExtUtils::MakeMaker::Config 7.30 - ExtUtils::MakeMaker::Locale 7.30 - ExtUtils::MakeMaker::_version 7.30 - ExtUtils::MakeMaker::charstar 7.30 - ExtUtils::MakeMaker::version 7.30 - ExtUtils::MakeMaker::version::regex 7.30 - ExtUtils::MakeMaker::version::vpp 7.30 - ExtUtils::Mkbootstrap 7.30 - ExtUtils::Mksymlists 7.30 - ExtUtils::testlib 7.30 - MM 7.30 - MY 7.30 - requirements: - Data::Dumper 0 - Encode 0 - File::Basename 0 - File::Spec 0.8 - Pod::Man 0 - perl 5.006 ExtUtils-MakeMaker-CPANfile-0.08 pathname: I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.08.tar.gz provides: @@ -3058,14 +2910,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.006 - File-Zglob-0.11 - pathname: T/TO/TOKUHIROM/File-Zglob-0.11.tar.gz - provides: - File::Zglob 0.11 - requirements: - ExtUtils::MakeMaker 6.59 - Test::More 0.96 - perl 5.008008 File-pushd-1.014 pathname: D/DA/DAGOLDEN/File-pushd-1.014.tar.gz provides: @@ -3096,21 +2940,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 File::Spec 0 Test::More 0 - Gazelle-0.46 - pathname: K/KA/KAZEBURO/Gazelle-0.46.tar.gz - provides: - Gazelle 0.46 - Plack::Handler::Gazelle 0.46 - requirements: - Devel::CheckCompiler 0.04 - Guard 0 - Module::Build 0.38 - Parallel::Prefork 0.18 - Plack 1.0037 - Server::Starter 0 - Stream::Buffered 0 - Try::Tiny 0 - perl 5.008001 Getopt-Long-Descriptive-0.104 pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.104.tar.gz provides: @@ -3172,47 +3001,6 @@ DISTRIBUTIONS strict 0 subs 0 warnings 0 - Graph-0.9704 - pathname: J/JH/JHI/Graph-0.9704.tar.gz - provides: - Graph 0.9704 - Graph::AdjacencyMap undef - Graph::AdjacencyMap::Heavy undef - Graph::AdjacencyMap::Light undef - Graph::AdjacencyMap::Vertex undef - Graph::AdjacencyMatrix undef - Graph::Attribute undef - Graph::BitMatrix undef - Graph::Directed undef - Graph::MSTHeapElem undef - Graph::Matrix undef - Graph::SPTHeapElem undef - Graph::TransitiveClosure undef - Graph::TransitiveClosure::Matrix undef - Graph::Traversal undef - Graph::Traversal::BFS undef - Graph::Traversal::DFS undef - Graph::Undirected undef - Graph::UnionFind undef - Heap071::Elem undef - Heap071::Fibonacci undef - requirements: - ExtUtils::MakeMaker 0 - List::Util 0 - Math::Complex 0 - Safe 0 - Scalar::Util 0 - Storable 2.05 - Test::More 0 - perl 5.006 - Graph-Centrality-Pagerank-1.05 - pathname: K/KU/KUBINA/Graph-Centrality-Pagerank-1.05.tar.gz - provides: - Graph::Centrality::Pagerank 1.05 - requirements: - Data::Dump 1.14 - ExtUtils::MakeMaker 0 - Graph 0.91 Gravatar-URL-1.07 pathname: M/MS/MSCHWERN/Gravatar-URL-1.07.tar.gz provides: @@ -3230,12 +3018,6 @@ DISTRIBUTIONS URI::Escape 0 parent 0 perl v5.6.0 - Guard-1.023 - pathname: M/ML/MLEHMANN/Guard-1.023.tar.gz - provides: - Guard 1.023 - requirements: - ExtUtils::MakeMaker 0 HTML-Form-6.03 pathname: G/GA/GAAS/HTML-Form-6.03.tar.gz provides: @@ -3534,22 +3316,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.36 Socket 1.94 Test::More 0 - HTTP-Tiny-0.070 - pathname: D/DA/DAGOLDEN/HTTP-Tiny-0.070.tar.gz - provides: - HTTP::Tiny 0.070 - requirements: - Carp 0 - ExtUtils::MakeMaker 6.17 - Fcntl 0 - IO::Socket 0 - MIME::Base64 0 - Socket 0 - Time::Local 0 - bytes 0 - perl 5.006 - strict 0 - warnings 0 Hash-Merge-0.298 pathname: H/HE/HERMES/Hash-Merge-0.298.tar.gz provides: @@ -3665,7 +3431,6 @@ DISTRIBUTIONS IO::Prompt 0.997004 IO::Prompt::ReturnVal 0.997004 requirements: - ExtUtils::MakeMaker 0 IO::Handle 0 Term::ReadKey 0 Test::More 0 @@ -3730,12 +3495,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Test::More 0.31 Time::HiRes 0 - IPC-Signal-1.00 - pathname: R/RO/ROSCH/IPC-Signal-1.00.tar.gz - provides: - IPC::Signal 1.00 - requirements: - ExtUtils::MakeMaker 0 IPC-System-Simple-1.25 pathname: P/PJ/PJF/IPC-System-Simple-1.25.tar.gz provides: @@ -4635,19 +4394,6 @@ DISTRIBUTIONS Try::Tiny 0 strict 0 warnings 0 - Module-Load-Conditional-0.68 - pathname: B/BI/BINGOS/Module-Load-Conditional-0.68.tar.gz - provides: - Module::Load::Conditional 0.68 - requirements: - ExtUtils::MakeMaker 0 - Locale::Maketext::Simple 0 - Module::CoreList 2.22 - Module::Load 0.28 - Module::Metadata 1.000005 - Params::Check 0 - Test::More 0 - version 0.69 Module-Pluggable-5.2 pathname: S/SI/SIMONW/Module-Pluggable-5.2.tar.gz provides: @@ -5553,30 +5299,6 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - MooseX-Role-WithOverloading-0.17 - pathname: E/ET/ETHER/MooseX-Role-WithOverloading-0.17.tar.gz - provides: - MooseX::Role::WithOverloading 0.17 - MooseX::Role::WithOverloading::Meta::Role 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::Composite 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToInstance 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToRole 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::FixOverloadedRefs 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::ToClass 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::ToInstance 0.17 - MooseX::Role::WithOverloading::Meta::Role::Application::ToRole 0.17 - MooseX::Role::WithOverloading::Meta::Role::Composite 0.17 - requirements: - ExtUtils::MakeMaker 0 - Moose 0.94 - Moose::Exporter 0 - Moose::Role 1.15 - aliased 0 - namespace::autoclean 0.16 - namespace::clean 0.19 - perl 5.006 MooseX-StrictConstructor-0.21 pathname: D/DR/DROLSKY/MooseX-StrictConstructor-0.21.tar.gz provides: @@ -6537,22 +6259,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - Parallel-Prefork-0.18 - pathname: K/KA/KAZUHO/Parallel-Prefork-0.18.tar.gz - provides: - Parallel::Prefork 0.18 - Parallel::Prefork::SpareWorkers undef - Parallel::Prefork::SpareWorkers::Scoreboard undef - requirements: - Class::Accessor::Lite 0.04 - ExtUtils::MakeMaker 6.59 - List::MoreUtils 0 - Proc::Wait3 0.03 - Scope::Guard 0 - Signal::Mask 0 - Test::Requires 0 - Test::SharedFork 0 - perl 5.008001 Parallel-Scoreboard-0.08 pathname: K/KA/KAZUHO/Parallel-Scoreboard-0.08.tar.gz provides: @@ -7457,12 +7163,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Proc-Wait3-0.05 - pathname: C/CT/CTILMES/Proc-Wait3-0.05.tar.gz - provides: - Proc::Wait3 0.05 - requirements: - ExtUtils::MakeMaker 0 Readonly-2.05 pathname: S/SA/SANKO/Readonly-2.05.tar.gz provides: @@ -7580,17 +7280,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Scalar::Util 0 perl 5.006 - Scalar-List-Utils-1.49 - pathname: P/PE/PEVANS/Scalar-List-Utils-1.49.tar.gz - provides: - List::Util 1.49 - List::Util::XS 1.49 - Scalar::Util 1.49 - Sub::Util 1.49 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0 - perl 5.006 Scope-Guard-0.21 pathname: C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz provides: @@ -7692,27 +7381,6 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 - Server-Starter-0.33 - pathname: K/KA/KAZUHO/Server-Starter-0.33.tar.gz - provides: - Server::Starter 0.33 - Server::Starter::Guard undef - requirements: - ExtUtils::CBuilder 0 - Module::Build 0.4005 - perl 5.008 - Signal-Mask-0.008 - pathname: L/LE/LEONT/Signal-Mask-0.008.tar.gz - provides: - Signal::Mask 0.008 - Signal::Pending 0.008 - requirements: - Carp 0 - ExtUtils::MakeMaker 6.30 - IPC::Signal 0 - POSIX 0 - strict 0 - warnings 0 Sort-Naturally-1.03 pathname: B/BI/BINGOS/Sort-Naturally-1.03.tar.gz provides: @@ -8314,80 +7982,6 @@ DISTRIBUTIONS Test::Builder::Module 0 Test::More 0.88 perl 5.008_001 - Test-Simple-1.302106 - pathname: E/EX/EXODIST/Test-Simple-1.302106.tar.gz - provides: - Test2 1.302106 - Test2::API 1.302106 - Test2::API::Breakage 1.302106 - Test2::API::Context 1.302106 - Test2::API::Instance 1.302106 - Test2::API::Stack 1.302106 - Test2::Event 1.302106 - Test2::Event::Bail 1.302106 - Test2::Event::Diag 1.302106 - Test2::Event::Encoding 1.302106 - Test2::Event::Exception 1.302106 - Test2::Event::Fail 1.302106 - Test2::Event::Generic 1.302106 - Test2::Event::Note 1.302106 - Test2::Event::Ok 1.302106 - Test2::Event::Pass 1.302106 - Test2::Event::Plan 1.302106 - Test2::Event::Skip 1.302106 - Test2::Event::Subtest 1.302106 - Test2::Event::TAP::Version 1.302106 - Test2::Event::Waiting 1.302106 - Test2::EventFacet 1.302106 - Test2::EventFacet::About 1.302106 - Test2::EventFacet::Amnesty 1.302106 - Test2::EventFacet::Assert 1.302106 - Test2::EventFacet::Control 1.302106 - Test2::EventFacet::Error 1.302106 - Test2::EventFacet::Info 1.302106 - Test2::EventFacet::Meta 1.302106 - Test2::EventFacet::Parent 1.302106 - Test2::EventFacet::Plan 1.302106 - Test2::EventFacet::Trace 1.302106 - Test2::Formatter 1.302106 - Test2::Formatter::TAP 1.302106 - Test2::Hub 1.302106 - Test2::Hub::Interceptor 1.302106 - Test2::Hub::Interceptor::Terminator 1.302106 - Test2::Hub::Subtest 1.302106 - Test2::IPC 1.302106 - Test2::IPC::Driver 1.302106 - Test2::IPC::Driver::Files 1.302106 - Test2::Tools::Tiny 1.302106 - Test2::Util 1.302106 - Test2::Util::ExternalMeta 1.302106 - Test2::Util::Facets2Legacy 1.302106 - Test2::Util::HashBase 1.302106 - Test2::Util::Trace 1.302106 - Test::Builder 1.302106 - Test::Builder::Formatter 1.302106 - Test::Builder::IO::Scalar 2.114 - Test::Builder::Module 1.302106 - Test::Builder::Tester 1.302106 - Test::Builder::Tester::Color 1.302106 - Test::Builder::Tester::Tie 1.302106 - Test::Builder::TodoDiag 1.302106 - Test::More 1.302106 - Test::Simple 1.302106 - Test::Tester 1.302106 - Test::Tester::Capture 1.302106 - Test::Tester::CaptureRunner 1.302106 - Test::Tester::Delegate 1.302106 - Test::use::ok 1.302106 - ok 1.302106 - requirements: - ExtUtils::MakeMaker 0 - File::Spec 0 - File::Temp 0 - Scalar::Util 1.13 - Storable 0 - perl 5.006002 - utf8 0 Test-SubCalls-1.09 pathname: A/AD/ADAMK/Test-SubCalls-1.09.tar.gz provides: @@ -8688,22 +8282,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Twiggy-0.1025 - pathname: M/MI/MIYAGAWA/Twiggy-0.1025.tar.gz - provides: - AnyEvent::Server::PSGI undef - Plack::Handler::Twiggy undef - Twiggy 0.1025 - Twiggy::Server undef - Twiggy::Server::SS undef - Twiggy::Writer undef - requirements: - AnyEvent 0 - ExtUtils::MakeMaker 0 - HTTP::Status 0 - Plack 0.99 - Try::Tiny 0 - perl 5.008001 Type-Tiny-1.002001 pathname: T/TO/TOBYINK/Type-Tiny-1.002001.tar.gz provides: @@ -9057,24 +8635,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - WWW-Mechanize-Cached-1.51 - pathname: O/OA/OALDERS/WWW-Mechanize-Cached-1.51.tar.gz - provides: - WWW::Mechanize::Cached 1.51 - requirements: - Cache::FileCache 0 - Carp 0 - Data::Dump 0 - ExtUtils::MakeMaker 0 - Module::Runtime 0 - Moo 1.004005 - MooX::Types::MooseLike::Base 0 - Storable 2.21 - WWW::Mechanize 0 - namespace::clean 0 - perl 5.006 - strict 0 - warnings 0 WWW-RobotRules-6.02 pathname: G/GA/GAAS/WWW-RobotRules-6.02.tar.gz provides: @@ -9167,13 +8727,6 @@ DISTRIBUTIONS XML::SAX 0.15 XML::SAX::Expat 0 perl 5.008 - XSLoader-0.24 - pathname: S/SA/SAPER/XSLoader-0.24.tar.gz - provides: - XSLoader 0.24 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0.47 YAML-1.24 pathname: T/TI/TINITA/YAML-1.24.tar.gz provides: @@ -9260,50 +8813,6 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libnet-3.11 - pathname: S/SH/SHAY/libnet-3.11.tar.gz - provides: - Net undef - Net::Cmd 3.11 - Net::Config 3.11 - Net::Domain 3.11 - Net::FTP 3.11 - Net::FTP::A 3.11 - Net::FTP::E 3.11 - Net::FTP::I 3.11 - Net::FTP::L 3.11 - Net::FTP::_SSL_SingleSessionCache 3.11 - Net::FTP::dataconn 3.11 - Net::NNTP 3.11 - Net::NNTP::_SSL 3.11 - Net::Netrc 3.11 - Net::POP3 3.11 - Net::POP3::_SSL 3.11 - Net::SMTP 3.11 - Net::SMTP::_SSL 3.11 - Net::Time 3.11 - requirements: - Carp 0 - Errno 0 - Exporter 0 - ExtUtils::MakeMaker 6.64 - Fcntl 0 - File::Basename 0 - FileHandle 0 - Getopt::Std 0 - IO::File 0 - IO::Select 0 - IO::Socket 1.05 - POSIX 0 - Socket 2.016 - Symbol 0 - Time::Local 0 - constant 0 - perl 5.008001 - strict 0 - utf8 0 - vars 0 - warnings 0 libwww-perl-6.29 pathname: O/OA/OALDERS/libwww-perl-6.29.tar.gz provides: @@ -9412,13 +8921,3 @@ DISTRIBUTIONS indirect 0 multidimensional 0 perl 5.006 - version-0.9918 - pathname: J/JP/JPEACOCK/version-0.9918.tar.gz - provides: - version 0.9918 - version::regex 0.9918 - version::vpp 0.9918 - version::vxs 0.9918 - requirements: - ExtUtils::MakeMaker 0 - perl 5.006002 From 6dda0a654215106678bf232455d7f539f8672ca4 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Mon, 9 Mar 2020 10:14:34 +0100 Subject: [PATCH 047/725] Add 'date' to 'suggestions' output --- lib/MetaCPAN/Document/File/Set.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index fc259fb59..e0f170885 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -579,7 +579,7 @@ sub autocomplete_suggester { ( $docs{ $suggest->{text} }, $suggest->{score} ); } - my @fields = (qw(documentation distribution author release deprecated)); + my @fields = (qw(documentation distribution author release deprecated date)); my $data = $self->es->search( { index => $self->index->name, From 25883cac04e9346b6055c180bfab48b4dedc3d17 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 13 Mar 2020 08:56:32 -0400 Subject: [PATCH 048/725] Tidy MetaCPAN::Document::File::Set --- lib/MetaCPAN/Document/File/Set.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index e0f170885..f910a5c37 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -579,8 +579,15 @@ sub autocomplete_suggester { ( $docs{ $suggest->{text} }, $suggest->{score} ); } - my @fields = (qw(documentation distribution author release deprecated date)); - my $data = $self->es->search( + my @fields = qw( + author + date + deprecated + distribution + documentation + release + ); + my $data = $self->es->search( { index => $self->index->name, type => 'file', From e94bcb7edf3e0e80cc458d4c96c1b114ec001453 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 20 Mar 2020 15:15:14 -0400 Subject: [PATCH 049/725] Fix Docker hostname for pg server --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 76bd9675d..48e716a73 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -PGDB=db:5432 +PGDB=pgdb:5432 API_SERVER=morbo -l http://*:5000 -w app.psgi -w bin -w lib -w templates --verbose From 04574c1ceaad4fef9c8c1bea659902a12b4d7c43 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 20 Mar 2020 15:15:33 -0400 Subject: [PATCH 050/725] Add wait-for-es script --- wait-for-es.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 wait-for-es.sh diff --git a/wait-for-es.sh b/wait-for-es.sh new file mode 100755 index 000000000..f1dc822f0 --- /dev/null +++ b/wait-for-es.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Courtesy of @fxdgear +# https://github.com/elastic/elasticsearch-py/issues/778#issuecomment-384389668 + +set -e + +host="$1" +shift +cmd="$@" + + +until $(curl --output /dev/null --silent --head --fail "$host"); do + printf '.' + sleep 1 +done + +# First wait for ES to start... +response=$(curl $host) + +until [ "$response" = "200" ]; do + response=$(curl --write-out %{http_code} --silent --output /dev/null "$host") + >&2 echo "Elastic Search is unavailable - sleeping" + sleep 1 +done + + +# Wait for ES status to turn to yellow. +# TODO: Ideally we'd be waiting for green, but we need multiple nodes for that. + +health="$(curl -fsSL "$host/_cat/health?h=status")" +health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") + +until [ "$health" = 'yellow' ]; do + health="$(curl -fsSL "$host/_cat/health?h=status")" + health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") + >&2 echo "Elastic Search is unavailable ($health) - sleeping" + sleep 1 +done + +>&2 echo "Elastic Search is up" +exec $cmd From 225749b6e54a29ee7a34b835d01f0918e7448b7f Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Tue, 7 Apr 2020 09:46:12 +0200 Subject: [PATCH 051/725] escape reserved chars in search term --- lib/MetaCPAN/Model/Search.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index 007bbf109..f3e8a8be0 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -79,6 +79,8 @@ sub search_web { $page_size //= 20; $from //= 0; + $search_term =~ s{([ + - = > < ! & | ( ) { } \[ \] ^ " ~ * ? : \ / ])}{\\$1}x; + # munge the search_term # these would be nicer if we had variable-length lookbehinds... # Allow q = 'author:LLAP' or 'module:Data::Page' or 'dist:' From 598c80131554213a72282aa5ff65ee609a39e9e3 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 7 Apr 2020 10:32:30 -0400 Subject: [PATCH 052/725] Tidy --- lib/MetaCPAN/Model/Search.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index f3e8a8be0..116587e09 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -79,7 +79,8 @@ sub search_web { $page_size //= 20; $from //= 0; - $search_term =~ s{([ + - = > < ! & | ( ) { } \[ \] ^ " ~ * ? : \ / ])}{\\$1}x; + $search_term + =~ s{([ + - = > < ! & | ( ) { } \[ \] ^ " ~ * ? : \ / ])}{\\$1}x; # munge the search_term # these would be nicer if we had variable-length lookbehinds... From 96905c8406945c0fd0fee7b6fe4f7a3449666d4d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 18 Apr 2020 12:47:34 -0400 Subject: [PATCH 053/725] Fix author/dist/module searches --- lib/MetaCPAN/Model/Search.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index 116587e09..129cdaf63 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -80,13 +80,17 @@ sub search_web { $from //= 0; $search_term - =~ s{([ + - = > < ! & | ( ) { } \[ \] ^ " ~ * ? : \ / ])}{\\$1}x; + =~ s{([ + - = > < ! & | ( ) { } \[ \] ^ " ~ * ? \ / ])}{\\$1}x; # munge the search_term # these would be nicer if we had variable-length lookbehinds... # Allow q = 'author:LLAP' or 'module:Data::Page' or 'dist:' # We are mapping to correct ES fields here - wonder if ANYONE # uses these?!?!?! + # + # The exceptions below are used specifically by the front end search. + # We've temporarily removed the ":" from the regex above so that the the + # author/dist/module searches work again. The were broken in 225749b6e. $search_term # =~ s{(^|\s)author:([a-zA-Z]+)(?=\s|$)}{$1author:\U$2\E}g; $search_term From b4b247fe42b1a2d86ead1225846b936eacb185e8 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 5 Jun 2020 16:50:04 +0200 Subject: [PATCH 054/725] add files_by_category end point The existing interesting_files end point had a long list of files to include, with inconsistent rules for what file extensions and capitalization would be allowed. It also would just give the files back in a single list. The code for finding change logs partly reproduced this. Unify the logic for the files we search for, with consistent rules for file extensions, capitalization, and handling of special dists like "perl". Keep the different types of files categorized so that interesting_files can both filter the files it is querying for, and adding a new end point files_by_category to easily find the files of a specific type, like was previously possible for change logs. Install files and contributing docs are now listed on the front end, so this should make it easier for them to find the files. --- lib/MetaCPAN/Document/File/Set.pm | 81 +---- lib/MetaCPAN/Query/File.pm | 395 ++++++++++++++-------- lib/MetaCPAN/Server.pm | 6 +- lib/MetaCPAN/Server/Controller/Release.pm | 12 +- 4 files changed, 277 insertions(+), 217 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index f910a5c37..65ecf1870 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -17,7 +17,13 @@ has query_file => ( isa => 'MetaCPAN::Query::File', lazy => 1, builder => '_build_query_file', - handles => [qw< dir interesting_files >], + handles => [ + qw( + dir + interesting_files + files_by_category + ) + ], ); sub _build_query_file { @@ -654,75 +660,10 @@ sub autocomplete_suggester { sub find_changes_files { my ( $self, $author, $release ) = @_; - - # find the most likely file - # TODO: should we do this when the release is indexed - # and store the result as { 'changes_file' => $name } - - my @candidates = qw( - CHANGELOG - ChangeLog - Changelog - ChangeLog.pm - changelog.pm - ChangeLog.pod - CHANGES - Changes - CHANGES.md - CHANGES.markdown - CHANGES.pm - Changes.pm - CHANGES.pod - Changes.pod - NEWS - ); - - # use $c->model b/c we can't let any filters apply here - my $file = $self->raw->filter( - { - and => [ - { term => { release => $release } }, - { term => { author => $author } }, - { - or => [ - - # if it's a perl release, get perldelta - { - and => [ - { term => { distribution => 'perl' } }, - { - term => { - 'name' => 'perldelta.pod' - } - }, - ] - }, - - # otherwise look for one of these candidates in the root - { - and => [ - { term => { level => 0 } }, - { term => { directory => 0 } }, - { - or => [ - map { { term => { 'name' => $_ } } } - @candidates - ] - } - ] - } - ], - } - ] - } - )->size(1) - - # HACK: Sort by level/desc to put pod/perldeta.pod first (if found) - # otherwise sort root files by name and select the first. - ->sort( [ { level => 'desc' }, { name => 'asc' } ] )->first; - - return unless is_hashref($file); - return $file->{_source}; + my $result = $self->files_by_category( $author, $release, ['changelog'], + { fields => \1 } ); + my ($file) = @{ $result->{categories}{changelog} || [] }; + return $file; } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 0752b2135..2965df6ef 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -45,8 +45,206 @@ sub dir { return { dir => $dir }; } +sub _doc_files { + my @files = @_; + my %s; + return + map +( "$_", "$_.pod", "$_.md", "$_.markdown", "$_.mdown", + "$_.mkdn", ), + grep !$s{$_}++, + map +( $_, uc $_ ), + @_; +} + +my %special_files = ( + changelog => [ + _doc_files( + qw( + Changelog + ChangeLog + Changes + News + ) + ), + ], + contributing => [ + _doc_files( + qw( + Contributing + Hacking + Development + ) + ), + ], + license => [ + qw( + LICENCE + LICENSE + Copyright + COPYRIGHT + Copying + COPYING + Artistic + ARTISTIC + ) + ], + install => [ + _doc_files( + qw( + Install + ) + ), + ], + dist => [ + qw( + Build.PL + MANIFEST + META.json + META.yml + Makefile.PL + alienfile + cpanfile + dist.ini + minil.toml + ) + ], + other => [ + _doc_files( + qw( + Authors + Credits + FAQ + README + THANKS + ToDo + Todo + ) + ), + ], +); +my %perl_files = ( + changelog => [ + qw( + perldelta.pod + ) + ], +); +my %prefix_files = ( + example => [ + qw( + eg + ex + example + Example + sample + ) + ], +); + +my %file_to_type; +my %type_to_regex; +my %query_parts; + +my %sort_order; + +for my $type ( keys %special_files ) { + my @files = @{ $special_files{$type} || [] }; + my @perl_files = @{ $perl_files{$type} || [] }; + + $sort_order{ $files[$_] } = $_ for 0 .. $#files; + + my @root_file = grep !/\.pod$/, @files; + my @non_root_file = grep /\.pod$/, @files; + + my @parts; + if (@root_file) { + push @parts, + { + bool => { + must => [ + { term => { level => 0 } }, + { terms => { name => \@root_file } }, + ], + ( + @perl_files + ? ( must_not => + [ { term => { distribution => 'perl' } } ] ) + : () + ), + } + }; + } + if (@non_root_file) { + push @parts, + { + bool => { + must => [ { terms => { name => \@non_root_file } } ], + ( + @perl_files + ? ( must_not => + [ { term => { distribution => 'perl' } } ] ) + : () + ), + } + }; + } + if (@perl_files) { + push @parts, + { + bool => { + must => [ + { term => { distribution => 'perl' } }, + { terms => { name => \@perl_files } }, + ], + } + }; + } + + $file_to_type{$_} = $type for @files, @perl_files; + push @{ $query_parts{$type} }, @parts; +} + +for my $type ( keys %prefix_files ) { + my @prefixes = @{ $prefix_files{$type} }; + + my @parts = map +( { prefix => { 'name' => $_ } }, + { prefix => { 'path' => $_ } }, ), @prefixes; + + my ($regex) = map qr/\A(?:$_)/, join '|', @prefixes; + + $type_to_regex{$type} = $regex; + push @{ $query_parts{$type} }, @parts; +} + sub interesting_files { - my ( $self, $author, $release ) = @_; + my ( $self, $author, $release, $categories, $options ) = @_; + + $categories = [ sort keys %query_parts ] + if !$categories || !@$categories; + + my $return = { + files => [], + total => 0, + took => 0, + }; + + my @clauses = map @{ $query_parts{$_} // [] }, @$categories; + + return $return + unless @clauses; + + my $source = $options->{fields} || [ + qw( + author + distribution + documentation + name + path + pod_lines + release + status + ) + ]; my $body = { query => { @@ -63,141 +261,13 @@ sub interesting_files { { not => { prefix => { 'path' => 'share/' } } }, { not => { prefix => { 'path' => 't/' } } }, { not => { prefix => { 'path' => 'xt/' } } }, - { - bool => { - should => [ - { - bool => { - must => [ - { term => { level => 0 } }, - { - terms => { - name => [ - qw( - alienfile - AUTHORS - Build.PL - CHANGELOG - CHANGELOG.md - ChangeLog - ChangeLog.md - Changelog - Changelog.md - CHANGES - CHANGES.md - Changes - Changes.md - CONTRIBUTING - CONTRIBUTING.md - Contributing - COPYING - Copying - COPYRIGHT - cpanfile - CREDITS - DEVELOPMENT - DEVELOPMENT.md - Development - Development.md - dist.ini - FAQ - FAQ.md - HACKING - HACKING.md - Hacking - Hacking.md - INSTALL - INSTALL.md - LICENCE - LICENSE - MANIFEST - Makefile.PL - META.json - META.yml - minil.toml - NEWS - NEWS.md - README - README.markdown - README.md - README.mdown - README.mkdn - THANKS - TODO - TODO.md - ToDo - ToDo.md - Todo - Todo.md - ) - ] - } - } - ] - } - }, - { - bool => { - must => [ - { - terms => { - name => [ - qw( - CONTRIBUTING.pm - CONTRIBUTING.pod - Contributing.pm - Contributing.pod - ChangeLog.pm - ChangeLog.pod - Changelog.pm - Changelog.pod - CHANGES.pm - CHANGES.pod - Changes.pm - Changes.pod - HACKING.pm - HACKING.pod - Hacking.pm - Hacking.pod - TODO.pm - TODO.pod - ToDo.pm - ToDo.pod - Todo.pm - Todo.pod - ) - ] - } - } - ] - } - }, - map { - { prefix => { 'name' => $_ } }, - { prefix => { 'path' => $_ } }, - - # With "prefix" we don't need the plural "s". - } qw( - ex eg - example Example - sample - ) - ] - } - } - ] - } + { bool => { should => \@clauses } }, + ], + }, }, + _source => $source, - # NOTE: We could inject author/release/distribution into each result - # in the controller if asking ES for less data would be better. - fields => [ - qw( - name documentation path pod_lines - author release distribution status - ) - ], - size => 250, + size => $options->{size} || 250, }; my $data = $self->es->search( @@ -207,16 +277,57 @@ sub interesting_files { body => $body, } ); - return unless $data->{hits}{total}; - my $files = [ map { $_->{fields} } @{ $data->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($files); + $return->{took} = $data->{took}; + $return->{total} = $data->{hits}{total}; - return { - files => $files, - total => $data->{hits}{total}, - took => $data->{took} - }; + return $return + unless $return->{total}; + + my $files = [ map $_->{_source}, @{ $data->{hits}{hits} } ]; + + for my $file (@$files) { + my $category = $file_to_type{ $file->{name} }; + if ( !$category ) { + for my $type ( keys %type_to_regex ) { + my $re = $type_to_regex{$type}; + if ( $file->{name} =~ $re || $file->{path} =~ $re ) { + $category = $type; + last; + } + } + } + $category ||= 'unknown'; + + $file->{category} = $category; + } + + $return->{files} = $files; + + return $return; +} + +sub files_by_category { + my ( $self, $author, $release, $categories, $options ) = @_; + my $return = $self->interesting_files( $author, $release, $categories, + $options ); + my $files = delete $return->{files}; + + $return->{categories} = { map +( $_ => [] ), @$categories }; + + for my $file (@$files) { + my $category = $file->{category}; + push @{ $return->{categories}{$category} }, $file; + } + + for my $category (@$categories) { + my $files = $return->{categories}{$category}; + @$files = map $_->[0], + sort { $a->[1] <=> $b->[1] || $a->[2] cmp $b->[2] } + map [ $_, $sort_order{ $_->{name} } || 9999, $_->{path} ], + @$files; + } + return $return; } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index 04c8b2d5d..b547f6b63 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -131,7 +131,7 @@ sub app { # request body (not both, 'body' parameters take precedence). # the returned output is an arrayref containing the parameter values. sub read_param { - my ( $c, $key ) = @_; + my ( $c, $key, $optional ) = @_; my $body_data = $c->req->body_data; my $params @@ -139,10 +139,10 @@ sub read_param { ? $body_data->{$key} : [ $c->req->param($key) ]; - $params = [$params] unless is_arrayref($params); + $params = [ $params // () ] unless is_arrayref($params); $c->detach( '/bad_request', ["Missing param: $key"] ) - unless $params and @{$params}; + if !$optional && !@$params; return $params; } diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index df1f257fb..44c2f3003 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -99,8 +99,16 @@ sub top_uploaders : Path('top_uploaders') : Args() { sub interesting_files : Path('interesting_files') : Args(2) { my ( $self, $c, $author, $release ) = @_; - $c->stash_or_detach( - $c->model('CPAN::File')->interesting_files( $author, $release ) ); + my $categories = $c->read_param( 'category', 1 ); + $c->stash_or_detach( $c->model('CPAN::File') + ->interesting_files( $author, $release, $categories ) ); +} + +sub files_by_category : Path('files_by_category') : Args(2) { + my ( $self, $c, $author, $release ) = @_; + my $categories = $c->read_param( 'category', 1 ); + $c->stash_or_detach( $c->model('CPAN::File') + ->files_by_category( $author, $release, $categories ) ); } __PACKAGE__->meta->make_immutable; From f71ea6c3edc5dab65c290cfbabb3ff4934d9dcbe Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 13 Jun 2020 20:05:12 +0200 Subject: [PATCH 055/725] convert uses of JSON to Cpanel::JSON::XS --- bin/convert_authors.pl | 2 +- lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm | 2 +- lib/MetaCPAN/Script/Release.pm | 4 ---- lib/MetaCPAN/Server/View/JSONP.pm | 2 +- t/server/controller/source.t | 3 ++- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/convert_authors.pl b/bin/convert_authors.pl index cd1fad30b..9561c17ad 100644 --- a/bin/convert_authors.pl +++ b/bin/convert_authors.pl @@ -85,6 +85,6 @@ unlink $file; (my $base = $file) =~ s/^(.*)\/.*?$/$1/; open FILE, '>', "$base/author-1.0.json"; - print FILE JSON->new->pretty->encode( $raw ); + print FILE Cpanel::JSON::XS->new->pretty->encode( $raw ); close FILE; } diff --git a/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm b/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm index 1e9c10454..b491ff9c9 100644 --- a/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm +++ b/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm @@ -39,7 +39,7 @@ around execute => sub { if ( my $source = delete $params->{source} ) { # NOTE: merge $controller->{json_options} if we ever use it - my $json = JSON->new->utf8; + my $json = Cpanel::JSON::XS->new->utf8; # if it decodes if ( try { $source = $json->decode($source); } ) { diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index cef047065..d772c9735 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -3,10 +3,6 @@ package MetaCPAN::Script::Release; use strict; use warnings; -BEGIN { - $ENV{PERL_JSON_BACKEND} = 'JSON::XS'; -} - use CPAN::DistnameInfo (); use File::Find::Rule (); use File::stat (); diff --git a/lib/MetaCPAN/Server/View/JSONP.pm b/lib/MetaCPAN/Server/View/JSONP.pm index 7a53cdf0e..2c603be92 100644 --- a/lib/MetaCPAN/Server/View/JSONP.pm +++ b/lib/MetaCPAN/Server/View/JSONP.pm @@ -21,7 +21,7 @@ sub process { my $content_type = $c->res->content_type; return 1 if ( $content_type eq 'text/javascript' ); if ( $content_type ne 'application/json' ) { - $body = JSON->new->allow_nonref->ascii->encode($body); + $body = Cpanel::JSON::XS->new->allow_nonref->ascii->encode($body); } $c->res->body("/**/$cb($body);"); return 1; diff --git a/t/server/controller/source.t b/t/server/controller/source.t index af4bacf7d..e2612ace1 100644 --- a/t/server/controller/source.t +++ b/t/server/controller/source.t @@ -2,6 +2,7 @@ use strict; use warnings; use lib 't/lib'; +use Cpanel::JSON::XS (); use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers; use Test::More; @@ -96,7 +97,7 @@ test_psgi app, sub { ); ok( my $jsdata - = JSON->new->allow_nonref->decode($function_args), + = Cpanel::JSON::XS->new->allow_nonref->decode($function_args), 'decode json' ); is( $jsdata, $manifest, 'JSONP-wrapped manifest' ); From 654746d78784d645636be10849c10811a0cdea34 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 13 Jun 2020 20:35:54 +0200 Subject: [PATCH 056/725] use perl specific files for license and contributing --- lib/MetaCPAN/Query/File.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 2965df6ef..d09fe0a46 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -128,6 +128,17 @@ my %perl_files = ( perldelta.pod ) ], + license => [ + qw( + perlartistic.pod + perlgpl.pod + ) + ], + contributing => [ + qw( + perlhack.pod + ) + ], ); my %prefix_files = ( example => [ From 598733e0cd8cf1267794572d9fe7621b3adedd0a Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 14 Jun 2020 08:24:13 +0200 Subject: [PATCH 057/725] tidy test --- t/server/controller/source.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/server/controller/source.t b/t/server/controller/source.t index e2612ace1..3cf0cb367 100644 --- a/t/server/controller/source.t +++ b/t/server/controller/source.t @@ -96,8 +96,8 @@ test_psgi app, sub { 'JSONP wrapper' ); ok( - my $jsdata - = Cpanel::JSON::XS->new->allow_nonref->decode($function_args), + my $jsdata = Cpanel::JSON::XS->new->allow_nonref->decode( + $function_args), 'decode json' ); is( $jsdata, $manifest, 'JSONP-wrapped manifest' ); From bb3848ea6c27491321a454e637ebe2d622c6d3b7 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 09:59:38 +0100 Subject: [PATCH 058/725] extract making ES image into script for non-CI use --- .travis.yml | 17 ++--------------- bin/docker-elasticsearch | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 15 deletions(-) create mode 100755 bin/docker-elasticsearch diff --git a/.travis.yml b/.travis.yml index c97b50b09..910881fba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,20 +45,7 @@ before_install: - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers - source ~/travis-perl-helpers/init - - sudo mkdir -p /etc/elasticsearch/scripts/ && sudo mkdir /tmp/es && sudo chmod 777 /tmp/es - - - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > /tmp/es/prefer_shorter_module_names_100.groovy - - - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > /tmp/es/prefer_shorter_module_names_400.groovy - - - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > /tmp/es/status_is_latest.groovy - - - sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > /tmp/es/score_version_numified.groovy - - - sudo curl -O -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > /tmp/metacpan.yml - - - docker pull elasticsearch:2.4-alpine - - docker run -d -p 127.0.0.1:9200:9200 -v /tmp/metacpan.yml:/usr/share/elasticsearch/config/metacpan.yml -v /tmp/es:/usr/share/elasticsearch/config/scripts elasticsearch:2.4-alpine + - bin/docker-elasticsearch /tmp/metacpan.yml /tmp/es 127.0.0.1:9200 - cpanm -n Carton - cpanm -n App::cpm @@ -71,7 +58,7 @@ install: - AUTHOR_TESTING=0 cpm install -L $PERL_CARTON_PATH --resolver $CPAN_RESOLVER --workers $(test-jobs) || (tail -n 500 -f ~/.perl-cpm/build.log; false) before_script: - - bin/wait-for-open http://localhost:9200/ + - bin/wait-for-open http://$ES_TEST/ - coverage-setup script: diff --git a/bin/docker-elasticsearch b/bin/docker-elasticsearch new file mode 100755 index 000000000..51f61707b --- /dev/null +++ b/bin/docker-elasticsearch @@ -0,0 +1,23 @@ +#!/bin/sh + +# bin/docker-elasticsearch /tmp/metacpan.yml /tmp/es 127.0.0.1:9200 + +ES_CONFIG_FILE="$1" +ES_CONFIG_DIR="$2" +ES_PORT="$3" + +# sudo mkdir -p /etc/elasticsearch/scripts/ # believe unnecessary +sudo mkdir "$ES_CONFIG_DIR" && sudo chmod 777 "$ES_CONFIG_DIR" + +sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy + +sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy + +sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy + +sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy + +sudo curl -O -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > "$ES_CONFIG_FILE" + +docker pull elasticsearch:2.4-alpine +docker run -d -p "$ES_PORT":9200 -v "$ES_CONFIG_FILE":/usr/share/elasticsearch/config/metacpan.yml -v "$ES_CONFIG_DIR":/usr/share/elasticsearch/config/scripts elasticsearch:2.4-alpine From 388298f8d26c81f0e149bb71bd406cb881627d2d Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 10:00:26 +0100 Subject: [PATCH 059/725] zap unnecessary -O on curl --- bin/docker-elasticsearch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/docker-elasticsearch b/bin/docker-elasticsearch index 51f61707b..d765d7867 100755 --- a/bin/docker-elasticsearch +++ b/bin/docker-elasticsearch @@ -9,15 +9,15 @@ ES_PORT="$3" # sudo mkdir -p /etc/elasticsearch/scripts/ # believe unnecessary sudo mkdir "$ES_CONFIG_DIR" && sudo chmod 777 "$ES_CONFIG_DIR" -sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy +sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy -sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy +sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy -sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy +sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy -sudo curl -O -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy +sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy -sudo curl -O -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > "$ES_CONFIG_FILE" +sudo curl -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > "$ES_CONFIG_FILE" docker pull elasticsearch:2.4-alpine docker run -d -p "$ES_PORT":9200 -v "$ES_CONFIG_FILE":/usr/share/elasticsearch/config/metacpan.yml -v "$ES_CONFIG_DIR":/usr/share/elasticsearch/config/scripts elasticsearch:2.4-alpine From 3145e908a10784537a54c1d9eafd9a3cec79e590 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 10:03:37 +0100 Subject: [PATCH 060/725] zap mkdir believed unnecessary --- bin/docker-elasticsearch | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/docker-elasticsearch b/bin/docker-elasticsearch index d765d7867..6a8e425ca 100755 --- a/bin/docker-elasticsearch +++ b/bin/docker-elasticsearch @@ -6,7 +6,6 @@ ES_CONFIG_FILE="$1" ES_CONFIG_DIR="$2" ES_PORT="$3" -# sudo mkdir -p /etc/elasticsearch/scripts/ # believe unnecessary sudo mkdir "$ES_CONFIG_DIR" && sudo chmod 777 "$ES_CONFIG_DIR" sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy From d6c1508dcefe726016736b60bbe031c84f696914 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 10:29:24 +0100 Subject: [PATCH 061/725] if want to start fresh, turn off safe mode --- t/00_setup.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/00_setup.t b/t/00_setup.t index b5c3fe673..d693eb1dc 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -30,7 +30,7 @@ BEGIN { # Ensure we're starting fresh my $tmp_dir = tmp_dir(); -$tmp_dir->remove_tree; +$tmp_dir->remove_tree( { safe => 0 } ); $tmp_dir->mkpath; ok( $tmp_dir->stat, "$tmp_dir exists for testing" ); From 5141efd1df38b13a3c1e9c3c94142c8da2fc6bb7 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 11:56:49 +0100 Subject: [PATCH 062/725] update .snapshot --- cpanfile.snapshot | 277 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 275 insertions(+), 2 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index a335329e6..95c2bf0db 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -386,6 +386,58 @@ DISTRIBUTIONS Text::Template 0 strict 0 warnings 0 + CPAN-Meta-2.150010 + pathname: D/DA/DAGOLDEN/CPAN-Meta-2.150010.tar.gz + provides: + CPAN::Meta 2.150010 + CPAN::Meta::Converter 2.150010 + CPAN::Meta::Feature 2.150010 + CPAN::Meta::History 2.150010 + CPAN::Meta::Merge 2.150010 + CPAN::Meta::Prereqs 2.150010 + CPAN::Meta::Spec 2.150010 + CPAN::Meta::Validator 2.150010 + Parse::CPAN::Meta 2.150010 + requirements: + CPAN::Meta::Requirements 2.121 + CPAN::Meta::YAML 0.011 + Carp 0 + Encode 0 + Exporter 0 + ExtUtils::MakeMaker 6.17 + File::Spec 0.80 + JSON::PP 2.27300 + Scalar::Util 0 + perl 5.008001 + strict 0 + version 0.88 + warnings 0 + CPAN-Meta-Requirements-2.140 + pathname: D/DA/DAGOLDEN/CPAN-Meta-Requirements-2.140.tar.gz + provides: + CPAN::Meta::Requirements 2.140 + requirements: + B 0 + Carp 0 + ExtUtils::MakeMaker 6.17 + perl 5.006 + strict 0 + version 0.88 + warnings 0 + CPAN-Meta-YAML-0.018 + pathname: D/DA/DAGOLDEN/CPAN-Meta-YAML-0.018.tar.gz + provides: + CPAN::Meta::YAML 0.018 + requirements: + B 0 + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 6.17 + Fcntl 0 + Scalar::Util 0 + perl 5.008001 + strict 0 + warnings 0 CPAN-Repository-0.010 pathname: O/OA/OALDERS/CPAN-Repository-0.010.tar.gz provides: @@ -1118,7 +1170,6 @@ DISTRIBUTIONS Config::Any::XML undef Config::Any::YAML undef requirements: - Config::General 2.47 Module::Pluggable::Object 3.6 Config-General-2.63 pathname: T/TL/TLINDEN/Config-General-2.63.tar.gz @@ -2544,7 +2595,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Mail::Address 0 - Net::DNS 0 Scalar::Util 0 Test::More 0 perl 5.006 @@ -2717,6 +2767,51 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + ExtUtils-MakeMaker-7.44 + pathname: B/BI/BINGOS/ExtUtils-MakeMaker-7.44.tar.gz + provides: + ExtUtils::Command 7.44 + ExtUtils::Command::MM 7.44 + ExtUtils::Liblist 7.44 + ExtUtils::Liblist::Kid 7.44 + ExtUtils::MM 7.44 + ExtUtils::MM_AIX 7.44 + ExtUtils::MM_Any 7.44 + ExtUtils::MM_BeOS 7.44 + ExtUtils::MM_Cygwin 7.44 + ExtUtils::MM_DOS 7.44 + ExtUtils::MM_Darwin 7.44 + ExtUtils::MM_MacOS 7.44 + ExtUtils::MM_NW5 7.44 + ExtUtils::MM_OS2 7.44 + ExtUtils::MM_QNX 7.44 + ExtUtils::MM_UWIN 7.44 + ExtUtils::MM_Unix 7.44 + ExtUtils::MM_VMS 7.44 + ExtUtils::MM_VOS 7.44 + ExtUtils::MM_Win32 7.44 + ExtUtils::MM_Win95 7.44 + ExtUtils::MY 7.44 + ExtUtils::MakeMaker 7.44 + ExtUtils::MakeMaker::Config 7.44 + ExtUtils::MakeMaker::Locale 7.44 + ExtUtils::MakeMaker::_version 7.44 + ExtUtils::MakeMaker::charstar 7.44 + ExtUtils::MakeMaker::version 7.44 + ExtUtils::MakeMaker::version::regex 7.44 + ExtUtils::MakeMaker::version::vpp 7.44 + ExtUtils::Mkbootstrap 7.44 + ExtUtils::Mksymlists 7.44 + ExtUtils::testlib 7.44 + MM 7.44 + MY 7.44 + requirements: + Data::Dumper 0 + Encode 0 + File::Basename 0 + File::Spec 0.8 + Pod::Man 0 + perl 5.006 ExtUtils-MakeMaker-CPANfile-0.08 pathname: I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.08.tar.gz provides: @@ -3316,6 +3411,22 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.36 Socket 1.94 Test::More 0 + HTTP-Tiny-0.076 + pathname: D/DA/DAGOLDEN/HTTP-Tiny-0.076.tar.gz + provides: + HTTP::Tiny 0.076 + requirements: + Carp 0 + ExtUtils::MakeMaker 6.17 + Fcntl 0 + IO::Socket 0 + MIME::Base64 0 + Socket 0 + Time::Local 0 + bytes 0 + perl 5.006 + strict 0 + warnings 0 Hash-Merge-0.298 pathname: H/HE/HERMES/Hash-Merge-0.298.tar.gz provides: @@ -4394,6 +4505,19 @@ DISTRIBUTIONS Try::Tiny 0 strict 0 warnings 0 + Module-Load-Conditional-0.70 + pathname: B/BI/BINGOS/Module-Load-Conditional-0.70.tar.gz + provides: + Module::Load::Conditional 0.70 + requirements: + ExtUtils::MakeMaker 0 + Locale::Maketext::Simple 0 + Module::CoreList 2.22 + Module::Load 0.28 + Module::Metadata 1.000005 + Params::Check 0 + Test::More 0 + version 0.69 Module-Pluggable-5.2 pathname: S/SI/SIMONW/Module-Pluggable-5.2.tar.gz provides: @@ -7280,6 +7404,16 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Scalar::Util 0 perl 5.006 + Scalar-List-Utils-1.55 + pathname: P/PE/PEVANS/Scalar-List-Utils-1.55.tar.gz + provides: + List::Util 1.55 + List::Util::XS 1.55 + Scalar::Util 1.55 + Sub::Util 1.55 + requirements: + ExtUtils::MakeMaker 0 + perl 5.006 Scope-Guard-0.21 pathname: C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz provides: @@ -7982,6 +8116,84 @@ DISTRIBUTIONS Test::Builder::Module 0 Test::More 0.88 perl 5.008_001 + Test-Simple-1.302175 + pathname: E/EX/EXODIST/Test-Simple-1.302175.tar.gz + provides: + Test2 1.302175 + Test2::API 1.302175 + Test2::API::Breakage 1.302175 + Test2::API::Context 1.302175 + Test2::API::Instance 1.302175 + Test2::API::Stack 1.302175 + Test2::Event 1.302175 + Test2::Event::Bail 1.302175 + Test2::Event::Diag 1.302175 + Test2::Event::Encoding 1.302175 + Test2::Event::Exception 1.302175 + Test2::Event::Fail 1.302175 + Test2::Event::Generic 1.302175 + Test2::Event::Note 1.302175 + Test2::Event::Ok 1.302175 + Test2::Event::Pass 1.302175 + Test2::Event::Plan 1.302175 + Test2::Event::Skip 1.302175 + Test2::Event::Subtest 1.302175 + Test2::Event::TAP::Version 1.302175 + Test2::Event::V2 1.302175 + Test2::Event::Waiting 1.302175 + Test2::EventFacet 1.302175 + Test2::EventFacet::About 1.302175 + Test2::EventFacet::Amnesty 1.302175 + Test2::EventFacet::Assert 1.302175 + Test2::EventFacet::Control 1.302175 + Test2::EventFacet::Error 1.302175 + Test2::EventFacet::Hub 1.302175 + Test2::EventFacet::Info 1.302175 + Test2::EventFacet::Info::Table 1.302175 + Test2::EventFacet::Meta 1.302175 + Test2::EventFacet::Parent 1.302175 + Test2::EventFacet::Plan 1.302175 + Test2::EventFacet::Render 1.302175 + Test2::EventFacet::Trace 1.302175 + Test2::Formatter 1.302175 + Test2::Formatter::TAP 1.302175 + Test2::Hub 1.302175 + Test2::Hub::Interceptor 1.302175 + Test2::Hub::Interceptor::Terminator 1.302175 + Test2::Hub::Subtest 1.302175 + Test2::IPC 1.302175 + Test2::IPC::Driver 1.302175 + Test2::IPC::Driver::Files 1.302175 + Test2::Tools::Tiny 1.302175 + Test2::Util 1.302175 + Test2::Util::ExternalMeta 1.302175 + Test2::Util::Facets2Legacy 1.302175 + Test2::Util::HashBase 1.302175 + Test2::Util::Trace 1.302175 + Test::Builder 1.302175 + Test::Builder::Formatter 1.302175 + Test::Builder::IO::Scalar 2.114 + Test::Builder::Module 1.302175 + Test::Builder::Tester 1.302175 + Test::Builder::Tester::Color 1.302175 + Test::Builder::Tester::Tie 1.302175 + Test::Builder::TodoDiag 1.302175 + Test::More 1.302175 + Test::Simple 1.302175 + Test::Tester 1.302175 + Test::Tester::Capture 1.302175 + Test::Tester::CaptureRunner 1.302175 + Test::Tester::Delegate 1.302175 + Test::use::ok 1.302175 + ok 1.302175 + requirements: + ExtUtils::MakeMaker 0 + File::Spec 0 + File::Temp 0 + Scalar::Util 1.13 + Storable 0 + perl 5.006002 + utf8 0 Test-SubCalls-1.09 pathname: A/AD/ADAMK/Test-SubCalls-1.09.tar.gz provides: @@ -8727,6 +8939,13 @@ DISTRIBUTIONS XML::SAX 0.15 XML::SAX::Expat 0 perl 5.008 + XSLoader-0.24 + pathname: S/SA/SAPER/XSLoader-0.24.tar.gz + provides: + XSLoader 0.24 + requirements: + ExtUtils::MakeMaker 0 + Test::More 0.47 YAML-1.24 pathname: T/TI/TINITA/YAML-1.24.tar.gz provides: @@ -8813,6 +9032,50 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 + libnet-3.11 + pathname: S/SH/SHAY/libnet-3.11.tar.gz + provides: + Net undef + Net::Cmd 3.11 + Net::Config 3.11 + Net::Domain 3.11 + Net::FTP 3.11 + Net::FTP::A 3.11 + Net::FTP::E 3.11 + Net::FTP::I 3.11 + Net::FTP::L 3.11 + Net::FTP::_SSL_SingleSessionCache 3.11 + Net::FTP::dataconn 3.11 + Net::NNTP 3.11 + Net::NNTP::_SSL 3.11 + Net::Netrc 3.11 + Net::POP3 3.11 + Net::POP3::_SSL 3.11 + Net::SMTP 3.11 + Net::SMTP::_SSL 3.11 + Net::Time 3.11 + requirements: + Carp 0 + Errno 0 + Exporter 0 + ExtUtils::MakeMaker 6.64 + Fcntl 0 + File::Basename 0 + FileHandle 0 + Getopt::Std 0 + IO::File 0 + IO::Select 0 + IO::Socket 1.05 + POSIX 0 + Socket 2.016 + Symbol 0 + Time::Local 0 + constant 0 + perl 5.008001 + strict 0 + utf8 0 + vars 0 + warnings 0 libwww-perl-6.29 pathname: O/OA/OALDERS/libwww-perl-6.29.tar.gz provides: @@ -8921,3 +9184,13 @@ DISTRIBUTIONS indirect 0 multidimensional 0 perl 5.006 + version-0.9924 + pathname: J/JP/JPEACOCK/version-0.9924.tar.gz + provides: + version 0.9924 + version::regex 0.9924 + version::vpp 0.9924 + version::vxs 0.9924 + requirements: + ExtUtils::MakeMaker 0 + perl 5.006002 From 92d5bccecde7aa0724011464a593659b3891b5fb Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 13:30:44 +0100 Subject: [PATCH 063/725] cache tidyall results - save ~2 mins as t/tidyall.t runs last --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 910881fba..2c62c9f80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,3 +95,4 @@ cache: - local - ~/perl5 - t/var/darkpan + - .tidyall.d # cache tidyall results From 093db4b72e7bcfb31e8b487f270e2c62026f86f2 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 14:00:28 +0100 Subject: [PATCH 064/725] rename t/tidyall.t to be lexically near start so not hold up tests --- t/{tidyall.t => 02_tidyall.t} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename t/{tidyall.t => 02_tidyall.t} (100%) diff --git a/t/tidyall.t b/t/02_tidyall.t similarity index 100% rename from t/tidyall.t rename to t/02_tidyall.t From fb9a1982c1aeb6177ed145f63b9e4b83ebbb4397 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 16:17:28 +0100 Subject: [PATCH 065/725] re-enable search tests on Travis --- t/api/controller/search/first.t | 4 ---- t/api/controller/search/web.t | 4 ---- t/model/search.t | 4 ---- 3 files changed, 12 deletions(-) diff --git a/t/api/controller/search/first.t b/t/api/controller/search/first.t index 6cfb73942..3ca6acdf4 100644 --- a/t/api/controller/search/first.t +++ b/t/api/controller/search/first.t @@ -4,10 +4,6 @@ use Test::More; use Test::Mojo; use Mojo::JSON qw(true false); -plan skip_all => - "Travis ES bad, see https://travis-ci.org/metacpan/metacpan-api/jobs/301092129" - if $ENV{TRAVIS}; - my $t = Test::Mojo->new('MetaCPAN::API'); $t->get_ok( '/v1/search/first', form => { q => 'Versions::PkgVar' } ) diff --git a/t/api/controller/search/web.t b/t/api/controller/search/web.t index b31aacc8c..cc433b980 100644 --- a/t/api/controller/search/web.t +++ b/t/api/controller/search/web.t @@ -7,10 +7,6 @@ use Mojo::JSON qw(true false); # Note: we need a release marked as status => latest # so we're using Versions::PkgVar for now # perhaps it should be smarter later and find one to try? -# -plan skip_all => - "Travis ES bad, see https://travis-ci.org/metacpan/metacpan-api/jobs/301092129" - if $ENV{TRAVIS}; my $t = Test::Mojo->new('MetaCPAN::API'); diff --git a/t/model/search.t b/t/model/search.t index 87c5ad516..30ac93855 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -8,10 +8,6 @@ use Test::More; use Test::Deep qw(cmp_deeply ignore); use Cpanel::JSON::XS (); -plan skip_all => - "Travis ES bad, see https://travis-ci.org/metacpan/metacpan-api/jobs/301092129" - if $ENV{TRAVIS}; - # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; my $search = MetaCPAN::Model::Search->new( From dbace49f65da2fa40ab2a287b190e5930f98499a Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 17:14:08 +0100 Subject: [PATCH 066/725] all tests add t/lib so no put on command-line --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c62c9f80..b2b7cf8ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,7 +62,7 @@ before_script: - coverage-setup script: - - carton exec prove -It/lib -lr -j$(test-jobs) t + - carton exec prove -lr -j$(test-jobs) t after_success: - coverage-report From 75f0056ee010476de31dec6ee938ac89450688fb Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 18:44:57 +0100 Subject: [PATCH 067/725] fix search/web quoting --- lib/MetaCPAN/Model/Search.pm | 9 +++------ t/model/search.t | 11 +++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index 129cdaf63..a6b8537ca 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -79,18 +79,15 @@ sub search_web { $page_size //= 20; $from //= 0; - $search_term - =~ s{([ + - = > < ! & | ( ) { } \[ \] ^ " ~ * ? \ / ])}{\\$1}x; + $search_term =~ s{([+=>_not_rogue, '_not_rogue' ); is( @{ $results->{results} }, 5, '5 results on author search' ); } +{ + my $results = $search->search_web('author:Mo BadPod'); + isnt( @{ $results->{results} }, + 0, '>0 results on author search with extra' ); +} + +{ + eval { $search->search_web('usr/bin/env') }; + is( $@, '', 'search term with a / no exception' ); +} + { my $long_form = $search->search_web('distribution:Pod-Pm'); my $short_form = $search->search_web('dist:Pod-Pm'); From 6564e67dcee104c870770ef72b4845a8cda99811 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 19:16:46 +0100 Subject: [PATCH 068/725] give pre-commit hook carton libs, path --- git/hooks/pre-commit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git/hooks/pre-commit b/git/hooks/pre-commit index 5854030e1..7b1572230 100755 --- a/git/hooks/pre-commit +++ b/git/hooks/pre-commit @@ -2,8 +2,12 @@ use strict; use warnings; +use Config; # Hack to use carton's local::lib. use lib 'local/lib/perl5'; +$ENV{PATH} .= $Config{path_sep}.'local/bin'; +$ENV{PERL5LIB} = join $Config{path_sep}, + grep defined, $ENV{PERL5LIB}, 'local/lib/perl5'; use Code::TidyAll::Git::Precommit; Code::TidyAll::Git::Precommit->check( no_stash => 1 ); From 241619c4163db8d46a974d29b9b242e1fffea452 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 20:18:44 +0100 Subject: [PATCH 069/725] zap unused import of Test::Fatal --- t/api/controller/admin.t | 1 - 1 file changed, 1 deletion(-) diff --git a/t/api/controller/admin.t b/t/api/controller/admin.t index 35e29556e..d4921ac7b 100644 --- a/t/api/controller/admin.t +++ b/t/api/controller/admin.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use Test::Fatal qw( exception ); use Test::Mojo; use Test::More; From c2c1058b2cf472115add75ba87f19a9c50bc42d3 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 21:31:23 +0100 Subject: [PATCH 070/725] add dep Type::Tiny --- cpanfile | 1 + 1 file changed, 1 insertion(+) diff --git a/cpanfile b/cpanfile index 49ea012bf..8ecc3256f 100644 --- a/cpanfile +++ b/cpanfile @@ -173,6 +173,7 @@ requires 'strictures', '1'; requires 'Throwable::Error'; requires 'Time::Local'; requires 'Try::Tiny', '0.24'; +requires 'Type::Tiny', '1.002001'; requires 'URI', '1.71'; requires 'URI::Escape'; requires 'version', '0.9901'; From 97e583629827c32ecbb0f8b4edcbdcda499f47d5 Mon Sep 17 00:00:00 2001 From: Ed J Date: Thu, 18 Jun 2020 00:49:17 +0100 Subject: [PATCH 071/725] zap all MetaCPAN::Types qw(:all) --- lib/MetaCPAN/Document/Author.pm | 5 ++++- lib/MetaCPAN/Document/Favorite.pm | 1 - lib/MetaCPAN/Document/File.pm | 2 +- lib/MetaCPAN/Document/Release.pm | 5 ++++- lib/MetaCPAN/Model/User/Account.pm | 2 +- lib/MetaCPAN/Role/Logger.pm | 2 +- lib/MetaCPAN/Role/Script.pm | 2 +- t/types.t | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 7a3e5db84..18d651b5c 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -8,7 +8,10 @@ use ElasticSearchX::Model::Document; # load order not important use Gravatar::URL (); -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw( + ArrayRef PerlMongers Blog Profile NonEmptySimpleStr + Bool Dict HashRef Str Tuple Optional +); use MooseX::Types::Structured qw(Dict Tuple Optional); use MetaCPAN::Util; diff --git a/lib/MetaCPAN/Document/Favorite.pm b/lib/MetaCPAN/Document/Favorite.pm index 001bc9f3c..7a13a3bbf 100644 --- a/lib/MetaCPAN/Document/Favorite.pm +++ b/lib/MetaCPAN/Document/Favorite.pm @@ -7,7 +7,6 @@ use Moose; use ElasticSearchX::Model::Document; use DateTime; -use MetaCPAN::Types qw(:all); use MetaCPAN::Util; has id => ( diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index d2cb8ee1d..14d3bea32 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -10,7 +10,7 @@ use ElasticSearchX::Model::Document; use Encode; use List::AllUtils qw( any ); use MetaCPAN::Document::Module; -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw(Stat Module ArrayRef Bool Int Maybe Num ScalarRef Str); use MetaCPAN::Util qw(numify_version); use Plack::MIME; use Pod::Text; diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index b59fd9fc4..bfa4b794b 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -8,7 +8,10 @@ use DateTime qw(); use Ref::Util qw(); use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw( + Dependency HashRef Resources Stat Tests + ArrayRef Bool Num Str +); use MetaCPAN::Util qw( numify_version ); =head1 PROPERTIES diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index 04d86f9aa..36d2b6966 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -7,7 +7,7 @@ use Moose; use ElasticSearchX::Model::Document; use MetaCPAN::Model::User::Identity; -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw(Identity ArrayRef Bool Dict Str); use MooseX::Types::Structured qw(Dict); use MetaCPAN::Util; diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index 7916d8199..916517ccc 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw(Logger Str); use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; use Path::Tiny qw( path ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 43c6195e6..ef8e1c84a 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -7,7 +7,7 @@ use FindBin; use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model; -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw( Dir Int Str Bool ); use Mojo::Server; use Term::ANSIColor qw( colored ); use IO::Interactive qw( is_interactive ); diff --git a/t/types.t b/t/types.t index 6b3928420..e1db75857 100644 --- a/t/types.t +++ b/t/types.t @@ -2,7 +2,7 @@ use Test::Most; use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Types qw(:all); +use MetaCPAN::Types qw(Resources); is_deeply( Resources->coerce( From d10663db17d2f4cabd86cd3ea3ae9634415b4b4d Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 17 Jun 2020 22:31:27 +0100 Subject: [PATCH 072/725] Types::Standard where possible --- lib/Catalyst/Authentication/Store/Proxy.pm | 2 +- lib/MetaCPAN/API/Model/Role/ES.pm | 2 +- lib/MetaCPAN/Document/Author.pm | 3 +-- lib/MetaCPAN/Document/Author/Profile.pm | 2 +- lib/MetaCPAN/Document/Contributor.pm | 2 +- lib/MetaCPAN/Document/Cover.pm | 2 +- lib/MetaCPAN/Document/Dependency.pm | 1 - lib/MetaCPAN/Document/Distribution.pm | 2 +- lib/MetaCPAN/Document/File.pm | 3 ++- lib/MetaCPAN/Document/Mirror.pm | 3 +-- lib/MetaCPAN/Document/Module.pm | 2 +- lib/MetaCPAN/Document/Package.pm | 2 +- lib/MetaCPAN/Document/Permission.pm | 2 +- lib/MetaCPAN/Document/Rating.pm | 3 +-- lib/MetaCPAN/Document/Release.pm | 6 ++---- lib/MetaCPAN/Model/Archive.pm | 3 ++- lib/MetaCPAN/Model/Email/PAUSE.pm | 3 ++- lib/MetaCPAN/Model/Release.pm | 3 ++- lib/MetaCPAN/Model/Search.pm | 2 +- lib/MetaCPAN/Model/User/Account.pm | 4 ++-- lib/MetaCPAN/Model/User/Identity.pm | 2 +- lib/MetaCPAN/Query/Role/Common.pm | 1 - lib/MetaCPAN/Role/HasConfig.pm | 2 +- lib/MetaCPAN/Role/HasRogueDistributions.pm | 2 +- lib/MetaCPAN/Role/Logger.pm | 3 ++- lib/MetaCPAN/Role/Script.pm | 3 ++- lib/MetaCPAN/Script/Backpan.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 3 ++- lib/MetaCPAN/Script/CPANTesters.pm | 3 ++- lib/MetaCPAN/Script/Check.pm | 2 +- lib/MetaCPAN/Script/Checksum.pm | 2 +- lib/MetaCPAN/Script/Contributor.pm | 2 +- lib/MetaCPAN/Script/Cover.pm | 3 ++- lib/MetaCPAN/Script/External.pm | 2 +- lib/MetaCPAN/Script/Favorite.pm | 2 +- lib/MetaCPAN/Script/First.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 2 +- lib/MetaCPAN/Script/Mapping.pm | 2 +- lib/MetaCPAN/Script/Package.pm | 2 +- lib/MetaCPAN/Script/Permission.pm | 2 +- lib/MetaCPAN/Script/Purge.pm | 2 +- lib/MetaCPAN/Script/Release.pm | 3 ++- lib/MetaCPAN/Script/River.pm | 3 ++- lib/MetaCPAN/Script/Role/External/Cygwin.pm | 2 +- lib/MetaCPAN/Script/Role/External/Debian.pm | 2 +- lib/MetaCPAN/Script/Snapshot.pm | 2 +- lib/MetaCPAN/Script/Suggest.pm | 2 +- lib/MetaCPAN/Script/Tickets.pm | 2 +- lib/MetaCPAN/Script/Watcher.pm | 2 +- lib/MetaCPAN/Server/Controller.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/OpenID.pm | 2 +- lib/MetaCPAN/Server/Diff.pm | 2 +- lib/MetaCPAN/Server/QuerySanitizer.pm | 2 +- lib/MetaCPAN/Types.pm | 2 -- t/lib/MetaCPAN/TestServer.pm | 3 ++- t/lib/MetaCPAN/Tests/Distribution.pm | 2 +- t/lib/MetaCPAN/Tests/Model.pm | 2 +- t/lib/MetaCPAN/Tests/Release.pm | 2 +- t/model/email/pause.t | 2 +- 59 files changed, 70 insertions(+), 67 deletions(-) diff --git a/lib/Catalyst/Authentication/Store/Proxy.pm b/lib/Catalyst/Authentication/Store/Proxy.pm index 8d445b2a3..4e9afdab9 100644 --- a/lib/Catalyst/Authentication/Store/Proxy.pm +++ b/lib/Catalyst/Authentication/Store/Proxy.pm @@ -3,7 +3,7 @@ package Catalyst::Authentication::Store::Proxy; # ABSTRACT: Delegates authentication logic to the user object use Moose; use Catalyst::Utils; -use MetaCPAN::Types qw( HashRef Str ); +use Types::Standard qw( HashRef Str ); has user_class => ( is => 'ro', diff --git a/lib/MetaCPAN/API/Model/Role/ES.pm b/lib/MetaCPAN/API/Model/Role/ES.pm index f6d401989..e287d629c 100644 --- a/lib/MetaCPAN/API/Model/Role/ES.pm +++ b/lib/MetaCPAN/API/Model/Role/ES.pm @@ -2,7 +2,7 @@ package MetaCPAN::API::Model::Role::ES; use Moose::Role; -use MetaCPAN::Types qw( Object ); +use Types::Standard qw( Object ); has es => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 18d651b5c..64ed86248 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -10,9 +10,8 @@ use ElasticSearchX::Model::Document; use Gravatar::URL (); use MetaCPAN::Types qw( ArrayRef PerlMongers Blog Profile NonEmptySimpleStr - Bool Dict HashRef Str Tuple Optional ); -use MooseX::Types::Structured qw(Dict Tuple Optional); +use Types::Standard qw(Bool Dict HashRef Str Tuple Optional); use MetaCPAN::Util; has name => ( diff --git a/lib/MetaCPAN/Document/Author/Profile.pm b/lib/MetaCPAN/Document/Author/Profile.pm index 1ce0b37a7..9415d588d 100644 --- a/lib/MetaCPAN/Document/Author/Profile.pm +++ b/lib/MetaCPAN/Document/Author/Profile.pm @@ -9,7 +9,7 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; use MetaCPAN::Util; -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Contributor.pm b/lib/MetaCPAN/Document/Contributor.pm index ea83f975e..1cab8b44e 100644 --- a/lib/MetaCPAN/Document/Contributor.pm +++ b/lib/MetaCPAN/Document/Contributor.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Contributor; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); has distribution => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Cover.pm b/lib/MetaCPAN/Document/Cover.pm index 30d91bdfe..353695e32 100644 --- a/lib/MetaCPAN/Document/Cover.pm +++ b/lib/MetaCPAN/Document/Cover.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Cover; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( HashRef Str ); +use Types::Standard qw( HashRef Str ); has distribution => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Dependency.pm b/lib/MetaCPAN/Document/Dependency.pm index 123953d28..e54f85fd9 100644 --- a/lib/MetaCPAN/Document/Dependency.pm +++ b/lib/MetaCPAN/Document/Dependency.pm @@ -9,7 +9,6 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; use MetaCPAN::Util; -use MetaCPAN::Types qw( Str ); has [qw(phase relationship module version)] => ( is => 'ro', required => 1 ); diff --git a/lib/MetaCPAN/Document/Distribution.pm b/lib/MetaCPAN/Document/Distribution.pm index 25bde766d..22f3a80d9 100644 --- a/lib/MetaCPAN/Document/Distribution.pm +++ b/lib/MetaCPAN/Document/Distribution.pm @@ -7,7 +7,7 @@ use namespace::autoclean; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( ArrayRef BugSummary RiverSummary); +use MetaCPAN::Types qw( BugSummary RiverSummary ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 14d3bea32..8ae5200b6 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -10,7 +10,8 @@ use ElasticSearchX::Model::Document; use Encode; use List::AllUtils qw( any ); use MetaCPAN::Document::Module; -use MetaCPAN::Types qw(Stat Module ArrayRef Bool Int Maybe Num ScalarRef Str); +use MetaCPAN::Types qw(Stat Module); +use Types::Standard qw(ArrayRef Bool Int Maybe Num ScalarRef Str); use MetaCPAN::Util qw(numify_version); use Plack::MIME; use Pod::Text; diff --git a/lib/MetaCPAN/Document/Mirror.pm b/lib/MetaCPAN/Document/Mirror.pm index 48c956b68..201d718c2 100644 --- a/lib/MetaCPAN/Document/Mirror.pm +++ b/lib/MetaCPAN/Document/Mirror.pm @@ -7,8 +7,7 @@ use Moose; use ElasticSearchX::Model::Document::Types qw( Location ); use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( ArrayRef Dict Str ); -use MooseX::Types::Structured qw(Dict ); # not sure why I have to do this +use Types::Standard qw( Dict Str ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Module.pm b/lib/MetaCPAN/Document/Module.pm index 2b93e70a6..9addccc5e 100644 --- a/lib/MetaCPAN/Document/Module.pm +++ b/lib/MetaCPAN/Document/Module.pm @@ -8,7 +8,7 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; -use MetaCPAN::Types qw( Bool Maybe Num Str ); +use Types::Standard qw( Bool Maybe Num Str ); use MetaCPAN::Util; =head1 SYNOPSIS diff --git a/lib/MetaCPAN/Document/Package.pm b/lib/MetaCPAN/Document/Package.pm index 0d5e46629..ae1f57e2e 100644 --- a/lib/MetaCPAN/Document/Package.pm +++ b/lib/MetaCPAN/Document/Package.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Package; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); has module_name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Permission.pm b/lib/MetaCPAN/Document/Permission.pm index c3e1ebe6b..ee021e76c 100644 --- a/lib/MetaCPAN/Document/Permission.pm +++ b/lib/MetaCPAN/Document/Permission.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Permission; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( ArrayRef Str ); +use Types::Standard qw( ArrayRef Str ); has module_name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Rating.pm b/lib/MetaCPAN/Document/Rating.pm index 14b7c88a5..6481f4efb 100644 --- a/lib/MetaCPAN/Document/Rating.pm +++ b/lib/MetaCPAN/Document/Rating.pm @@ -7,8 +7,7 @@ use Moose; use ElasticSearchX::Model::Document::Types qw(:all); use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( ArrayRef Bool Num Str ); -use MooseX::Types::Structured qw( Dict ); +use Types::Standard qw( ArrayRef Bool Dict Num Str ); has details => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index bfa4b794b..e537ab6d1 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -8,10 +8,8 @@ use DateTime qw(); use Ref::Util qw(); use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( - Dependency HashRef Resources Stat Tests - ArrayRef Bool Num Str -); +use MetaCPAN::Types qw(Dependency HashRef Resources Stat Tests); +use Types::Standard qw(ArrayRef Bool Num Str); use MetaCPAN::Util qw( numify_version ); =head1 PROPERTIES diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index 0ee1040ab..347f4161e 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -3,7 +3,8 @@ package MetaCPAN::Model::Archive; use v5.10; use Moose; use MooseX::StrictConstructor; -use MetaCPAN::Types qw(AbsFile AbsDir ArrayRef Bool Str); +use MetaCPAN::Types qw(AbsFile AbsDir); +use Types::Standard qw(ArrayRef Bool Str); use Archive::Any; use Carp; diff --git a/lib/MetaCPAN/Model/Email/PAUSE.pm b/lib/MetaCPAN/Model/Email/PAUSE.pm index 90dab3fce..94ee899d3 100644 --- a/lib/MetaCPAN/Model/Email/PAUSE.pm +++ b/lib/MetaCPAN/Model/Email/PAUSE.pm @@ -6,7 +6,8 @@ use Email::Sender::Simple qw( sendmail ); use Email::Sender::Transport::SMTP (); use Email::Simple (); use Encode (); -use MetaCPAN::Types qw( Object Uri ); +use MetaCPAN::Types qw( Uri ); +use Types::Standard qw( Object ); use Try::Tiny qw( catch try ); with('MetaCPAN::Role::HasConfig'); diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index d8d8fb982..e9b418476 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -11,7 +11,8 @@ use File::Find (); use File::Spec (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model::Archive; -use MetaCPAN::Types qw(ArrayRef AbsFile Str); +use MetaCPAN::Types qw(AbsFile); +use Types::Standard qw(ArrayRef Str); use MetaCPAN::Util qw( fix_version); use Module::Metadata 1.000012 (); # Improved package detection. use MooseX::StrictConstructor; diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index a6b8537ca..0b51d0bc8 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -7,7 +7,7 @@ use Cpanel::JSON::XS (); use Hash::Merge qw( merge ); use List::Util qw( min uniq ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Object Str ); +use Types::Standard qw( Object Str ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); use MooseX::StrictConstructor; diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index 36d2b6966..a3a39322a 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -7,8 +7,8 @@ use Moose; use ElasticSearchX::Model::Document; use MetaCPAN::Model::User::Identity; -use MetaCPAN::Types qw(Identity ArrayRef Bool Dict Str); -use MooseX::Types::Structured qw(Dict); +use MetaCPAN::Types qw(Identity); +use Types::Standard qw(ArrayRef Bool Dict Str); use MetaCPAN::Util; =head1 PROPERTIES diff --git a/lib/MetaCPAN/Model/User/Identity.pm b/lib/MetaCPAN/Model/User/Identity.pm index 8ed4598bb..331d93fd4 100644 --- a/lib/MetaCPAN/Model/User/Identity.pm +++ b/lib/MetaCPAN/Model/User/Identity.pm @@ -5,7 +5,7 @@ use warnings; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( HashRef ); +use Types::Standard qw( HashRef ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Query/Role/Common.pm b/lib/MetaCPAN/Query/Role/Common.pm index cb2c29e28..bbc90ccaf 100644 --- a/lib/MetaCPAN/Query/Role/Common.pm +++ b/lib/MetaCPAN/Query/Role/Common.pm @@ -1,7 +1,6 @@ package MetaCPAN::Query::Role::Common; use Moose::Role; -use MetaCPAN::Types qw( Str ); has es => ( is => 'ro', ); diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index ddb898cd6..a08d25467 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -4,7 +4,7 @@ use Moose::Role; use FindBin; use Config::ZOMG (); -use MetaCPAN::Types qw(HashRef); +use Types::Standard qw(HashRef); use Module::Runtime qw( require_module ); # Done like this so can be required by a role diff --git a/lib/MetaCPAN/Role/HasRogueDistributions.pm b/lib/MetaCPAN/Role/HasRogueDistributions.pm index ba8614d56..8dfd48dab 100644 --- a/lib/MetaCPAN/Role/HasRogueDistributions.pm +++ b/lib/MetaCPAN/Role/HasRogueDistributions.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::HasRogueDistributions; use Moose::Role; -use MetaCPAN::Types qw( ArrayRef ); +use Types::Standard qw( ArrayRef ); has rogue_distributions => ( is => 'ro', diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index 916517ccc..d54b77ba4 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,7 +2,8 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; -use MetaCPAN::Types qw(Logger Str); +use MetaCPAN::Types qw(Logger); +use Types::Standard qw(Str); use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; use Path::Tiny qw( path ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index ef8e1c84a..2dc549a2e 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -7,7 +7,8 @@ use FindBin; use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model; -use MetaCPAN::Types qw( Dir Int Str Bool ); +use MetaCPAN::Types qw( Dir ); +use Types::Standard qw( Int Str Bool ); use Mojo::Server; use Term::ANSIColor qw( colored ); use IO::Interactive qw( is_interactive ); diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index a013214c4..0a54c0aa6 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -7,7 +7,7 @@ use Moose; use Log::Contextual qw( :log :dlog ); use BackPAN::Index; -use MetaCPAN::Types qw( Bool HashRef Str ); +use Types::Standard qw( Bool HashRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 980c5be07..29fed106f 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -9,7 +9,8 @@ use DateTime; use IO::Zlib (); use Cpanel::JSON::XS; use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Bool Int Str File ); +use MetaCPAN::Types qw( File ); +use Types::Standard qw( Bool Int Str ); use Moose; use Try::Tiny; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index dd076c7ca..faba16af4 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -9,7 +9,8 @@ use File::Temp qw(tempdir); use File::stat qw(stat); use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Bool File Uri ); +use MetaCPAN::Types qw( File Uri ); +use Types::Standard qw( Bool ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index f17991f19..6f068bd05 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -6,7 +6,7 @@ use warnings; use File::Spec::Functions qw(catfile); use Log::Contextual qw( :log ); use Moose; -use MetaCPAN::Types qw( Bool Int Str ); +use Types::Standard qw( Bool Int Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 933ae4579..5690f9a62 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Checksum; use Moose; use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( Bool Int ); +use Types::Standard qw( Bool Int ); use Digest::file qw( digest_file_hex ); diff --git a/lib/MetaCPAN/Script/Contributor.pm b/lib/MetaCPAN/Script/Contributor.pm index 3eab4e61f..a51da4230 100644 --- a/lib/MetaCPAN/Script/Contributor.pm +++ b/lib/MetaCPAN/Script/Contributor.pm @@ -8,7 +8,7 @@ use Moose; use Log::Contextual qw( :log ); use Ref::Util qw( is_arrayref ); -use MetaCPAN::Types qw( Bool HashRef Int Str ); +use Types::Standard qw( Bool HashRef Int Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt', 'MetaCPAN::Script::Role::Contributor'; diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 28ac161e9..c07fcf251 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -5,7 +5,8 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Bool Str Uri); +use MetaCPAN::Types qw( Uri ); +use Types::Standard qw( Bool Str ); use Path::Class qw( file ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/External.pm b/lib/MetaCPAN/Script/External.pm index 85011b512..0ff8ae0df 100644 --- a/lib/MetaCPAN/Script/External.pm +++ b/lib/MetaCPAN/Script/External.pm @@ -7,7 +7,7 @@ use Email::Sender::Simple (); use Email::Simple (); use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt', 'MetaCPAN::Script::Role::External::Cygwin', diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index 846fd18af..658fb7274 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -4,7 +4,7 @@ use Moose; use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( Bool Int Str ); +use Types::Standard qw( Bool Int Str ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/First.pm b/lib/MetaCPAN/Script/First.pm index 5f2b7598e..a0c69a574 100644 --- a/lib/MetaCPAN/Script/First.pm +++ b/lib/MetaCPAN/Script/First.pm @@ -5,7 +5,7 @@ use warnings; use Log::Contextual qw( :log ); use Moose; -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 44e7d6561..059bbabb3 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -9,7 +9,7 @@ use MooseX::Aliases; use Parse::CPAN::Packages::Fast; use Regexp::Common qw(time); use Time::Local; -use MetaCPAN::Types qw( Bool Str ); +use Types::Standard qw( Bool Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index d52d27b1c..a5a2fd4a2 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -20,7 +20,7 @@ use MetaCPAN::Script::Mapping::User::Identity (); use MetaCPAN::Script::Mapping::User::Session (); use MetaCPAN::Script::Mapping::Contributor (); use MetaCPAN::Script::Mapping::Cover (); -use MetaCPAN::Types qw( Bool Str ); +use Types::Standard qw( Bool Str ); use constant { EXPECTED => 1, diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index e22967784..432da4892 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -6,7 +6,7 @@ use CPAN::DistnameInfo (); use IO::Uncompress::Gunzip (); use Log::Contextual qw( :log ); use MetaCPAN::Document::Package (); -use MetaCPAN::Types qw( Bool ); +use Types::Standard qw( Bool ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Permission.pm b/lib/MetaCPAN/Script/Permission.pm index 48dc3711c..898f89773 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -4,7 +4,7 @@ use Moose; use Log::Contextual qw( :log ); use MetaCPAN::Document::Permission (); -use MetaCPAN::Types qw( Bool ); +use Types::Standard qw( Bool ); use PAUSE::Permissions (); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index 36ee58464..29b6428ec 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Purge; use Moose; use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( Bool Str HashRef ); +use Types::Standard qw( Bool Str HashRef ); use MetaCPAN::Util qw( author_dir ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index d772c9735..55429a38b 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -11,7 +11,8 @@ use Log::Contextual qw( :log :dlog ); use MetaCPAN::Util; use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner (); -use MetaCPAN::Types qw( Bool Dir HashRef Int Str ); +use MetaCPAN::Types qw( Dir ); +use Types::Standard qw( Bool HashRef Int Str ); use Moose; use PerlIO::gzip; use Try::Tiny qw( catch try ); diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index 5cd56fcf7..cd0e584a7 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -5,7 +5,8 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( ArrayRef Str Uri); +use MetaCPAN::Types qw( Uri); +use Types::Standard qw( ArrayRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Role/External/Cygwin.pm b/lib/MetaCPAN/Script/Role/External/Cygwin.pm index d67406514..e7c2691ec 100644 --- a/lib/MetaCPAN/Script/Role/External/Cygwin.pm +++ b/lib/MetaCPAN/Script/Role/External/Cygwin.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use List::Util qw( shuffle ); use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( ArrayRef Int ); +use Types::Standard qw( ArrayRef Int ); has mirrors => ( is => 'ro', diff --git a/lib/MetaCPAN/Script/Role/External/Debian.pm b/lib/MetaCPAN/Script/Role/External/Debian.pm index 7761fec77..b7c478fff 100644 --- a/lib/MetaCPAN/Script/Role/External/Debian.pm +++ b/lib/MetaCPAN/Script/Role/External/Debian.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use CPAN::DistnameInfo (); use DBI (); -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); has _host_regex => ( is => 'ro', diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index d4137a4ff..575bee663 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -9,7 +9,7 @@ use DateTime::Format::ISO8601 (); use DDP; use HTTP::Tiny (); use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( Bool Int Str File ArrayRef ); +use Types::Standard qw( Bool Int Str File ArrayRef ); use Moose; use Sys::Hostname qw(hostname); diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index faa03edc7..a8dc8a552 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -7,7 +7,7 @@ use Moose; use DateTime (); use Log::Contextual qw( :log ); -use MetaCPAN::Types qw( Bool Int ); +use Types::Standard qw( Bool Int ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index c18b9e0da..f30b2df16 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -17,7 +17,7 @@ use Moose; use Parse::CSV; use Pithub; use URI::Escape qw(uri_escape); -use MetaCPAN::Types qw( ArrayRef Str ); +use Types::Standard qw( ArrayRef Str ); use Ref::Util qw( is_ref is_hashref); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index e52cc55a8..f85951837 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -8,7 +8,7 @@ use CPAN::DistnameInfo; use Cpanel::JSON::XS; use Log::Contextual qw( :log ); use MetaCPAN::Util; -use MetaCPAN::Types qw( Bool ); +use Types::Standard qw( Bool ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 2bb5c4b01..58087378f 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -8,7 +8,7 @@ use Cpanel::JSON::XS; use List::MoreUtils (); use Moose::Util (); use Moose; -use MetaCPAN::Types qw( HashRef ); +use Types::Standard qw( HashRef ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'Catalyst::Controller'; } diff --git a/lib/MetaCPAN/Server/Controller/Login/OpenID.pm b/lib/MetaCPAN/Server/Controller/Login/OpenID.pm index 266d54ba6..3c1e34713 100644 --- a/lib/MetaCPAN/Server/Controller/Login/OpenID.pm +++ b/lib/MetaCPAN/Server/Controller/Login/OpenID.pm @@ -7,7 +7,7 @@ use Moose; use Net::OpenID::Consumer; use LWP::UserAgent::Paranoid; use MooseX::ClassAttribute; -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); BEGIN { extends 'MetaCPAN::Server::Controller::Login' } diff --git a/lib/MetaCPAN/Server/Diff.pm b/lib/MetaCPAN/Server/Diff.pm index 2cbfbf0a2..e4f9ec131 100644 --- a/lib/MetaCPAN/Server/Diff.pm +++ b/lib/MetaCPAN/Server/Diff.pm @@ -6,7 +6,7 @@ use Moose; use Encoding::FixLatin (); use IPC::Run3; -use MetaCPAN::Types qw( ArrayRef ); +use Types::Standard qw( ArrayRef ); use File::Spec; has git => ( diff --git a/lib/MetaCPAN/Server/QuerySanitizer.pm b/lib/MetaCPAN/Server/QuerySanitizer.pm index c431eeb3f..ffcdff32d 100644 --- a/lib/MetaCPAN/Server/QuerySanitizer.pm +++ b/lib/MetaCPAN/Server/QuerySanitizer.pm @@ -4,7 +4,7 @@ use strict; use warnings; use Moose; -use MetaCPAN::Types qw( HashRef Maybe ); +use Types::Standard qw( HashRef Maybe ); has query => ( is => 'ro', diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index 15fd39d04..2b919e4ad 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -7,11 +7,9 @@ use parent 'MooseX::Types::Combine'; __PACKAGE__->provide_types_from( qw( - MooseX::Types::Common::Numeric MooseX::Types::Common::String MooseX::Types::Moose MooseX::Types::Path::Class::MoreCoercions - MooseX::Types::Structured MooseX::Types::URI MetaCPAN::Types::Internal ) diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 1260a6faa..1a49d7f30 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -16,7 +16,8 @@ use MetaCPAN::Script::Permission (); use MetaCPAN::Script::Release (); use MetaCPAN::Server (); use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use MetaCPAN::Types qw( Dir HashRef Str ); +use MetaCPAN::Types qw( Dir ); +use Types::Standard qw( HashRef Str ); use Search::Elasticsearch; use Search::Elasticsearch::TestServer; use Test::More; diff --git a/t/lib/MetaCPAN/Tests/Distribution.pm b/t/lib/MetaCPAN/Tests/Distribution.pm index 80a57c8bd..9f3308279 100644 --- a/t/lib/MetaCPAN/Tests/Distribution.pm +++ b/t/lib/MetaCPAN/Tests/Distribution.pm @@ -2,7 +2,7 @@ package MetaCPAN::Tests::Distribution; use Test::Routine; use Test::More; use version; -use MetaCPAN::Types qw( Str ); +use Types::Standard qw( Str ); with qw( MetaCPAN::Tests::Model diff --git a/t/lib/MetaCPAN/Tests/Model.pm b/t/lib/MetaCPAN/Tests/Model.pm index 198f0e10c..cc9d59d86 100644 --- a/t/lib/MetaCPAN/Tests/Model.pm +++ b/t/lib/MetaCPAN/Tests/Model.pm @@ -3,7 +3,7 @@ package MetaCPAN::Tests::Model; use Test::Routine; use MetaCPAN::Server::Test (); -use MetaCPAN::Types qw( ArrayRef HashRef Str ); +use Types::Standard qw( ArrayRef HashRef Str ); use Test::More; use Try::Tiny qw( catch try ); diff --git a/t/lib/MetaCPAN/Tests/Release.pm b/t/lib/MetaCPAN/Tests/Release.pm index e319a5dc3..eeb14fd54 100644 --- a/t/lib/MetaCPAN/Tests/Release.pm +++ b/t/lib/MetaCPAN/Tests/Release.pm @@ -8,7 +8,7 @@ use HTTP::Request::Common; use List::Util (); use MetaCPAN::TestApp; use Test::More; -use MetaCPAN::Types qw( ArrayRef HashRef Str ); +use Types::Standard qw( ArrayRef HashRef Str ); with( 'MetaCPAN::Tests::Model', 'MetaCPAN::Tests::Role::HasApp' ); diff --git a/t/model/email/pause.t b/t/model/email/pause.t index 8b3e50438..bd65c85f2 100644 --- a/t/model/email/pause.t +++ b/t/model/email/pause.t @@ -6,7 +6,7 @@ package Author; use MetaCPAN::Moose; -use MetaCPAN::Types qw( ArrayRef Str ); +use Types::Standard qw( ArrayRef Str ); has name => ( is => 'ro', From e2cd95a3f8a37dba32e576a73b1f38c609300247 Mon Sep 17 00:00:00 2001 From: Ed J Date: Fri, 19 Jun 2020 11:15:18 +0100 Subject: [PATCH 073/725] use Types::URI --- cpanfile | 2 +- cpanfile.snapshot | 21 --------------------- lib/MetaCPAN/Model/Email/PAUSE.pm | 2 +- lib/MetaCPAN/Pod/Renderer.pm | 2 +- lib/MetaCPAN/Script/CPANTesters.pm | 3 ++- lib/MetaCPAN/Script/CPANTestersAPI.pm | 2 +- lib/MetaCPAN/Script/Cover.pm | 2 +- lib/MetaCPAN/Script/River.pm | 2 +- lib/MetaCPAN/Types.pm | 1 - 9 files changed, 8 insertions(+), 29 deletions(-) diff --git a/cpanfile b/cpanfile index 8ecc3256f..518d1f449 100644 --- a/cpanfile +++ b/cpanfile @@ -129,7 +129,6 @@ requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; requires 'MooseX::Types::Path::Class::MoreCoercions'; requires 'MooseX::Types::Structured'; -requires 'MooseX::Types::URI'; requires 'Mozilla::CA'; requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; @@ -174,6 +173,7 @@ requires 'Throwable::Error'; requires 'Time::Local'; requires 'Try::Tiny', '0.24'; requires 'Type::Tiny', '1.002001'; +requires 'Types::URI'; requires 'URI', '1.71'; requires 'URI::Escape'; requires 'version', '0.9901'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 95c2bf0db..2d5a0a5b8 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5557,27 +5557,6 @@ DISTRIBUTIONS namespace::clean 0.19 overload 0 perl 5.008 - MooseX-Types-URI-0.08 - pathname: E/ET/ETHER/MooseX-Types-URI-0.08.tar.gz - provides: - MooseX::Types::URI 0.08 - requirements: - Module::Build::Tiny 0.007 - MooseX::Types 0.40 - MooseX::Types::Moose 0 - MooseX::Types::Path::Class 0 - Scalar::Util 0 - URI 0 - URI::FromHash 0 - URI::QueryParam 0 - URI::WithBase 0 - URI::data 0 - URI::file 0 - if 0 - namespace::autoclean 0 - perl 5.006 - strict 0 - warnings 0 Mouse-v2.4.10 pathname: G/GF/GFUJI/Mouse-v2.4.10.tar.gz provides: diff --git a/lib/MetaCPAN/Model/Email/PAUSE.pm b/lib/MetaCPAN/Model/Email/PAUSE.pm index 94ee899d3..8aa6dc71b 100644 --- a/lib/MetaCPAN/Model/Email/PAUSE.pm +++ b/lib/MetaCPAN/Model/Email/PAUSE.pm @@ -6,7 +6,7 @@ use Email::Sender::Simple qw( sendmail ); use Email::Sender::Transport::SMTP (); use Email::Simple (); use Encode (); -use MetaCPAN::Types qw( Uri ); +use Types::URI qw( Uri ); use Types::Standard qw( Object ); use Try::Tiny qw( catch try ); diff --git a/lib/MetaCPAN/Pod/Renderer.pm b/lib/MetaCPAN/Pod/Renderer.pm index bb2903925..62e3a392c 100644 --- a/lib/MetaCPAN/Pod/Renderer.pm +++ b/lib/MetaCPAN/Pod/Renderer.pm @@ -3,7 +3,7 @@ package MetaCPAN::Pod::Renderer; use MetaCPAN::Moose; use MetaCPAN::Pod::XHTML; -use MetaCPAN::Types qw( Uri ); +use Types::URI qw( Uri ); use Pod::Markdown; use Pod::POM; use Pod::POM::View::Pod; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index faba16af4..21da35ab2 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -9,7 +9,8 @@ use File::Temp qw(tempdir); use File::stat qw(stat); use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( File Uri ); +use MetaCPAN::Types qw( File ); +use Types::URI qw( Uri ); use Types::Standard qw( Bool ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index d49b17183..05326dd71 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -5,7 +5,7 @@ use warnings; use Log::Contextual qw( :log :dlog ); use Cpanel::JSON::XS qw( decode_json ); -use MetaCPAN::Types qw( Uri ); +use Types::URI qw( Uri ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index c07fcf251..3dd003fd5 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -5,7 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Uri ); +use Types::URI qw( Uri ); use Types::Standard qw( Bool Str ); use Path::Class qw( file ); diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index cd0e584a7..7f584785d 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -5,7 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Uri); +use Types::URI qw( Uri ); use Types::Standard qw( ArrayRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index 2b919e4ad..798c69191 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -10,7 +10,6 @@ __PACKAGE__->provide_types_from( MooseX::Types::Common::String MooseX::Types::Moose MooseX::Types::Path::Class::MoreCoercions - MooseX::Types::URI MetaCPAN::Types::Internal ) ); From deebefc2fcf053600b79394392cf155adc0bde2b Mon Sep 17 00:00:00 2001 From: Ed J Date: Thu, 18 Jun 2020 12:07:18 +0100 Subject: [PATCH 074/725] extract MetaCPAN::Types::TypeTiny --- lib/MetaCPAN/Document/Author.pm | 10 +- lib/MetaCPAN/Document/Distribution.pm | 2 +- lib/MetaCPAN/Document/File.pm | 3 +- lib/MetaCPAN/Document/Release.pm | 5 +- lib/MetaCPAN/Role/Logger.pm | 2 +- lib/MetaCPAN/Types/Internal.pm | 105 +------------------- lib/MetaCPAN/Types/TypeTiny.pm | 135 ++++++++++++++++++++++++++ t/types.t | 2 +- 8 files changed, 150 insertions(+), 114 deletions(-) create mode 100644 lib/MetaCPAN/Types/TypeTiny.pm diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 64ed86248..943a1eaef 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -8,10 +8,10 @@ use ElasticSearchX::Model::Document; # load order not important use Gravatar::URL (); -use MetaCPAN::Types qw( - ArrayRef PerlMongers Blog Profile NonEmptySimpleStr -); -use Types::Standard qw(Bool Dict HashRef Str Tuple Optional); +use MetaCPAN::Types qw(Profile); +use MetaCPAN::Types::TypeTiny + qw(ArrayRefPromote Blog NonEmptySimpleStr PerlMongers); +use Types::Standard qw(ArrayRef Bool Dict HashRef Str Tuple Optional); use MetaCPAN::Util; has name => ( @@ -30,7 +30,7 @@ has asciiname => ( ); has [qw(website email)] => - ( is => 'ro', required => 1, isa => ArrayRef, coerce => 1 ); + ( is => 'ro', required => 1, isa => ArrayRefPromote, coerce => 1 ); has pauseid => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Distribution.pm b/lib/MetaCPAN/Document/Distribution.pm index 22f3a80d9..a5ec49cff 100644 --- a/lib/MetaCPAN/Document/Distribution.pm +++ b/lib/MetaCPAN/Document/Distribution.pm @@ -7,7 +7,7 @@ use namespace::autoclean; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( BugSummary RiverSummary ); +use MetaCPAN::Types::TypeTiny qw( BugSummary RiverSummary ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 8ae5200b6..1888f20b1 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -10,7 +10,8 @@ use ElasticSearchX::Model::Document; use Encode; use List::AllUtils qw( any ); use MetaCPAN::Document::Module; -use MetaCPAN::Types qw(Stat Module); +use MetaCPAN::Types qw(Module); +use MetaCPAN::Types::TypeTiny qw(Stat); use Types::Standard qw(ArrayRef Bool Int Maybe Num ScalarRef Str); use MetaCPAN::Util qw(numify_version); use Plack::MIME; diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index e537ab6d1..5641bd6bf 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -8,7 +8,8 @@ use DateTime qw(); use Ref::Util qw(); use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw(Dependency HashRef Resources Stat Tests); +use MetaCPAN::Types qw(Dependency); +use MetaCPAN::Types::TypeTiny qw(HashRefCPANMeta Resources Stat Tests); use Types::Standard qw(ArrayRef Bool Num Str); use MetaCPAN::Util qw( numify_version ); @@ -240,7 +241,7 @@ has first => ( has metadata => ( coerce => 1, is => 'ro', - isa => HashRef, + isa => HashRefCPANMeta, dynamic => 1, source_only => 1, ); diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index d54b77ba4..34f3fadfe 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; -use MetaCPAN::Types qw(Logger); +use MetaCPAN::Types::TypeTiny qw(Logger); use Types::Standard qw(Str); use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index 9bd9b8cf2..412b174a7 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -4,48 +4,19 @@ use strict; use warnings; use CPAN::Meta; -use ElasticSearchX::Model::Document::Types qw(:all); -use Cpanel::JSON::XS; +use ElasticSearchX::Model::Document::Types qw(Type); use MooseX::Getopt::OptionTypeMap; -use MooseX::Types::Common::String qw(NonEmptySimpleStr); -use MooseX::Types::Moose qw( ArrayRef HashRef Item Int Str ); -use MooseX::Types::Structured qw(Dict Optional); +use MooseX::Types::Moose qw( ArrayRef HashRef ); use MooseX::Types -declare => [ qw( - Logger - Resources - Stat Module Identity Dependency - Extra - Profile - Blog - PerlMongers - Tests - RTIssueStatus - GitHubIssueStatus - BugSummary - RiverSummary ) ]; -subtype PerlMongers, - as ArrayRef [ Dict [ url => Optional [Str], name => NonEmptySimpleStr ] ]; -coerce PerlMongers, from HashRef, via { [$_] }; - -subtype Blog, as ArrayRef [ Dict [ url => NonEmptySimpleStr, feed => Str ] ]; -coerce Blog, from HashRef, via { [$_] }; - -subtype Stat, - as Dict [ - mode => Int, - size => Int, - mtime => Int - ]; - subtype Module, as ArrayRef [ Type ['MetaCPAN::Document::Module'] ]; coerce Module, from ArrayRef, via { [ map { ref $_ eq 'HASH' ? MetaCPAN::Document::Module->new($_) : $_ } @@ -92,78 +63,6 @@ coerce Profile, from ArrayRef, via { coerce Profile, from HashRef, via { [ MetaCPAN::Document::Author::Profile->new($_) ] }; -subtype Tests, - as Dict [ fail => Int, na => Int, pass => Int, unknown => Int ]; - -subtype RTIssueStatus, - as Dict [ - ( - map { $_ => Optional [Int] } - qw( active closed new open patched rejected resolved stalled ) - ), - source => Str - ]; - -subtype GitHubIssueStatus, - as Dict [ - ( map { $_ => Optional [Int] } qw( active closed open ) ), - source => Str, - ]; - -subtype BugSummary, - as Dict [ - rt => Optional [RTIssueStatus], - github => Optional [GitHubIssueStatus], - ]; - -subtype RiverSummary, - as Dict [ ( map { $_ => Optional [Int] } qw(total immediate bucket) ), ]; - -subtype Resources, - as Dict [ - license => Optional [ ArrayRef [Str] ], - homepage => Optional [Str], - bugtracker => - Optional [ Dict [ web => Optional [Str], mailto => Optional [Str] ] ], - repository => Optional [ - Dict [ - url => Optional [Str], - web => Optional [Str], - type => Optional [Str] - ] - ] - ]; - -coerce Resources, from HashRef, via { - my $r = $_; - my $resources = {}; - for my $field (qw(license homepage bugtracker repository)) { - my $val = $r->{$field}; - if ( !defined $val ) { - next; - } - elsif ( !ref $val ) { - } - elsif ( ref $val eq 'HASH' ) { - $val = {%$val}; - delete @{$val}{ grep /^x_/, keys %$val }; - } - $resources->{$field} = $val; - } - return $resources; -}; - -class_type 'CPAN::Meta'; -coerce HashRef, from 'CPAN::Meta', via { - my $struct = eval { $_->as_struct( { version => 2 } ); }; - return $struct ? $struct : $_->as_struct; -}; - -class_type Logger, { class => 'Log::Log4perl::Logger' }; -coerce Logger, from ArrayRef, via { - return MetaCPAN::Role::Logger::_build_logger($_); -}; - MooseX::Getopt::OptionTypeMap->add_option_type_to_map( 'MooseX::Types::ElasticSearch::ES' => '=s' ); diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm new file mode 100644 index 000000000..56c2e8cfc --- /dev/null +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -0,0 +1,135 @@ +package MetaCPAN::Types::TypeTiny; + +use strict; +use warnings; + +use Types::Standard qw( + ArrayRef Dict HashRef InstanceOf Int Object Optional Str Value +); +use Path::Class (); +use overload (); + +use Type::Library -base, -declare => ( + qw( + Stringable + SimpleStr + NonEmptySimpleStr + ArrayRefPromote + + PerlMongers + Blog + Stat + Tests + RTIssueStatus + GitHubIssueStatus + BugSummary + RiverSummary + Resources + + Logger + HashRefCPANMeta + ) +); +use Type::Utils -all; + +declare Stringable, as Object, where { overload::Method( $_, '""' ) }; + +declare SimpleStr, as Str, + where { ( length($_) <= 255 ) && ( $_ !~ m/\n/ ) }, + message {"Must be a single line of no more than 255 chars"}, + ; + +declare NonEmptySimpleStr, as SimpleStr, + where { length($_) > 0 }, + message {"Must be a non-empty single line of no more than 255 chars"}, + ; + +declare ArrayRefPromote, as ArrayRef; +coerce ArrayRefPromote, from Value, via { [$_] }; + +declare PerlMongers, + as ArrayRef [ Dict [ url => Optional [Str], name => NonEmptySimpleStr ] ]; +coerce PerlMongers, from HashRef, via { [$_] }; + +declare Blog, as ArrayRef [ Dict [ url => NonEmptySimpleStr, feed => Str ] ]; +coerce Blog, from HashRef, via { [$_] }; + +declare Stat, + as Dict [ + mode => Int, + size => Int, + mtime => Int + ]; + +declare Tests, + as Dict [ fail => Int, na => Int, pass => Int, unknown => Int ]; + +declare RTIssueStatus, + as Dict [ + ( + map { $_ => Optional [Int] } + qw( active closed new open patched rejected resolved stalled ) + ), + source => Str + ]; + +declare GitHubIssueStatus, + as Dict [ + ( map { $_ => Optional [Int] } qw( active closed open ) ), + source => Str, + ]; + +declare BugSummary, + as Dict [ + rt => Optional [RTIssueStatus], + github => Optional [GitHubIssueStatus], + ]; + +declare RiverSummary, + as Dict [ ( map { $_ => Optional [Int] } qw(total immediate bucket) ), ]; + +declare Resources, + as Dict [ + license => Optional [ ArrayRef [Str] ], + homepage => Optional [Str], + bugtracker => + Optional [ Dict [ web => Optional [Str], mailto => Optional [Str] ] ], + repository => Optional [ + Dict [ + url => Optional [Str], + web => Optional [Str], + type => Optional [Str] + ] + ] + ]; +coerce Resources, from HashRef, via { + my $r = $_; + my $resources = {}; + for my $field (qw(license homepage bugtracker repository)) { + my $val = $r->{$field}; + if ( !defined $val ) { + next; + } + elsif ( !ref $val ) { + } + elsif ( ref $val eq 'HASH' ) { + $val = {%$val}; + delete @{$val}{ grep /^x_/, keys %$val }; + } + $resources->{$field} = $val; + } + return $resources; +}; + +declare Logger, as InstanceOf ['Log::Log4perl::Logger']; +coerce Logger, from ArrayRef, via { + return MetaCPAN::Role::Logger::_build_logger($_); +}; + +declare HashRefCPANMeta, as HashRef; +coerce HashRefCPANMeta, from InstanceOf ['CPAN::Meta'], via { + my $struct = eval { $_->as_struct( { version => 2 } ); }; + return $struct ? $struct : $_->as_struct; +}; + +1; diff --git a/t/types.t b/t/types.t index e1db75857..31e7cbcb1 100644 --- a/t/types.t +++ b/t/types.t @@ -2,7 +2,7 @@ use Test::Most; use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Types qw(Resources); +use MetaCPAN::Types::TypeTiny qw(Resources); is_deeply( Resources->coerce( From 36b21b5fa7c5a38095aa1bbf5a0637d4da972b51 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 15 Nov 2017 17:57:48 -0500 Subject: [PATCH 075/725] zap unnecessary import --- bin/build_test_CPAN_dir.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/build_test_CPAN_dir.pl b/bin/build_test_CPAN_dir.pl index cdc0d9436..4e2ec6b26 100644 --- a/bin/build_test_CPAN_dir.pl +++ b/bin/build_test_CPAN_dir.pl @@ -8,7 +8,6 @@ use warnings; use ElasticSearch; use LWP::Simple qw(mirror is_success is_redirect); -use Path::Class; use OrePAN2 0.07; use OrePAN2::Injector; use OrePAN2::Indexer; From 10f1371ff7aadb9db681ea342d635a1c94d73e46 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 15 Nov 2017 17:57:48 -0500 Subject: [PATCH 076/725] import 'croak' as is used --- lib/MetaCPAN/Model/Archive.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index 347f4161e..5e91beb19 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -7,7 +7,7 @@ use MetaCPAN::Types qw(AbsFile AbsDir); use Types::Standard qw(ArrayRef Bool Str); use Archive::Any; -use Carp; +use Carp qw( croak ); use File::Temp (); use Path::Class (); use Digest::file qw( digest_file_hex ); From f4e6bd5b4cb6d9c02f6224565a5826e7c3281756 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 15 Nov 2017 17:57:48 -0500 Subject: [PATCH 077/725] s/Path::Class/Path::Tiny/; use Path not File/Dir = no exists-check --- cpanfile | 6 ++---- cpanfile.snapshot | 17 +++++++++++++++++ lib/MetaCPAN/Model/Archive.pm | 24 +++++++++++------------- lib/MetaCPAN/Model/Release.pm | 4 ++-- lib/MetaCPAN/Role/Script.pm | 6 +++--- lib/MetaCPAN/Script/Author.pm | 6 +++--- lib/MetaCPAN/Script/Backpan.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 15 ++++++++------- lib/MetaCPAN/Script/CPANTesters.pm | 7 +++---- lib/MetaCPAN/Script/CPANTestersAPI.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 3 ++- lib/MetaCPAN/Script/Mirrors.pm | 2 +- lib/MetaCPAN/Script/Package.pm | 3 ++- lib/MetaCPAN/Script/Permission.pm | 5 ++--- lib/MetaCPAN/Script/Queue.pm | 6 +++--- lib/MetaCPAN/Script/Ratings.pm | 2 +- lib/MetaCPAN/Script/Release.pm | 11 +++++------ lib/MetaCPAN/Script/Watcher.pm | 7 ++++--- lib/MetaCPAN/Server/Model/Source.pm | 17 ++++++++--------- lib/MetaCPAN/Types.pm | 2 +- t/00_setup.t | 2 +- t/lib/MetaCPAN/DarkPAN.pm | 10 +++++----- t/lib/MetaCPAN/TestServer.pm | 4 ++-- t/model/archive.t | 8 ++++---- t/model/release/metadata.t | 2 +- 25 files changed, 93 insertions(+), 80 deletions(-) diff --git a/cpanfile b/cpanfile index 518d1f449..1fd39a580 100644 --- a/cpanfile +++ b/cpanfile @@ -127,7 +127,7 @@ requires 'MooseX::Types'; requires 'MooseX::Types::Common::String'; requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; -requires 'MooseX::Types::Path::Class::MoreCoercions'; +requires 'MooseX::Types::Path::Tiny'; requires 'MooseX::Types::Structured'; requires 'Mozilla::CA'; requires 'namespace::autoclean'; @@ -139,9 +139,7 @@ requires 'OrePAN2'; requires 'Parse::CPAN::Packages::Fast', '0.09'; requires 'Parse::CSV', '2.04'; requires 'Parse::PMFile', '0.41'; -requires 'Path::Class', '0.36'; -requires 'Path::Class::File'; -requires 'Path::Iterator::Rule', '1.011'; +requires 'Path::Iterator::Rule', '>=1.011'; requires 'PAUSE::Permissions'; requires 'PerlIO::gzip'; requires 'Pithub', '0.01033'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 2d5a0a5b8..b76800b70 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5527,6 +5527,23 @@ DISTRIBUTIONS Test::More 0.96 strict 0 warnings 0 + MooseX-Types-Path-Tiny-0.012 + pathname: E/ET/ETHER/MooseX-Types-Path-Tiny-0.012.tar.gz + provides: + MooseX::Types::Path::Tiny 0.012 + requirements: + Module::Build::Tiny 0.034 + Moose 2 + MooseX::Getopt 0 + MooseX::Types 0 + MooseX::Types::Moose 0 + MooseX::Types::Stringlike 0 + Path::Tiny 0 + if 0 + namespace::autoclean 0 + perl 5.006 + strict 0 + warnings 0 MooseX-Types-Stringlike-0.003 pathname: D/DA/DAGOLDEN/MooseX-Types-Stringlike-0.003.tar.gz provides: diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index 5e91beb19..751613237 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -3,13 +3,12 @@ package MetaCPAN::Model::Archive; use v5.10; use Moose; use MooseX::StrictConstructor; -use MetaCPAN::Types qw(AbsFile AbsDir); +use MetaCPAN::Types qw(AbsPath); use Types::Standard qw(ArrayRef Bool Str); use Archive::Any; use Carp qw( croak ); -use File::Temp (); -use Path::Class (); +use Path::Tiny qw( path ); use Digest::file qw( digest_file_hex ); =head1 NAME @@ -40,14 +39,14 @@ The Archive will clean up its extraction directory upon destruction. I -The file to be extracted. It will be returned as a Path::Class +The file to be extracted. It will be returned as a Path::Tiny object. =cut has file => ( is => 'ro', - isa => AbsFile, + isa => AbsPath, coerce => 1, required => 1, ); @@ -93,30 +92,29 @@ has file_digest_sha256 => ( ); # Holding the File::Temp::Dir object here is necessary to keep it -# alive until the object is destroyed. Path::Class::Dir will not hold -# onto the ojbect. +# alive until the object is destroyed. has _tempdir => ( is => 'ro', - isa => 'File::Temp::Dir', + isa => AbsPath, init_arg => undef, lazy => 1, default => sub { my $scratch_disk = '/mnt/scratch_disk'; return -d $scratch_disk - ? File::Temp->newdir('/mnt/scratch_disk/tempXXXXX') - : File::Temp->newdir; + ? Path::Tiny->tempdir('/mnt/scratch_disk/tempXXXXX') + : Path::Tiny->tempdir; }, ); has extract_dir => ( is => 'ro', - isa => AbsDir, + isa => AbsPath, lazy => 1, coerce => 1, default => sub { my $self = shift; - return Path::Class::Dir->new( $self->_tempdir ); + return path( $self->_tempdir ); }, ); @@ -155,7 +153,7 @@ has files => ( my $extract_dir = $archive->extract; Extract the archive into a temp directory. The directory will be a -L. +L object. Only the first call to extract will perform the extraction. After that it will just return the extraction directory. If you want to diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index e9b418476..b27f87632 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -11,7 +11,7 @@ use File::Find (); use File::Spec (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model::Archive; -use MetaCPAN::Types qw(AbsFile); +use MetaCPAN::Types qw(AbsPath); use Types::Standard qw(ArrayRef Str); use MetaCPAN::Util qw( fix_version); use Module::Metadata 1.000012 (); # Improved package detection. @@ -62,7 +62,7 @@ has document => ( has file => ( is => 'ro', - isa => AbsFile, + isa => AbsPath, required => 1, coerce => 1, ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 2dc549a2e..9270e300c 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -7,7 +7,7 @@ use FindBin; use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model; -use MetaCPAN::Types qw( Dir ); +use MetaCPAN::Types qw( Path ); use Types::Standard qw( Int Str Bool ); use Mojo::Server; use Term::ANSIColor qw( colored ); @@ -22,7 +22,7 @@ with( 'MetaCPAN::Role::HasConfig', 'MetaCPAN::Role::Fastly', has cpan => ( is => 'ro', - isa => Dir, + isa => Path, lazy => 1, builder => '_build_cpan', coerce => 1, @@ -82,7 +82,7 @@ has port => ( has home => ( is => 'ro', - isa => Dir, + isa => Path, lazy => 1, coerce => 1, default => sub { checkout_root() }, diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 2f1b363e0..c60c8be5a 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -154,7 +154,7 @@ sub author_config { my $fallback = $dates->{$pauseid} ? undef : {}; - my $dir = $self->cpan->subdir( 'authors', + my $dir = $self->cpan->child( 'authors', MetaCPAN::Util::author_dir($pauseid) ); my @files; @@ -162,10 +162,10 @@ sub author_config { # Get the most recent version my ($file) - = sort { $dir->file($b)->stat->mtime <=> $dir->file($a)->stat->mtime } + = sort { $dir->child($b)->stat->mtime <=> $dir->child($a)->stat->mtime } grep {m/author-.*?\.json/} readdir($dh); return $fallback unless ($file); - $file = $dir->file($file); + $file = $dir->child($file); return $fallback if !-e $file; my $mtime = DateTime->from_epoch( epoch => $file->stat->mtime ); diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index 0a54c0aa6..30d54fd2a 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -52,7 +52,7 @@ has _bulk => ( sub _build_cpan_files_list { my $self = shift; - my $ls = $self->cpan->file(qw(indices find-ls.gz)); + my $ls = $self->cpan->child(qw(indices find-ls.gz)); unless ( -e $ls ) { log_error {"File $ls does not exist"}; exit; diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 29fed106f..02a84f10b 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -9,7 +9,7 @@ use DateTime; use IO::Zlib (); use Cpanel::JSON::XS; use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( File ); +use MetaCPAN::Types qw( Path ); use Types::Standard qw( Bool Int Str ); use Moose; use Try::Tiny; @@ -51,7 +51,7 @@ has dry_run => ( has restore => ( is => 'ro', - isa => File, + isa => Path, coerce => 1, documentation => 'Restore a backup', ); @@ -70,8 +70,8 @@ sub run { grep {defined} $self->index->name, $self->type ); - my $file = $self->home->subdir(qw(var backup))->file("$filename.json.gz"); - $file->dir->mkpath unless ( -e $file->dir ); + my $file = $self->home->child( qw(var backup), "$filename.json.gz" ); + $file->parent->mkpath unless ( -e $file->parent ); my $fh = IO::Zlib->new( "$file", 'wb4' ); my $scroll = $es->scroll_helper( @@ -192,8 +192,8 @@ sub run_purge { my $self = shift; my $now = DateTime->now; - $self->home->subdir(qw(var backup))->recurse( - callback => sub { + $self->home->child(qw(var backup))->visit( + sub { my $file = shift; return if ( $file->is_dir ); @@ -212,7 +212,8 @@ sub run_purge { if ( $self->dry_run ); $file->remove; } - } + }, + { recurse => 1 } ); } diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 21da35ab2..1b216feeb 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -9,7 +9,6 @@ use File::Temp qw(tempdir); use File::stat qw(stat); use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( File ); use Types::URI qw( Uri ); use Types::Standard qw( Bool ); use ElasticSearchX::Model::Document::Types qw(ESBulk); @@ -34,9 +33,9 @@ has force_refresh => ( # XXX move path to config has mirror_file => ( is => 'ro', - isa => File, + isa => Path, default => sub { - shift->home->file( 'var', ( $ENV{HARNESS_ACTIVE} ? 't' : () ), + shift->home->child( 'var', ( $ENV{HARNESS_ACTIVE} ? 't' : () ), 'tmp', 'cpantesters.db' ); }, coerce => 1, @@ -63,7 +62,7 @@ has _bulk => ( sub _build_db { my $self = shift; return $ENV{HARNESS_ACTIVE} - ? $self->home->file('t/var/cpantesters-release-fake.db.bz2') + ? $self->home->child('t/var/cpantesters-release-fake.db.bz2') : 'http://devel.cpantesters.org/release/release.db.bz2'; } diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index 05326dd71..3e36a1389 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -23,7 +23,7 @@ sub _build_url { my ($self) = @_; $ENV{HARNESS_ACTIVE} ? 'file:' - . $self->home->file('t/var/cpantesters-release-api-fake.json') + . $self->home->child('t/var/cpantesters-release-api-fake.json') : 'http://api-3.cpantesters.org/v3/release'; } diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 059bbabb3..28c5ad106 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -39,7 +39,8 @@ has force => ( sub _build_packages { return Parse::CPAN::Packages::Fast->new( - shift->cpan->file(qw(modules 02packages.details.txt.gz))->stringify ); + shift->cpan->child(qw(modules 02packages.details.txt.gz)) + ->stringify ); } sub _queue_latest { diff --git a/lib/MetaCPAN/Script/Mirrors.pm b/lib/MetaCPAN/Script/Mirrors.pm index d17e9b310..d27170a83 100644 --- a/lib/MetaCPAN/Script/Mirrors.pm +++ b/lib/MetaCPAN/Script/Mirrors.pm @@ -20,7 +20,7 @@ sub index_mirrors { my $self = shift; log_info { 'Getting mirrors.json file from ' . $self->cpan }; - my $json = $self->cpan->file( 'indices', 'mirrors.json' )->slurp; + my $json = $self->cpan->child( 'indices', 'mirrors.json' )->slurp; my $type = $self->index->type('mirror'); # Clear out everything in the index diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index 432da4892..0c025ffcf 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -31,7 +31,8 @@ sub run { sub _get_02packages_fh { my $self = shift; my $file - = $self->cpan->file(qw(modules 02packages.details.txt.gz))->stringify; + = $self->cpan->child(qw(modules 02packages.details.txt.gz)) + ->stringify; my $fh_uz = IO::Uncompress::Gunzip->new($file); return $fh_uz; } diff --git a/lib/MetaCPAN/Script/Permission.pm b/lib/MetaCPAN/Script/Permission.pm index 898f89773..6d1857e9e 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -31,9 +31,8 @@ sub run { sub index_permissions { my $self = shift; - my $file_path - = $self->cpan->subdir('modules')->file('06perms.txt')->absolute; - my $pp = PAUSE::Permissions->new( path => $file_path ); + my $file_path = $self->cpan->child(qw(modules 06perms.txt))->absolute; + my $pp = PAUSE::Permissions->new( path => $file_path ); my $bulk = $self->es->bulk_helper( index => $self->index->name, diff --git a/lib/MetaCPAN/Script/Queue.pm b/lib/MetaCPAN/Script/Queue.pm index 200a1d457..d7adf9d8d 100644 --- a/lib/MetaCPAN/Script/Queue.pm +++ b/lib/MetaCPAN/Script/Queue.pm @@ -3,20 +3,20 @@ package MetaCPAN::Script::Queue; use strict; use warnings; -use MetaCPAN::Types qw( Dir File ); +use MetaCPAN::Types qw( Path ); use Moose; use Path::Iterator::Rule (); has dir => ( is => 'ro', - isa => Dir, + isa => Path, predicate => '_has_dir', coerce => 1, ); has file => ( is => 'ro', - isa => File, + isa => Path, predicate => '_has_file', coerce => 1, ); diff --git a/lib/MetaCPAN/Script/Ratings.pm b/lib/MetaCPAN/Script/Ratings.pm index 31a665fa8..d886ccf9b 100644 --- a/lib/MetaCPAN/Script/Ratings.pm +++ b/lib/MetaCPAN/Script/Ratings.pm @@ -22,7 +22,7 @@ sub run { log_info { 'Downloading ' . $self->ratings }; my @path = qw( var tmp ratings.csv ); - my $target = $self->home->file(@path); + my $target = $self->home->child(@path); my $md5 = -e $target ? $self->digest($target) : 0; my $res = $self->ua->mirror( $self->ratings, $target ); if ( $md5 eq $self->digest($target) ) { diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 55429a38b..81b392ba7 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -11,7 +11,6 @@ use Log::Contextual qw( :log :dlog ); use MetaCPAN::Util; use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner (); -use MetaCPAN::Types qw( Dir ); use Types::Standard qw( Bool HashRef Int Str ); use Moose; use PerlIO::gzip; @@ -151,7 +150,7 @@ sub run { my $d = CPAN::DistnameInfo->new($_); # XXX move path to config file - my $file = $self->home->file( + my $file = $self->home->child( ( 'var', ( $ENV{HARNESS_ACTIVE} ? 't' : () ), 'tmp', 'http', 'authors' @@ -159,7 +158,7 @@ sub run { MetaCPAN::Util::author_dir( $d->cpanid ), $d->filename, ); - $file->dir->mkpath; + $file->parent->mkpath; log_info {"Downloading $_"}; $self->ua->parse_head(0); @@ -391,7 +390,7 @@ sub import_archive { sub _build_cpan_files_list { my $self = shift; - my $ls = $self->cpan->file(qw(indices find-ls.gz)); + my $ls = $self->cpan->child(qw(indices find-ls.gz)); unless ( -e $ls ) { log_error {"File $ls does not exist"}; exit; @@ -422,7 +421,7 @@ sub detect_status { sub _build_perms { my $self = shift; - my $file = $self->cpan->file(qw(modules 06perms.txt)); + my $file = $self->cpan->child(qw(modules 06perms.txt)); my %authors; if ( -e $file ) { log_debug { "parsing ", $file }; @@ -439,7 +438,7 @@ sub _build_perms { log_warn {"$file could not be found."}; } - my $packages = $self->cpan->file(qw(modules 02packages.details.txt.gz)); + my $packages = $self->cpan->child(qw(modules 02packages.details.txt.gz)); if ( -e $packages ) { log_debug { "parsing ", $packages }; open my $fh, "<:gzip", $packages; diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index f85951837..8dde05787 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -59,7 +59,8 @@ sub changes { for my $segment (@segments) { log_debug {"Loading RECENT-$segment.json"}; my $json - = decode_json( $self->cpan->file("RECENT-$segment.json")->slurp ); + = decode_json( + $self->cpan->child("RECENT-$segment.json")->slurp ); for ( grep { $_->{path} @@ -118,7 +119,7 @@ sub backpan_changes { while ( my $release = $scroll->next ) { my $data = $release->{fields}; my $path - = $self->cpan->file( 'authors', + = $self->cpan->child( 'authors', MetaCPAN::Util::author_dir( $data->{author} ), $data->{archive} ); next if ( -e $path ); @@ -150,7 +151,7 @@ sub skip { sub index_release { my ( $self, $release ) = @_; - my $archive = $self->cpan->file( $release->{path} )->stringify; + my $archive = $self->cpan->child( $release->{path} )->stringify; for ( my $i = 0; $i < 15; $i++ ) { last if ( -e $archive ); log_debug {"Archive $archive does not yet exist"}; diff --git a/lib/MetaCPAN/Server/Model/Source.pm b/lib/MetaCPAN/Server/Model/Source.pm index 91aeb6150..b65727e81 100644 --- a/lib/MetaCPAN/Server/Model/Source.pm +++ b/lib/MetaCPAN/Server/Model/Source.pm @@ -5,23 +5,23 @@ use warnings; use File::Find::Rule (); use MetaCPAN::Model::Archive; -use MetaCPAN::Types qw( Dir ); +use MetaCPAN::Types qw( Path ); use MetaCPAN::Util (); use Moose; -use Path::Class qw(file dir); +use Path::Tiny (); extends 'Catalyst::Model'; has base_dir => ( is => 'ro', - isa => Dir, + isa => Path, coerce => 1, required => 1, ); has cpan => ( is => 'ro', - isa => Dir, + isa => Path, coerce => 1, required => 1, ); @@ -41,20 +41,20 @@ sub COMPONENT { } sub _default_base_dir { - return dir(qw(var tmp source)); + return Path::Tiny::path(qw(var tmp source)); } sub path { my ( $self, $pauseid, $distvname, $file ) = @_; $file ||= q{}; my $base = $self->base_dir; - my $source_dir = dir( $base, $pauseid, $distvname ); + my $source_dir = Path::Tiny::path( $base, $pauseid, $distvname ); my $source = $self->find_file( $source_dir, $file ); return $source if ($source); return if -e $source_dir; # previously extracted, but file does not exist my $author = MetaCPAN::Util::author_dir($pauseid); - my $http = dir( qw(var tmp http authors), $author ); + my $http = Path::Tiny::path( qw(var tmp http authors), $author ); $author = $self->cpan . "/authors/$author"; my ($archive_file) @@ -79,8 +79,7 @@ sub find_file { my ( $self, $dir, $file ) = @_; my ($source) = glob "$dir/*/$file"; # file can be in any subdirectory ($source) ||= glob "$dir/$file"; # file can be in any subdirectory - return undef unless ( $source && -e $source ); - return -d $source ? dir($source) : file($source); + return $source && -e $source ? Path::Tiny::path($source) : undef; } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index 798c69191..6e0a49f21 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -9,7 +9,7 @@ __PACKAGE__->provide_types_from( qw( MooseX::Types::Common::String MooseX::Types::Moose - MooseX::Types::Path::Class::MoreCoercions + MooseX::Types::Path::Tiny MetaCPAN::Types::Internal ) ); diff --git a/t/00_setup.t b/t/00_setup.t index d693eb1dc..f80512cc0 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -14,7 +14,7 @@ use MetaCPAN::TestHelpers qw( ); use MetaCPAN::TestServer (); use Module::Faker 0.015 (); # Generates META.json. -use Path::Class qw(dir file); +use Path::Tiny qw( path ); use Test::More 0.96; use URI::FromHash qw( uri ); diff --git a/t/lib/MetaCPAN/DarkPAN.pm b/t/lib/MetaCPAN/DarkPAN.pm index 3c8364129..0e3dea188 100644 --- a/t/lib/MetaCPAN/DarkPAN.pm +++ b/t/lib/MetaCPAN/DarkPAN.pm @@ -4,16 +4,16 @@ use MetaCPAN::Moose; use CPAN::Repository::Perms; use MetaCPAN::TestHelpers qw( get_config ); -use MetaCPAN::Types qw( Dir ); +use MetaCPAN::Types qw( Path ); use MetaCPAN::Util qw( author_dir ); use OrePAN2::Indexer; use OrePAN2::Injector; -use Path::Class qw( dir ); +use Path::Tiny qw( path ); use URI::FromHash qw( uri_object ); has base_dir => ( is => 'ro', - isa => Dir, + isa => Path, lazy => 1, coerce => 1, default => 't/var/darkpan', @@ -95,7 +95,7 @@ sub _write_06perms { } } - my $modules_dir = $self->base_dir->subdir('modules'); + my $modules_dir = $self->base_dir->child('modules'); $modules_dir->mkpath; my $content = $perms->generate_content; @@ -103,7 +103,7 @@ sub _write_06perms { # work around bug in generate_content() $content =~ s{,f}{,f\n}g; - $modules_dir->file('06perms.txt')->spew($content); + $modules_dir->child('06perms.txt')->spew($content); } __PACKAGE__->meta->make_immutable; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 1a49d7f30..ccb441bf7 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -16,7 +16,7 @@ use MetaCPAN::Script::Permission (); use MetaCPAN::Script::Release (); use MetaCPAN::Server (); use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use MetaCPAN::Types qw( Dir ); +use MetaCPAN::Types qw( Path ); use Types::Standard qw( HashRef Str ); use Search::Elasticsearch; use Search::Elasticsearch::TestServer; @@ -53,7 +53,7 @@ has _es_home => ( has _cpan_dir => ( is => 'ro', - isa => Dir, + isa => Path, init_arg => 'cpan_dir', coerce => 1, default => sub { fakecpan_dir() }, diff --git a/t/model/archive.t b/t/model/archive.t index ef6c6cfe9..9ad4b54bf 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -46,7 +46,7 @@ subtest 'archive extraction' => sub { my $dir = $archive->extract; for my $file ( keys %want ) { - my $content = $dir->file($file)->slurp; + my $content = $dir->child($file)->slurp; if ( ref $want{$file} ) { like $content, $want{$file}, "content of $file"; } @@ -98,13 +98,13 @@ subtest 'set extract dir' => sub { my $dir = $archive->extract_dir; - isa_ok $dir, 'Path::Class::Dir'; + isa_ok $dir, 'Path::Tiny'; is $dir, $temp; is $archive->extract, $temp; - ok -s $dir->file('Some-1.00-TRIAL/META.json'); + ok -s $dir->child('Some-1.00-TRIAL/META.json'); } - ok -e $temp, q[Path::Class doesn't clean up directories it was handed]; + ok -e $temp, q[Path::Tiny doesn't clean up directories it was handed]; }; done_testing; diff --git a/t/model/release/metadata.t b/t/model/release/metadata.t index cc14a1125..9492c9aec 100644 --- a/t/model/release/metadata.t +++ b/t/model/release/metadata.t @@ -42,7 +42,7 @@ foreach my $test ( my $extract_dir = $release->extract; foreach my $file (@$files) { ok( - -e $extract_dir->file( $name, $file ), + -e $extract_dir->child( $name, $file ), "meta file $file exists in $name" ); } From 63bec5fe76307d2d630273d4ecfb864a15038604 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 02:09:29 +0100 Subject: [PATCH 078/725] zap some snapshot --- cpanfile.snapshot | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b76800b70..bb153f1f9 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5510,23 +5510,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - MooseX-Types-Path-Class-MoreCoercions-0.003 - pathname: D/DA/DAGOLDEN/MooseX-Types-Path-Class-MoreCoercions-0.003.tar.gz - provides: - MooseX::Types::Path::Class::MoreCoercions 0.003 - requirements: - ExtUtils::MakeMaker 6.30 - File::Find 0 - File::Temp 0 - File::pushd 0 - Moose 0 - MooseX::Types 0 - MooseX::Types::Path::Class 0 - MooseX::Types::Stringlike 0 - Path::Class 0 - Test::More 0.96 - strict 0 - warnings 0 MooseX-Types-Path-Tiny-0.012 pathname: E/ET/ETHER/MooseX-Types-Path-Tiny-0.012.tar.gz provides: From 841de5d4197709bf699cea2310397b7e1819294c Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 03:08:51 +0100 Subject: [PATCH 079/725] zap MooseX::Types::Common --- cpanfile | 1 - cpanfile.snapshot | 15 --------------- lib/MetaCPAN/Types.pm | 1 - 3 files changed, 17 deletions(-) diff --git a/cpanfile b/cpanfile index 1fd39a580..03d858b79 100644 --- a/cpanfile +++ b/cpanfile @@ -124,7 +124,6 @@ requires 'MooseX::Getopt::Dashes'; requires 'MooseX::Getopt::OptionTypeMap'; requires 'MooseX::StrictConstructor'; requires 'MooseX::Types'; -requires 'MooseX::Types::Common::String'; requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; requires 'MooseX::Types::Path::Tiny'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index bb153f1f9..8538fbc59 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5472,21 +5472,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - MooseX-Types-Common-0.001014 - pathname: E/ET/ETHER/MooseX-Types-Common-0.001014.tar.gz - provides: - MooseX::Types::Common 0.001014 - MooseX::Types::Common::Numeric 0.001014 - MooseX::Types::Common::String 0.001014 - requirements: - Carp 0 - Module::Build::Tiny 0.034 - MooseX::Types 0 - MooseX::Types::Moose 0 - if 0 - perl 5.008 - strict 0 - warnings 0 MooseX-Types-ElasticSearch-0.0.4 pathname: P/PE/PERLER/MooseX-Types-ElasticSearch-0.0.4.tar.gz provides: diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index 6e0a49f21..f57f8bccd 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -7,7 +7,6 @@ use parent 'MooseX::Types::Combine'; __PACKAGE__->provide_types_from( qw( - MooseX::Types::Common::String MooseX::Types::Moose MooseX::Types::Path::Tiny MetaCPAN::Types::Internal From 5f2e97639122a0ea98cfdd5e3b0fe87c6eba2df8 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 03:30:17 +0100 Subject: [PATCH 080/725] add MooseX::Getopt to role using NoGetopt --- lib/MetaCPAN/Role/Logger.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index 34f3fadfe..6386352f6 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -8,6 +8,8 @@ use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; use Path::Tiny qw( path ); +with 'MooseX::Getopt'; # needed else traits => ['NoGetopt'] can blow up + has level => ( is => 'ro', isa => Str, From 82edc9182aba6d5377a49cbffd3d2d9696c23475 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 03:49:05 +0100 Subject: [PATCH 081/725] zap MooseX::Types::Structured --- cpanfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cpanfile b/cpanfile index 03d858b79..b25cf179f 100644 --- a/cpanfile +++ b/cpanfile @@ -127,7 +127,6 @@ requires 'MooseX::Types'; requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; requires 'MooseX::Types::Path::Tiny'; -requires 'MooseX::Types::Structured'; requires 'Mozilla::CA'; requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; From 24d7eef2f49585ccf414fd55126d2d9799fd2481 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 03:52:18 +0100 Subject: [PATCH 082/725] zap MooseX::Types::Moose as type library --- lib/MetaCPAN/Types.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index f57f8bccd..a8d33f938 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -7,7 +7,6 @@ use parent 'MooseX::Types::Combine'; __PACKAGE__->provide_types_from( qw( - MooseX::Types::Moose MooseX::Types::Path::Tiny MetaCPAN::Types::Internal ) From 93b94e4ab2e856f39567d2aace4d0b8855c7e0f3 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 04:00:28 +0100 Subject: [PATCH 083/725] no cache tidyall results as timestamps ruin, rename tidyall.t to middle of pack --- .travis.yml | 1 - t/{02_tidyall.t => fff_tidyall.t} | 0 2 files changed, 1 deletion(-) rename t/{02_tidyall.t => fff_tidyall.t} (100%) diff --git a/.travis.yml b/.travis.yml index b2b7cf8ef..f5b059bcf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,4 +95,3 @@ cache: - local - ~/perl5 - t/var/darkpan - - .tidyall.d # cache tidyall results diff --git a/t/02_tidyall.t b/t/fff_tidyall.t similarity index 100% rename from t/02_tidyall.t rename to t/fff_tidyall.t From 840074b4be50ba847cf1d13ef6ab1410f3f6af32 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sun, 21 Jun 2020 20:26:24 +0100 Subject: [PATCH 084/725] test all script packages at least compile, fix a type import --- lib/MetaCPAN/Script/CPANTesters.pm | 1 + lib/MetaCPAN/Script/Snapshot.pm | 2 +- t/script/load.t | 58 ++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 t/script/load.t diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 1b216feeb..b753b8de2 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -11,6 +11,7 @@ use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); use Types::URI qw( Uri ); use Types::Standard qw( Bool ); +use MetaCPAN::Types qw( Path ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index 575bee663..e485d0598 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -9,7 +9,7 @@ use DateTime::Format::ISO8601 (); use DDP; use HTTP::Tiny (); use Log::Contextual qw( :log ); -use Types::Standard qw( Bool Int Str File ArrayRef ); +use Types::Standard qw( Bool Int Str ArrayRef ); use Moose; use Sys::Hostname qw(hostname); diff --git a/t/script/load.t b/t/script/load.t new file mode 100644 index 000000000..100a48a7e --- /dev/null +++ b/t/script/load.t @@ -0,0 +1,58 @@ +use strict; +use warnings; +use lib 't/lib'; + +use Test::More; + +require MetaCPAN::Script::Author; +require MetaCPAN::Script::Backpan; +require MetaCPAN::Script::Backup; +require MetaCPAN::Script::CPANTesters; +require MetaCPAN::Script::CPANTestersAPI; +require MetaCPAN::Script::Check; +require MetaCPAN::Script::Checksum; +require MetaCPAN::Script::Contributor; +require MetaCPAN::Script::Cover; +require MetaCPAN::Script::External; +require MetaCPAN::Script::Favorite; +require MetaCPAN::Script::First; +require MetaCPAN::Script::Latest; +require MetaCPAN::Script::Mapping; +require MetaCPAN::Script::Mapping::CPAN::Author; +require MetaCPAN::Script::Mapping::CPAN::Distribution; +require MetaCPAN::Script::Mapping::CPAN::Favorite; +require MetaCPAN::Script::Mapping::CPAN::File; +require MetaCPAN::Script::Mapping::CPAN::Mirror; +require MetaCPAN::Script::Mapping::CPAN::Package; +require MetaCPAN::Script::Mapping::CPAN::Permission; +require MetaCPAN::Script::Mapping::CPAN::Rating; +require MetaCPAN::Script::Mapping::CPAN::Release; +require MetaCPAN::Script::Mapping::Contributor; +require MetaCPAN::Script::Mapping::Cover; +require MetaCPAN::Script::Mapping::DeployStatement; +require MetaCPAN::Script::Mapping::User::Account; +require MetaCPAN::Script::Mapping::User::Identity; +require MetaCPAN::Script::Mapping::User::Session; +require MetaCPAN::Script::Mirrors; +require MetaCPAN::Script::Package; +require MetaCPAN::Script::Permission; +require MetaCPAN::Script::Purge; +require MetaCPAN::Script::Queue; +require MetaCPAN::Script::Ratings; +require MetaCPAN::Script::Release; +require MetaCPAN::Script::Restart; +require MetaCPAN::Script::River; +require MetaCPAN::Script::Role::Contributor; +require MetaCPAN::Script::Role::External::Cygwin; +require MetaCPAN::Script::Role::External::Debian; +require MetaCPAN::Script::Role::External::Fedora; +require MetaCPAN::Script::Runner; +require MetaCPAN::Script::Session; +require MetaCPAN::Script::Snapshot; +require MetaCPAN::Script::Suggest; +require MetaCPAN::Script::Tickets; +require MetaCPAN::Script::Watcher; + +pass 'all loaded Ok'; + +done_testing(); From ae1a32bd58bfb65f559ca10e644da1ae1ffb477e Mon Sep 17 00:00:00 2001 From: Ed J Date: Mon, 22 Jun 2020 18:32:34 +0100 Subject: [PATCH 085/725] factor out metacpan-puppet location --- bin/docker-elasticsearch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/docker-elasticsearch b/bin/docker-elasticsearch index 6a8e425ca..5c7060f87 100755 --- a/bin/docker-elasticsearch +++ b/bin/docker-elasticsearch @@ -5,16 +5,17 @@ ES_CONFIG_FILE="$1" ES_CONFIG_DIR="$2" ES_PORT="$3" +PUPPET_SCRIPTS="https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts" sudo mkdir "$ES_CONFIG_DIR" && sudo chmod 777 "$ES_CONFIG_DIR" -sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy +sudo curl -L "$PUPPET_SCRIPTS"/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy -sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy +sudo curl -L "$PUPPET_SCRIPTS"/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy -sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy +sudo curl -L "$PUPPET_SCRIPTS"/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy -sudo curl -L https://github.com/metacpan/metacpan-puppet/raw/master/modules/metacpan_elasticsearch/files/etc/scripts/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy +sudo curl -L "$PUPPET_SCRIPTS"/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy sudo curl -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > "$ES_CONFIG_FILE" From a50a38e2558e5cead6908ce320336e2af4526829 Mon Sep 17 00:00:00 2001 From: Ed J Date: Mon, 22 Jun 2020 18:33:35 +0100 Subject: [PATCH 086/725] zap useless sudo in docker setup --- bin/docker-elasticsearch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/docker-elasticsearch b/bin/docker-elasticsearch index 5c7060f87..d0cc95629 100755 --- a/bin/docker-elasticsearch +++ b/bin/docker-elasticsearch @@ -9,15 +9,15 @@ PUPPET_SCRIPTS="https://github.com/metacpan/metacpan-puppet/raw/master/modules/m%20%20sudo%20mkdir"$ES_CONFIG_DIR" && sudo chmod 777 "$ES_CONFIG_DIR" -sudo curl -L "$PUPPET_SCRIPTS"/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy +curl -L "$PUPPET_SCRIPTS"/prefer_shorter_module_names_100.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_100.groovy -sudo curl -L "$PUPPET_SCRIPTS"/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy +curl -L "$PUPPET_SCRIPTS"/prefer_shorter_module_names_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy -sudo curl -L "$PUPPET_SCRIPTS"/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy +curl -L "$PUPPET_SCRIPTS"/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy -sudo curl -L "$PUPPET_SCRIPTS"/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy +curl -L "$PUPPET_SCRIPTS"/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy -sudo curl -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > "$ES_CONFIG_FILE" +curl -L https://raw.githubusercontent.com/metacpan/metacpan-docker/master/elasticsearch/metacpan.yml > "$ES_CONFIG_FILE" docker pull elasticsearch:2.4-alpine docker run -d -p "$ES_PORT":9200 -v "$ES_CONFIG_FILE":/usr/share/elasticsearch/config/metacpan.yml -v "$ES_CONFIG_DIR":/usr/share/elasticsearch/config/scripts elasticsearch:2.4-alpine From 93f5dafea31d110983b1ca767cd1fd0a200776e4 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 20 Jun 2020 02:16:49 +0100 Subject: [PATCH 087/725] switch to Types::Path::Tiny --- cpanfile | 2 +- cpanfile.snapshot | 28 ---------------------------- lib/MetaCPAN/Model/Archive.pm | 2 +- lib/MetaCPAN/Model/Release.pm | 2 +- lib/MetaCPAN/Role/Script.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 2 +- lib/MetaCPAN/Script/CPANTesters.pm | 2 +- lib/MetaCPAN/Script/Cover.pm | 7 ++----- lib/MetaCPAN/Script/Queue.pm | 2 +- lib/MetaCPAN/Server/Model/Source.pm | 2 +- lib/MetaCPAN/Types.pm | 1 - lib/MetaCPAN/Types/TypeTiny.pm | 14 +++++++++----- t/lib/MetaCPAN/DarkPAN.pm | 2 +- t/lib/MetaCPAN/TestServer.pm | 2 +- 14 files changed, 21 insertions(+), 49 deletions(-) diff --git a/cpanfile b/cpanfile index b25cf179f..7e0390e6f 100644 --- a/cpanfile +++ b/cpanfile @@ -126,7 +126,6 @@ requires 'MooseX::StrictConstructor'; requires 'MooseX::Types'; requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; -requires 'MooseX::Types::Path::Tiny'; requires 'Mozilla::CA'; requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; @@ -169,6 +168,7 @@ requires 'Throwable::Error'; requires 'Time::Local'; requires 'Try::Tiny', '0.24'; requires 'Type::Tiny', '1.002001'; +requires 'Types::Path::Tiny'; requires 'Types::URI'; requires 'URI', '1.71'; requires 'URI::Escape'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 8538fbc59..86260c8f1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5495,34 +5495,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - MooseX-Types-Path-Tiny-0.012 - pathname: E/ET/ETHER/MooseX-Types-Path-Tiny-0.012.tar.gz - provides: - MooseX::Types::Path::Tiny 0.012 - requirements: - Module::Build::Tiny 0.034 - Moose 2 - MooseX::Getopt 0 - MooseX::Types 0 - MooseX::Types::Moose 0 - MooseX::Types::Stringlike 0 - Path::Tiny 0 - if 0 - namespace::autoclean 0 - perl 5.006 - strict 0 - warnings 0 - MooseX-Types-Stringlike-0.003 - pathname: D/DA/DAGOLDEN/MooseX-Types-Stringlike-0.003.tar.gz - provides: - MooseX::Types::Stringlike 0.003 - requirements: - ExtUtils::MakeMaker 6.17 - MooseX::Types 0 - MooseX::Types::Moose 0 - overload 0 - strict 0 - warnings 0 MooseX-Types-Structured-0.36 pathname: E/ET/ETHER/MooseX-Types-Structured-0.36.tar.gz provides: diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index 751613237..8aaf6b25c 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -3,7 +3,7 @@ package MetaCPAN::Model::Archive; use v5.10; use Moose; use MooseX::StrictConstructor; -use MetaCPAN::Types qw(AbsPath); +use MetaCPAN::Types::TypeTiny qw( AbsPath ); use Types::Standard qw(ArrayRef Bool Str); use Archive::Any; diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index b27f87632..7841053c6 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -11,7 +11,7 @@ use File::Find (); use File::Spec (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model::Archive; -use MetaCPAN::Types qw(AbsPath); +use MetaCPAN::Types::TypeTiny qw( AbsPath ); use Types::Standard qw(ArrayRef Str); use MetaCPAN::Util qw( fix_version); use Module::Metadata 1.000012 (); # Improved package detection. diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 9270e300c..5538403d9 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -7,7 +7,7 @@ use FindBin; use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model; -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use Types::Standard qw( Int Str Bool ); use Mojo::Server; use Term::ANSIColor qw( colored ); diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 02a84f10b..6ef040796 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -9,7 +9,7 @@ use DateTime; use IO::Zlib (); use Cpanel::JSON::XS; use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use Types::Standard qw( Bool Int Str ); use Moose; use Try::Tiny; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index b753b8de2..02add9cdb 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -11,7 +11,7 @@ use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); use Types::URI qw( Uri ); use Types::Standard qw( Bool ); -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 3dd003fd5..446fb3740 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -7,7 +7,7 @@ use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use Types::URI qw( Uri ); use Types::Standard qw( Bool Str ); -use Path::Class qw( file ); +use Path::Tiny qw( path ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -106,10 +106,7 @@ sub index_cover_data { sub retrieve_cover_data { my $self = shift; - if ( $self->json_file ) { - my $file = file( $self->json_file ); - return decode_json( $file->slurp ); - } + return decode_json( path( $self->json_file )->slurp ) if $self->json_file; my $url = $self->test ? $self->cover_dev_url : $self->cover_url; diff --git a/lib/MetaCPAN/Script/Queue.pm b/lib/MetaCPAN/Script/Queue.pm index d7adf9d8d..10678587f 100644 --- a/lib/MetaCPAN/Script/Queue.pm +++ b/lib/MetaCPAN/Script/Queue.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Queue; use strict; use warnings; -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use Moose; use Path::Iterator::Rule (); diff --git a/lib/MetaCPAN/Server/Model/Source.pm b/lib/MetaCPAN/Server/Model/Source.pm index b65727e81..6c05c9937 100644 --- a/lib/MetaCPAN/Server/Model/Source.pm +++ b/lib/MetaCPAN/Server/Model/Source.pm @@ -5,7 +5,7 @@ use warnings; use File::Find::Rule (); use MetaCPAN::Model::Archive; -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use MetaCPAN::Util (); use Moose; use Path::Tiny (); diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index a8d33f938..057896611 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -7,7 +7,6 @@ use parent 'MooseX::Types::Combine'; __PACKAGE__->provide_types_from( qw( - MooseX::Types::Path::Tiny MetaCPAN::Types::Internal ) ); diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index 56c2e8cfc..163c0057f 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -3,11 +3,7 @@ package MetaCPAN::Types::TypeTiny; use strict; use warnings; -use Types::Standard qw( - ArrayRef Dict HashRef InstanceOf Int Object Optional Str Value -); -use Path::Class (); -use overload (); +use overload (); use Type::Library -base, -declare => ( qw( @@ -31,6 +27,7 @@ use Type::Library -base, -declare => ( ) ); use Type::Utils -all; +BEGIN { extends qw( Types::Standard Types::Path::Tiny ) } declare Stringable, as Object, where { overload::Method( $_, '""' ) }; @@ -132,4 +129,11 @@ coerce HashRefCPANMeta, from InstanceOf ['CPAN::Meta'], via { return $struct ? $struct : $_->as_struct; }; +# optionally add Getopt option type (adapted from MooseX::Types:Path::Class) +if ( eval { require MooseX::Getopt; 1 } ) { + for my $type ( Path, AbsPath ) { + MooseX::Getopt::OptionTypeMap->add_option_type_to_map( $type, '=s' ); + } +} + 1; diff --git a/t/lib/MetaCPAN/DarkPAN.pm b/t/lib/MetaCPAN/DarkPAN.pm index 0e3dea188..b77889805 100644 --- a/t/lib/MetaCPAN/DarkPAN.pm +++ b/t/lib/MetaCPAN/DarkPAN.pm @@ -4,7 +4,7 @@ use MetaCPAN::Moose; use CPAN::Repository::Perms; use MetaCPAN::TestHelpers qw( get_config ); -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use MetaCPAN::Util qw( author_dir ); use OrePAN2::Indexer; use OrePAN2::Injector; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index ccb441bf7..7918c616f 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -16,7 +16,7 @@ use MetaCPAN::Script::Permission (); use MetaCPAN::Script::Release (); use MetaCPAN::Server (); use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use MetaCPAN::Types qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path ); use Types::Standard qw( HashRef Str ); use Search::Elasticsearch; use Search::Elasticsearch::TestServer; From 417f69f3a430b5fcd2a54d8cc21ec3a47e623e11 Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 23 Jun 2020 10:35:01 +0100 Subject: [PATCH 088/725] Types::Standard -> MetaCPAN::Types::TypeTiny --- lib/Catalyst/Authentication/Store/Proxy.pm | 2 +- lib/MetaCPAN/API/Model/Role/ES.pm | 2 +- lib/MetaCPAN/Document/Author.pm | 7 ++++--- lib/MetaCPAN/Document/Author/Profile.pm | 2 +- lib/MetaCPAN/Document/Contributor.pm | 2 +- lib/MetaCPAN/Document/Cover.pm | 2 +- lib/MetaCPAN/Document/File.pm | 5 +++-- lib/MetaCPAN/Document/Mirror.pm | 2 +- lib/MetaCPAN/Document/Module.pm | 2 +- lib/MetaCPAN/Document/Package.pm | 2 +- lib/MetaCPAN/Document/Permission.pm | 2 +- lib/MetaCPAN/Document/Rating.pm | 2 +- lib/MetaCPAN/Document/Release.pm | 6 ++++-- lib/MetaCPAN/Model/Archive.pm | 3 +-- lib/MetaCPAN/Model/Email/PAUSE.pm | 2 +- lib/MetaCPAN/Model/Release.pm | 3 +-- lib/MetaCPAN/Model/Search.pm | 2 +- lib/MetaCPAN/Model/User/Account.pm | 2 +- lib/MetaCPAN/Model/User/Identity.pm | 2 +- lib/MetaCPAN/Role/HasConfig.pm | 2 +- lib/MetaCPAN/Role/HasRogueDistributions.pm | 2 +- lib/MetaCPAN/Role/Logger.pm | 5 +---- lib/MetaCPAN/Role/Script.pm | 3 +-- lib/MetaCPAN/Script/Backpan.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 3 +-- lib/MetaCPAN/Script/CPANTesters.pm | 3 +-- lib/MetaCPAN/Script/Check.pm | 2 +- lib/MetaCPAN/Script/Checksum.pm | 2 +- lib/MetaCPAN/Script/Contributor.pm | 2 +- lib/MetaCPAN/Script/Cover.pm | 2 +- lib/MetaCPAN/Script/External.pm | 2 +- lib/MetaCPAN/Script/Favorite.pm | 2 +- lib/MetaCPAN/Script/First.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 2 +- lib/MetaCPAN/Script/Mapping.pm | 2 +- lib/MetaCPAN/Script/Package.pm | 2 +- lib/MetaCPAN/Script/Permission.pm | 2 +- lib/MetaCPAN/Script/Purge.pm | 2 +- lib/MetaCPAN/Script/Release.pm | 2 +- lib/MetaCPAN/Script/River.pm | 2 +- lib/MetaCPAN/Script/Role/External/Cygwin.pm | 2 +- lib/MetaCPAN/Script/Role/External/Debian.pm | 2 +- lib/MetaCPAN/Script/Snapshot.pm | 2 +- lib/MetaCPAN/Script/Suggest.pm | 2 +- lib/MetaCPAN/Script/Tickets.pm | 2 +- lib/MetaCPAN/Script/Watcher.pm | 2 +- lib/MetaCPAN/Server/Controller.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/OpenID.pm | 2 +- lib/MetaCPAN/Server/Diff.pm | 2 +- lib/MetaCPAN/Server/QuerySanitizer.pm | 2 +- t/lib/MetaCPAN/TestServer.pm | 3 +-- t/lib/MetaCPAN/Tests/Distribution.pm | 2 +- t/lib/MetaCPAN/Tests/Model.pm | 2 +- t/lib/MetaCPAN/Tests/Release.pm | 2 +- t/model/email/pause.t | 2 +- 55 files changed, 63 insertions(+), 68 deletions(-) diff --git a/lib/Catalyst/Authentication/Store/Proxy.pm b/lib/Catalyst/Authentication/Store/Proxy.pm index 4e9afdab9..1e701b31b 100644 --- a/lib/Catalyst/Authentication/Store/Proxy.pm +++ b/lib/Catalyst/Authentication/Store/Proxy.pm @@ -3,7 +3,7 @@ package Catalyst::Authentication::Store::Proxy; # ABSTRACT: Delegates authentication logic to the user object use Moose; use Catalyst::Utils; -use Types::Standard qw( HashRef Str ); +use MetaCPAN::Types::TypeTiny qw( HashRef Str ); has user_class => ( is => 'ro', diff --git a/lib/MetaCPAN/API/Model/Role/ES.pm b/lib/MetaCPAN/API/Model/Role/ES.pm index e287d629c..080b0e079 100644 --- a/lib/MetaCPAN/API/Model/Role/ES.pm +++ b/lib/MetaCPAN/API/Model/Role/ES.pm @@ -2,7 +2,7 @@ package MetaCPAN::API::Model::Role::ES; use Moose::Role; -use Types::Standard qw( Object ); +use MetaCPAN::Types::TypeTiny qw( Object ); has es => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 943a1eaef..0526c91be 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -9,9 +9,10 @@ use ElasticSearchX::Model::Document; # load order not important use Gravatar::URL (); use MetaCPAN::Types qw(Profile); -use MetaCPAN::Types::TypeTiny - qw(ArrayRefPromote Blog NonEmptySimpleStr PerlMongers); -use Types::Standard qw(ArrayRef Bool Dict HashRef Str Tuple Optional); +use MetaCPAN::Types::TypeTiny qw( + ArrayRefPromote Blog NonEmptySimpleStr PerlMongers + ArrayRef Bool Dict HashRef Str Tuple Optional +); use MetaCPAN::Util; has name => ( diff --git a/lib/MetaCPAN/Document/Author/Profile.pm b/lib/MetaCPAN/Document/Author/Profile.pm index 9415d588d..70132dffe 100644 --- a/lib/MetaCPAN/Document/Author/Profile.pm +++ b/lib/MetaCPAN/Document/Author/Profile.pm @@ -9,7 +9,7 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; use MetaCPAN::Util; -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Contributor.pm b/lib/MetaCPAN/Document/Contributor.pm index 1cab8b44e..826bebcf9 100644 --- a/lib/MetaCPAN/Document/Contributor.pm +++ b/lib/MetaCPAN/Document/Contributor.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Contributor; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); has distribution => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Cover.pm b/lib/MetaCPAN/Document/Cover.pm index 353695e32..1ab9a5991 100644 --- a/lib/MetaCPAN/Document/Cover.pm +++ b/lib/MetaCPAN/Document/Cover.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Cover; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use Types::Standard qw( HashRef Str ); +use MetaCPAN::Types::TypeTiny qw( HashRef Str ); has distribution => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 1888f20b1..04a88be13 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -11,8 +11,9 @@ use Encode; use List::AllUtils qw( any ); use MetaCPAN::Document::Module; use MetaCPAN::Types qw(Module); -use MetaCPAN::Types::TypeTiny qw(Stat); -use Types::Standard qw(ArrayRef Bool Int Maybe Num ScalarRef Str); +use MetaCPAN::Types::TypeTiny qw( + Stat ArrayRef Bool Int Maybe Num ScalarRef Str +); use MetaCPAN::Util qw(numify_version); use Plack::MIME; use Pod::Text; diff --git a/lib/MetaCPAN/Document/Mirror.pm b/lib/MetaCPAN/Document/Mirror.pm index 201d718c2..0526285f0 100644 --- a/lib/MetaCPAN/Document/Mirror.pm +++ b/lib/MetaCPAN/Document/Mirror.pm @@ -7,7 +7,7 @@ use Moose; use ElasticSearchX::Model::Document::Types qw( Location ); use ElasticSearchX::Model::Document; -use Types::Standard qw( Dict Str ); +use MetaCPAN::Types::TypeTiny qw( Dict Str ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Module.pm b/lib/MetaCPAN/Document/Module.pm index 9addccc5e..3bb286b66 100644 --- a/lib/MetaCPAN/Document/Module.pm +++ b/lib/MetaCPAN/Document/Module.pm @@ -8,7 +8,7 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; -use Types::Standard qw( Bool Maybe Num Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Maybe Num Str ); use MetaCPAN::Util; =head1 SYNOPSIS diff --git a/lib/MetaCPAN/Document/Package.pm b/lib/MetaCPAN/Document/Package.pm index ae1f57e2e..e5ee7bf9f 100644 --- a/lib/MetaCPAN/Document/Package.pm +++ b/lib/MetaCPAN/Document/Package.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Package; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); has module_name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Permission.pm b/lib/MetaCPAN/Document/Permission.pm index ee021e76c..b72524dfd 100644 --- a/lib/MetaCPAN/Document/Permission.pm +++ b/lib/MetaCPAN/Document/Permission.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Permission; use MetaCPAN::Moose; use ElasticSearchX::Model::Document; -use Types::Standard qw( ArrayRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Str ); has module_name => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Rating.pm b/lib/MetaCPAN/Document/Rating.pm index 6481f4efb..10d8559ef 100644 --- a/lib/MetaCPAN/Document/Rating.pm +++ b/lib/MetaCPAN/Document/Rating.pm @@ -7,7 +7,7 @@ use Moose; use ElasticSearchX::Model::Document::Types qw(:all); use ElasticSearchX::Model::Document; -use Types::Standard qw( ArrayRef Bool Dict Num Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Dict Num Str ); has details => ( is => 'ro', diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index 5641bd6bf..a6e89470a 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -9,8 +9,10 @@ use Ref::Util qw(); use ElasticSearchX::Model::Document; use MetaCPAN::Types qw(Dependency); -use MetaCPAN::Types::TypeTiny qw(HashRefCPANMeta Resources Stat Tests); -use Types::Standard qw(ArrayRef Bool Num Str); +use MetaCPAN::Types::TypeTiny qw( + HashRefCPANMeta Resources Stat Tests + ArrayRef Bool Num Str +); use MetaCPAN::Util qw( numify_version ); =head1 PROPERTIES diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index 8aaf6b25c..b85093e65 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -3,8 +3,7 @@ package MetaCPAN::Model::Archive; use v5.10; use Moose; use MooseX::StrictConstructor; -use MetaCPAN::Types::TypeTiny qw( AbsPath ); -use Types::Standard qw(ArrayRef Bool Str); +use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Bool Str ); use Archive::Any; use Carp qw( croak ); diff --git a/lib/MetaCPAN/Model/Email/PAUSE.pm b/lib/MetaCPAN/Model/Email/PAUSE.pm index 8aa6dc71b..76b70a248 100644 --- a/lib/MetaCPAN/Model/Email/PAUSE.pm +++ b/lib/MetaCPAN/Model/Email/PAUSE.pm @@ -7,7 +7,7 @@ use Email::Sender::Transport::SMTP (); use Email::Simple (); use Encode (); use Types::URI qw( Uri ); -use Types::Standard qw( Object ); +use MetaCPAN::Types::TypeTiny qw( Object ); use Try::Tiny qw( catch try ); with('MetaCPAN::Role::HasConfig'); diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index 7841053c6..5b811f741 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -11,8 +11,7 @@ use File::Find (); use File::Spec (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model::Archive; -use MetaCPAN::Types::TypeTiny qw( AbsPath ); -use Types::Standard qw(ArrayRef Str); +use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Str ); use MetaCPAN::Util qw( fix_version); use Module::Metadata 1.000012 (); # Improved package detection. use MooseX::StrictConstructor; diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index 0b51d0bc8..a67adac47 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -7,7 +7,7 @@ use Cpanel::JSON::XS (); use Hash::Merge qw( merge ); use List::Util qw( min uniq ); use Log::Contextual qw( :log :dlog ); -use Types::Standard qw( Object Str ); +use MetaCPAN::Types::TypeTiny qw( Object Str ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); use MooseX::StrictConstructor; diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index a3a39322a..9298dbed1 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -8,7 +8,7 @@ use ElasticSearchX::Model::Document; use MetaCPAN::Model::User::Identity; use MetaCPAN::Types qw(Identity); -use Types::Standard qw(ArrayRef Bool Dict Str); +use MetaCPAN::Types::TypeTiny qw(ArrayRef Bool Dict Str); use MetaCPAN::Util; =head1 PROPERTIES diff --git a/lib/MetaCPAN/Model/User/Identity.pm b/lib/MetaCPAN/Model/User/Identity.pm index 331d93fd4..6236b31a2 100644 --- a/lib/MetaCPAN/Model/User/Identity.pm +++ b/lib/MetaCPAN/Model/User/Identity.pm @@ -5,7 +5,7 @@ use warnings; use Moose; use ElasticSearchX::Model::Document; -use Types::Standard qw( HashRef ); +use MetaCPAN::Types::TypeTiny qw( HashRef ); has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index a08d25467..cc1957c8e 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -4,7 +4,7 @@ use Moose::Role; use FindBin; use Config::ZOMG (); -use Types::Standard qw(HashRef); +use MetaCPAN::Types::TypeTiny qw(HashRef); use Module::Runtime qw( require_module ); # Done like this so can be required by a role diff --git a/lib/MetaCPAN/Role/HasRogueDistributions.pm b/lib/MetaCPAN/Role/HasRogueDistributions.pm index 8dfd48dab..d4fd12041 100644 --- a/lib/MetaCPAN/Role/HasRogueDistributions.pm +++ b/lib/MetaCPAN/Role/HasRogueDistributions.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::HasRogueDistributions; use Moose::Role; -use Types::Standard qw( ArrayRef ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef ); has rogue_distributions => ( is => 'ro', diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index 6386352f6..19d671cf8 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,14 +2,11 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; -use MetaCPAN::Types::TypeTiny qw(Logger); -use Types::Standard qw(Str); +use MetaCPAN::Types::TypeTiny qw(Logger Str); use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; use Path::Tiny qw( path ); -with 'MooseX::Getopt'; # needed else traits => ['NoGetopt'] can blow up - has level => ( is => 'ro', isa => Str, diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 5538403d9..01094fd7e 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -7,8 +7,7 @@ use FindBin; use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model; -use MetaCPAN::Types::TypeTiny qw( Path ); -use Types::Standard qw( Int Str Bool ); +use MetaCPAN::Types::TypeTiny qw( Path Int Str Bool ); use Mojo::Server; use Term::ANSIColor qw( colored ); use IO::Interactive qw( is_interactive ); diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index 30d54fd2a..48add915c 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -7,7 +7,7 @@ use Moose; use Log::Contextual qw( :log :dlog ); use BackPAN::Index; -use Types::Standard qw( Bool HashRef Str ); +use MetaCPAN::Types::TypeTiny qw( Bool HashRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 6ef040796..4d083259e 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -9,8 +9,7 @@ use DateTime; use IO::Zlib (); use Cpanel::JSON::XS; use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types::TypeTiny qw( Path ); -use Types::Standard qw( Bool Int Str ); +use MetaCPAN::Types::TypeTiny qw( Path Bool Int Str ); use Moose; use Try::Tiny; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 02add9cdb..934b252f3 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -10,8 +10,7 @@ use File::stat qw(stat); use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); use Types::URI qw( Uri ); -use Types::Standard qw( Bool ); -use MetaCPAN::Types::TypeTiny qw( Path ); +use MetaCPAN::Types::TypeTiny qw( Path Bool ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index 6f068bd05..31c09ee4b 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -6,7 +6,7 @@ use warnings; use File::Spec::Functions qw(catfile); use Log::Contextual qw( :log ); use Moose; -use Types::Standard qw( Bool Int Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 5690f9a62..18104b419 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Checksum; use Moose; use Log::Contextual qw( :log ); -use Types::Standard qw( Bool Int ); +use MetaCPAN::Types::TypeTiny qw( Bool Int ); use Digest::file qw( digest_file_hex ); diff --git a/lib/MetaCPAN/Script/Contributor.pm b/lib/MetaCPAN/Script/Contributor.pm index a51da4230..3d9aa69ba 100644 --- a/lib/MetaCPAN/Script/Contributor.pm +++ b/lib/MetaCPAN/Script/Contributor.pm @@ -8,7 +8,7 @@ use Moose; use Log::Contextual qw( :log ); use Ref::Util qw( is_arrayref ); -use Types::Standard qw( Bool HashRef Int Str ); +use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt', 'MetaCPAN::Script::Role::Contributor'; diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 446fb3740..719655344 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use Types::URI qw( Uri ); -use Types::Standard qw( Bool Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Str ); use Path::Tiny qw( path ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/External.pm b/lib/MetaCPAN/Script/External.pm index 0ff8ae0df..c1a9220a1 100644 --- a/lib/MetaCPAN/Script/External.pm +++ b/lib/MetaCPAN/Script/External.pm @@ -7,7 +7,7 @@ use Email::Sender::Simple (); use Email::Simple (); use Log::Contextual qw( :log ); -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt', 'MetaCPAN::Script::Role::External::Cygwin', diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index 658fb7274..076b2689e 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -4,7 +4,7 @@ use Moose; use Log::Contextual qw( :log ); -use Types::Standard qw( Bool Int Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/First.pm b/lib/MetaCPAN/Script/First.pm index a0c69a574..2ec9475bd 100644 --- a/lib/MetaCPAN/Script/First.pm +++ b/lib/MetaCPAN/Script/First.pm @@ -5,7 +5,7 @@ use warnings; use Log::Contextual qw( :log ); use Moose; -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 28c5ad106..c5504141b 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -9,7 +9,7 @@ use MooseX::Aliases; use Parse::CPAN::Packages::Fast; use Regexp::Common qw(time); use Time::Local; -use Types::Standard qw( Bool Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index a5a2fd4a2..e8eb50408 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -20,7 +20,7 @@ use MetaCPAN::Script::Mapping::User::Identity (); use MetaCPAN::Script::Mapping::User::Session (); use MetaCPAN::Script::Mapping::Contributor (); use MetaCPAN::Script::Mapping::Cover (); -use Types::Standard qw( Bool Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Str ); use constant { EXPECTED => 1, diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index 0c025ffcf..c85a4e86b 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -6,7 +6,7 @@ use CPAN::DistnameInfo (); use IO::Uncompress::Gunzip (); use Log::Contextual qw( :log ); use MetaCPAN::Document::Package (); -use Types::Standard qw( Bool ); +use MetaCPAN::Types::TypeTiny qw( Bool ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Permission.pm b/lib/MetaCPAN/Script/Permission.pm index 6d1857e9e..006c60240 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -4,7 +4,7 @@ use Moose; use Log::Contextual qw( :log ); use MetaCPAN::Document::Permission (); -use Types::Standard qw( Bool ); +use MetaCPAN::Types::TypeTiny qw( Bool ); use PAUSE::Permissions (); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index 29b6428ec..980dfca67 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Purge; use Moose; use Log::Contextual qw( :log ); -use Types::Standard qw( Bool Str HashRef ); +use MetaCPAN::Types::TypeTiny qw( Bool Str HashRef ); use MetaCPAN::Util qw( author_dir ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 81b392ba7..f2d1b54c2 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -11,7 +11,7 @@ use Log::Contextual qw( :log :dlog ); use MetaCPAN::Util; use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner (); -use Types::Standard qw( Bool HashRef Int Str ); +use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); use Moose; use PerlIO::gzip; use Try::Tiny qw( catch try ); diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index 7f584785d..86e56a0be 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use Types::URI qw( Uri ); -use Types::Standard qw( ArrayRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Role/External/Cygwin.pm b/lib/MetaCPAN/Script/Role/External/Cygwin.pm index e7c2691ec..26f870eef 100644 --- a/lib/MetaCPAN/Script/Role/External/Cygwin.pm +++ b/lib/MetaCPAN/Script/Role/External/Cygwin.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use List::Util qw( shuffle ); use Log::Contextual qw( :log ); -use Types::Standard qw( ArrayRef Int ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Int ); has mirrors => ( is => 'ro', diff --git a/lib/MetaCPAN/Script/Role/External/Debian.pm b/lib/MetaCPAN/Script/Role/External/Debian.pm index b7c478fff..14fdfef72 100644 --- a/lib/MetaCPAN/Script/Role/External/Debian.pm +++ b/lib/MetaCPAN/Script/Role/External/Debian.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use CPAN::DistnameInfo (); use DBI (); -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); has _host_regex => ( is => 'ro', diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index e485d0598..49eb3a89d 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -9,7 +9,7 @@ use DateTime::Format::ISO8601 (); use DDP; use HTTP::Tiny (); use Log::Contextual qw( :log ); -use Types::Standard qw( Bool Int Str ArrayRef ); +use MetaCPAN::Types::TypeTiny qw( Bool Int Str ArrayRef ); use Moose; use Sys::Hostname qw(hostname); diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index a8dc8a552..7ae5b9a4c 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -7,7 +7,7 @@ use Moose; use DateTime (); use Log::Contextual qw( :log ); -use Types::Standard qw( Bool Int ); +use MetaCPAN::Types::TypeTiny qw( Bool Int ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index f30b2df16..a7ff38b43 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -17,7 +17,7 @@ use Moose; use Parse::CSV; use Pithub; use URI::Escape qw(uri_escape); -use Types::Standard qw( ArrayRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Str ); use Ref::Util qw( is_ref is_hashref); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index 8dde05787..ab84af910 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -8,7 +8,7 @@ use CPAN::DistnameInfo; use Cpanel::JSON::XS; use Log::Contextual qw( :log ); use MetaCPAN::Util; -use Types::Standard qw( Bool ); +use MetaCPAN::Types::TypeTiny qw( Bool ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 58087378f..47fc93d21 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -8,7 +8,7 @@ use Cpanel::JSON::XS; use List::MoreUtils (); use Moose::Util (); use Moose; -use Types::Standard qw( HashRef ); +use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'Catalyst::Controller'; } diff --git a/lib/MetaCPAN/Server/Controller/Login/OpenID.pm b/lib/MetaCPAN/Server/Controller/Login/OpenID.pm index 3c1e34713..25ed5d11d 100644 --- a/lib/MetaCPAN/Server/Controller/Login/OpenID.pm +++ b/lib/MetaCPAN/Server/Controller/Login/OpenID.pm @@ -7,7 +7,7 @@ use Moose; use Net::OpenID::Consumer; use LWP::UserAgent::Paranoid; use MooseX::ClassAttribute; -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); BEGIN { extends 'MetaCPAN::Server::Controller::Login' } diff --git a/lib/MetaCPAN/Server/Diff.pm b/lib/MetaCPAN/Server/Diff.pm index e4f9ec131..b075bec51 100644 --- a/lib/MetaCPAN/Server/Diff.pm +++ b/lib/MetaCPAN/Server/Diff.pm @@ -6,7 +6,7 @@ use Moose; use Encoding::FixLatin (); use IPC::Run3; -use Types::Standard qw( ArrayRef ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef ); use File::Spec; has git => ( diff --git a/lib/MetaCPAN/Server/QuerySanitizer.pm b/lib/MetaCPAN/Server/QuerySanitizer.pm index ffcdff32d..e54adedb2 100644 --- a/lib/MetaCPAN/Server/QuerySanitizer.pm +++ b/lib/MetaCPAN/Server/QuerySanitizer.pm @@ -4,7 +4,7 @@ use strict; use warnings; use Moose; -use Types::Standard qw( HashRef Maybe ); +use MetaCPAN::Types::TypeTiny qw( HashRef Maybe ); has query => ( is => 'ro', diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 7918c616f..c54c1fd2f 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -16,8 +16,7 @@ use MetaCPAN::Script::Permission (); use MetaCPAN::Script::Release (); use MetaCPAN::Server (); use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use MetaCPAN::Types::TypeTiny qw( Path ); -use Types::Standard qw( HashRef Str ); +use MetaCPAN::Types::TypeTiny qw( Path HashRef Str ); use Search::Elasticsearch; use Search::Elasticsearch::TestServer; use Test::More; diff --git a/t/lib/MetaCPAN/Tests/Distribution.pm b/t/lib/MetaCPAN/Tests/Distribution.pm index 9f3308279..62a9d329a 100644 --- a/t/lib/MetaCPAN/Tests/Distribution.pm +++ b/t/lib/MetaCPAN/Tests/Distribution.pm @@ -2,7 +2,7 @@ package MetaCPAN::Tests::Distribution; use Test::Routine; use Test::More; use version; -use Types::Standard qw( Str ); +use MetaCPAN::Types::TypeTiny qw( Str ); with qw( MetaCPAN::Tests::Model diff --git a/t/lib/MetaCPAN/Tests/Model.pm b/t/lib/MetaCPAN/Tests/Model.pm index cc9d59d86..863ccb3b8 100644 --- a/t/lib/MetaCPAN/Tests/Model.pm +++ b/t/lib/MetaCPAN/Tests/Model.pm @@ -3,7 +3,7 @@ package MetaCPAN::Tests::Model; use Test::Routine; use MetaCPAN::Server::Test (); -use Types::Standard qw( ArrayRef HashRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRef Str ); use Test::More; use Try::Tiny qw( catch try ); diff --git a/t/lib/MetaCPAN/Tests/Release.pm b/t/lib/MetaCPAN/Tests/Release.pm index eeb14fd54..f7b526b09 100644 --- a/t/lib/MetaCPAN/Tests/Release.pm +++ b/t/lib/MetaCPAN/Tests/Release.pm @@ -8,7 +8,7 @@ use HTTP::Request::Common; use List::Util (); use MetaCPAN::TestApp; use Test::More; -use Types::Standard qw( ArrayRef HashRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRef Str ); with( 'MetaCPAN::Tests::Model', 'MetaCPAN::Tests::Role::HasApp' ); diff --git a/t/model/email/pause.t b/t/model/email/pause.t index bd65c85f2..34929249c 100644 --- a/t/model/email/pause.t +++ b/t/model/email/pause.t @@ -6,7 +6,7 @@ package Author; use MetaCPAN::Moose; -use Types::Standard qw( ArrayRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Str ); has name => ( is => 'ro', From b5231f7122d788812b895dfd2bdcd9779defd77d Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 23 Jun 2020 10:40:00 +0100 Subject: [PATCH 089/725] Types::URI -> MetaCPAN::Types::TypeTiny --- lib/MetaCPAN/Model/Email/PAUSE.pm | 3 +-- lib/MetaCPAN/Pod/Renderer.pm | 2 +- lib/MetaCPAN/Script/CPANTesters.pm | 3 +-- lib/MetaCPAN/Script/CPANTestersAPI.pm | 2 +- lib/MetaCPAN/Script/Cover.pm | 3 +-- lib/MetaCPAN/Script/River.pm | 3 +-- lib/MetaCPAN/Types/TypeTiny.pm | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/MetaCPAN/Model/Email/PAUSE.pm b/lib/MetaCPAN/Model/Email/PAUSE.pm index 76b70a248..17e66e33e 100644 --- a/lib/MetaCPAN/Model/Email/PAUSE.pm +++ b/lib/MetaCPAN/Model/Email/PAUSE.pm @@ -6,8 +6,7 @@ use Email::Sender::Simple qw( sendmail ); use Email::Sender::Transport::SMTP (); use Email::Simple (); use Encode (); -use Types::URI qw( Uri ); -use MetaCPAN::Types::TypeTiny qw( Object ); +use MetaCPAN::Types::TypeTiny qw( Object Uri ); use Try::Tiny qw( catch try ); with('MetaCPAN::Role::HasConfig'); diff --git a/lib/MetaCPAN/Pod/Renderer.pm b/lib/MetaCPAN/Pod/Renderer.pm index 62e3a392c..00b6bfcb2 100644 --- a/lib/MetaCPAN/Pod/Renderer.pm +++ b/lib/MetaCPAN/Pod/Renderer.pm @@ -3,7 +3,7 @@ package MetaCPAN::Pod::Renderer; use MetaCPAN::Moose; use MetaCPAN::Pod::XHTML; -use Types::URI qw( Uri ); +use MetaCPAN::Types::TypeTiny qw( Uri ); use Pod::Markdown; use Pod::POM; use Pod::POM::View::Pod; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 934b252f3..994efbf33 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -9,8 +9,7 @@ use File::Temp qw(tempdir); use File::stat qw(stat); use IO::Uncompress::Bunzip2 qw(bunzip2); use Log::Contextual qw( :log :dlog ); -use Types::URI qw( Uri ); -use MetaCPAN::Types::TypeTiny qw( Path Bool ); +use MetaCPAN::Types::TypeTiny qw( Path Bool Uri ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index 3e36a1389..843ed019f 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -5,7 +5,7 @@ use warnings; use Log::Contextual qw( :log :dlog ); use Cpanel::JSON::XS qw( decode_json ); -use Types::URI qw( Uri ); +use MetaCPAN::Types::TypeTiny qw( Uri ); use ElasticSearchX::Model::Document::Types qw(ESBulk); use Moose; diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 719655344..1dd2223ca 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -5,8 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use Types::URI qw( Uri ); -use MetaCPAN::Types::TypeTiny qw( Bool Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); use Path::Tiny qw( path ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index 86e56a0be..c69aa79bd 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -5,8 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use Types::URI qw( Uri ); -use MetaCPAN::Types::TypeTiny qw( ArrayRef Str ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Str Uri ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index 163c0057f..7e8e852ca 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -27,7 +27,7 @@ use Type::Library -base, -declare => ( ) ); use Type::Utils -all; -BEGIN { extends qw( Types::Standard Types::Path::Tiny ) } +BEGIN { extends qw( Types::Standard Types::Path::Tiny Types::URI ) } declare Stringable, as Object, where { overload::Method( $_, '""' ) }; From 42295e5dae3c144021b16ff7a8b0f1b6e43cfead Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 23 Jun 2020 10:47:01 +0100 Subject: [PATCH 090/725] Types::Common::String not roll own --- lib/MetaCPAN/Types/TypeTiny.pm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index 7e8e852ca..a932a8b41 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -8,8 +8,6 @@ use overload (); use Type::Library -base, -declare => ( qw( Stringable - SimpleStr - NonEmptySimpleStr ArrayRefPromote PerlMongers @@ -27,19 +25,14 @@ use Type::Library -base, -declare => ( ) ); use Type::Utils -all; -BEGIN { extends qw( Types::Standard Types::Path::Tiny Types::URI ) } -declare Stringable, as Object, where { overload::Method( $_, '""' ) }; - -declare SimpleStr, as Str, - where { ( length($_) <= 255 ) && ( $_ !~ m/\n/ ) }, - message {"Must be a single line of no more than 255 chars"}, - ; +BEGIN { + extends qw( + Types::Standard Types::Path::Tiny Types::URI Types::Common::String + ); +} -declare NonEmptySimpleStr, as SimpleStr, - where { length($_) > 0 }, - message {"Must be a non-empty single line of no more than 255 chars"}, - ; +declare Stringable, as Object, where { overload::Method( $_, '""' ) }; declare ArrayRefPromote, as ArrayRef; coerce ArrayRefPromote, from Value, via { [$_] }; From 9de228461d8960972442bb961db150d2f1d841b4 Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 23 Jun 2020 10:50:46 +0100 Subject: [PATCH 091/725] zap unused Stringable --- lib/MetaCPAN/Types/TypeTiny.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index a932a8b41..59f52e596 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -3,11 +3,8 @@ package MetaCPAN::Types::TypeTiny; use strict; use warnings; -use overload (); - use Type::Library -base, -declare => ( qw( - Stringable ArrayRefPromote PerlMongers @@ -32,8 +29,6 @@ BEGIN { ); } -declare Stringable, as Object, where { overload::Method( $_, '""' ) }; - declare ArrayRefPromote, as ArrayRef; coerce ArrayRefPromote, from Value, via { [$_] }; From 489f378e5f33eb17d83891d915926d21a5ef8523 Mon Sep 17 00:00:00 2001 From: Ed J Date: Tue, 23 Jun 2020 11:16:36 +0100 Subject: [PATCH 092/725] enable Travis coverage as separate job --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index f5b059bcf..b2baa9d87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,12 @@ env: matrix: - CPAN_RESOLVER=metadb PERL_CARTON_PATH=$HOME/no-snapshot HARNESS_VERBOSE=1 - CPAN_RESOLVER=snapshot BUILD_DOCKER=yes + - CPAN_RESOLVER=snapshot BUILD_DOCKER=yes COVERAGE=1 # separate because slow matrix: allow_failures: - env: CPAN_RESOLVER=metadb PERL_CARTON_PATH=$HOME/no-snapshot HARNESS_VERBOSE=1 + - env: CPAN_RESOLVER=snapshot BUILD_DOCKER=yes COVERAGE=1 fast_finish: true addons: @@ -59,6 +61,9 @@ install: before_script: - bin/wait-for-open http://$ES_TEST/ + - if [ -n "$COVERAGE" ] && [ "$COVERAGE" != 0 ]; then AUTHOR_TESTING=0 cpm install -L $PERL_CARTON_PATH --workers $(test-jobs) Devel::Cover; fi + - AUTHOR_TESTING=0 cpm install -L $PERL_CARTON_PATH --resolver $CPAN_RESOLVER --workers $(test-jobs) || (tail -n 500 -f ~/.perl-cpm/build.log; false) + - cpan-install --coverage # puts Devel::Cover in normal Perl libs so next works - coverage-setup script: From 5a5584b52b0860be36168d09ece0a495f65ae7ca Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 26 Jun 2020 11:18:21 -0400 Subject: [PATCH 093/725] Create SECURITY.md --- SECURITY.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..0d2aab4de --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| `master` branch | :white_check_mark: | + +## Reporting a Vulnerability + +Please report all vulnerabilities by sending an email to noc@metacpan.org From c56e6d632ce9b56f5f786db2b042961c7b390398 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Sun, 28 Jun 2020 14:56:34 -0400 Subject: [PATCH 094/725] Show prereqs files on release page if present --- lib/MetaCPAN/Query/File.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index d09fe0a46..d49b0490e 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -104,6 +104,8 @@ my %special_files = ( Makefile.PL alienfile cpanfile + prereqs.json + prereqs.yml dist.ini minil.toml ) From 5fb4a8916423940fe7a8971c2deaa69fdcadd065 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Jun 2020 18:20:51 -0400 Subject: [PATCH 095/725] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..e140cb066 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,51 @@ +name: "Code scanning - action" + +on: + push: + pull_request: + schedule: + - cron: '0 12 * * 5' + +jobs: + CodeQL-Build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + # Override language selection by uncommenting this and choosing your languages + # with: + # languages: go, javascript, csharp, python, cpp, java + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 7f95c11e5cee6984348116d3d0dff7a02e344b69 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Jun 2020 10:59:09 -0400 Subject: [PATCH 096/725] Add .circleci/config.yml --- .circleci/config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..01c267cc2 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,13 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference +version: 2.1 +# Use a package of configuration called an orb. +orbs: + # Declare a dependency on the welcome-orb + welcome: circleci/welcome-orb@0.4.1 +# Orchestrate or schedule a set of jobs +workflows: + # Name the workflow "welcome" + welcome: + # Run the welcome/run job in its own container + jobs: + - welcome/run \ No newline at end of file From d2894788d2c354c99621e0393341c591e0088f44 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 30 Jun 2020 11:44:40 -0400 Subject: [PATCH 097/725] Delete codeql config as this currently doesn't recognize any languages --- .github/workflows/codeql-analysis.yml | 51 --------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index e140cb066..000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: "Code scanning - action" - -on: - push: - pull_request: - schedule: - - cron: '0 12 * * 5' - -jobs: - CodeQL-Build: - - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - # Override language selection by uncommenting this and choosing your languages - # with: - # languages: go, javascript, csharp, python, cpp, java - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 From 0dbdc2349f72ecbc34e9ebb7eeb441f4fa910bd0 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 14 Jul 2020 18:23:58 +0200 Subject: [PATCH 098/725] fix total in recent favorites output --- lib/MetaCPAN/Query/Favorite.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index 4630a83fa..33149a3ca 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -158,14 +158,13 @@ sub recent { sort => [ { 'date' => { order => 'desc' } } ] } ); - return {} unless $favs->{hits}{total}; my @favs = map { $_->{_source} } @{ $favs->{hits}{hits} }; return +{ favorites => \@favs, took => $favs->{took}, - total => $favs->{total} + total => $favs->{hits}{total} }; } From 04fa772f839ba4622b5bdc2df5fbe9924a6203e1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 16 Jul 2020 17:05:26 +0200 Subject: [PATCH 099/725] return normal structures even when there are 0 results from queries --- lib/MetaCPAN/Model/Search.pm | 1 - lib/MetaCPAN/Query/Favorite.pm | 7 ++++++- lib/MetaCPAN/Query/File.pm | 1 - lib/MetaCPAN/Query/Mirror.pm | 1 - lib/MetaCPAN/Query/Package.pm | 1 - lib/MetaCPAN/Query/Permission.pm | 5 ++--- lib/MetaCPAN/Query/Rating.pm | 1 - lib/MetaCPAN/Query/Release.pm | 13 ------------- 8 files changed, 8 insertions(+), 22 deletions(-) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index a67adac47..e26a93223 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -47,7 +47,6 @@ sub search_for_first_result { my ( $self, $search_term ) = @_; my $es_query = $self->build_query($search_term); my $es_results = $self->run_query( file => $es_query ); - return unless $es_results->{hits}{total}; my $data = $es_results->{hits}{hits}[0]; single_valued_arrayref_to_scalar( $data->{fields} ); diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index 4630a83fa..7dfbeb33d 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -8,7 +8,12 @@ with 'MetaCPAN::Query::Role::Common'; sub agg_by_distributions { my ( $self, $distributions, $user ) = @_; - return unless $distributions; + return { + favorites => {}, + myfavorites => {}, + took => 0, + } + unless $distributions; my $body = { size => 0, diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index d49b0490e..aabea5aaf 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -37,7 +37,6 @@ sub dir { body => $body, } ); - return unless $data->{hits}{total}; my $dir = [ map { $_->{fields} } @{ $data->{hits}{hits} } ]; single_valued_arrayref_to_scalar($dir); diff --git a/lib/MetaCPAN/Query/Mirror.pm b/lib/MetaCPAN/Query/Mirror.pm index ce3d4588a..05fc28ec1 100644 --- a/lib/MetaCPAN/Query/Mirror.pm +++ b/lib/MetaCPAN/Query/Mirror.pm @@ -53,7 +53,6 @@ sub search { @sort, }, ); - return unless $ret->{hits}{total}; my $data = [ map +{ diff --git a/lib/MetaCPAN/Query/Package.pm b/lib/MetaCPAN/Query/Package.pm index c218e1b57..9ea50d8a6 100644 --- a/lib/MetaCPAN/Query/Package.pm +++ b/lib/MetaCPAN/Query/Package.pm @@ -28,7 +28,6 @@ sub get_modules { } ); - return unless $res->{hits}{total}; return +{ modules => [ map { $_->{_source}{module_name} } @{ $res->{hits}{hits} } ] }; } diff --git a/lib/MetaCPAN/Query/Permission.pm b/lib/MetaCPAN/Query/Permission.pm index af5ebba08..5fe315446 100644 --- a/lib/MetaCPAN/Query/Permission.pm +++ b/lib/MetaCPAN/Query/Permission.pm @@ -26,7 +26,6 @@ sub by_author { type => 'permission', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ sort { $a->{module_name} cmp $b->{module_name} } @@ -42,7 +41,8 @@ sub by_modules { my @modules = map +{ term => { module_name => $_ } }, grep defined, @{$modules}; - return unless @modules; + return { permissions => [] } + unless @modules; my $body = { query => { @@ -56,7 +56,6 @@ sub by_modules { type => 'permission', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ sort { $a->{module_name} cmp $b->{module_name} } diff --git a/lib/MetaCPAN/Query/Rating.pm b/lib/MetaCPAN/Query/Rating.pm index b803c09f4..346970058 100644 --- a/lib/MetaCPAN/Query/Rating.pm +++ b/lib/MetaCPAN/Query/Rating.pm @@ -31,7 +31,6 @@ sub by_distributions { type => 'rating', body => $body, ); - return unless $ret->{hits}{total}; my %distributions = map { $_->{key} => $_->{ratings_dist} } @{ $ret->{aggregations}{ratings}{buckets} }; diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 25c0888d0..e264457d6 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -364,7 +364,6 @@ sub by_author_and_name { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = $ret->{hits}{hits}[0]{_source}; single_valued_arrayref_to_scalar($data); @@ -412,7 +411,6 @@ sub by_author_and_names { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my @releases; for my $hit ( @{ $ret->{hits}{hits} } ) { @@ -454,7 +452,6 @@ sub by_author { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; single_valued_arrayref_to_scalar($data); @@ -491,7 +488,6 @@ sub latest_by_distribution { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = $ret->{hits}{hits}[0]{_source}; single_valued_arrayref_to_scalar($data); @@ -526,7 +522,6 @@ sub latest_by_author { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; single_valued_arrayref_to_scalar($data); @@ -553,7 +548,6 @@ sub all_by_author { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; single_valued_arrayref_to_scalar($data); @@ -583,7 +577,6 @@ sub versions { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; single_valued_arrayref_to_scalar($data); @@ -676,7 +669,6 @@ sub requires { sort => [$sort], } ); - return {} unless $ret->{hits}{total}; return +{ data => [ map { $_->{_source} } @{ $ret->{hits}{hits} } ], @@ -718,7 +710,6 @@ sub _get_latest_release { fields => [qw< name author >], }, ); - return unless $release->{hits}{total}; my ($release_info) = map { $_->{fields} } @{ $release->{hits}{hits} }; single_valued_arrayref_to_scalar($release_info); @@ -749,7 +740,6 @@ sub _get_provided_modules { size => 999, } ); - return unless $provided_modules->{hits}{total}; return [ map { $_->{name} } @@ -805,7 +795,6 @@ sub _get_depended_releases { sort => $sort, } ); - return unless $depended->{hits}{total}; return +{ data => [ map { $_->{_source} } @{ $depended->{hits}{hits} } ], @@ -858,7 +847,6 @@ sub recent { type => 'release', body => $body, ); - return unless $ret->{hits}{total}; my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; single_valued_arrayref_to_scalar($data); @@ -950,7 +938,6 @@ sub modules { type => 'file', body => $body, ); - return unless $ret->{hits}{total}; my @files = map +{ %{ ( single_valued_arrayref_to_scalar( $_->{fields} ) )[0] }, From 02b778ec86c286af68d473e2cf75ad8be388b0fe Mon Sep 17 00:00:00 2001 From: zoidbergwill Date: Mon, 20 Jul 2020 13:02:58 +0200 Subject: [PATCH 100/725] Don't send people to the wiki then back out Since the current link is to https://github.com/metacpan/metacpan-api/wiki/API-docs which sends you back to `docs/` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7785e3063..b82439dea 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ REST API MetaCPAN is based on Elasticsearch, so it provides a RESTful interface as well as the option to create complex queries. [The -wiki](https://github.com/metacpan/metacpan-api/wiki/API-docs) provides a good +`docs/` directory](https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md) provides a good starting point for REST access to MetaCPAN. Expanding Your Author Info From eb2a30f0d536af5e99b3b696ee4b6bc34dd25155 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 2 Aug 2020 06:09:58 +0200 Subject: [PATCH 101/725] block /release/recent with page number too high --- lib/MetaCPAN/Query/Release.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index e264457d6..41d43f631 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -806,6 +806,15 @@ sub _get_depended_releases { sub recent { my ( $self, $page, $page_size, $type ) = @_; my $query; + my $from = ( $page - 1 ) * $page_size; + + if ( $from + $page_size > 10000 ) { + return { + releases => [], + total => 0, + took => 0, + }; + } if ( $type eq 'n' ) { $query = { @@ -836,7 +845,7 @@ sub recent { my $body = { size => $page_size, - from => ( $page - 1 ) * $page_size, + from => $from, query => $query, fields => [qw(name author status abstract date distribution)], sort => [ { 'date' => { order => 'desc' } } ] From d783da279c0adeb352bf8939cbc1e5b120e6d4fe Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 17 Aug 2020 12:34:41 -0400 Subject: [PATCH 102/725] s/gitnub/github --- lib/MetaCPAN/API.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/API.pm b/lib/MetaCPAN/API.pm index 09f08c0ca..8ba2c2e1b 100644 --- a/lib/MetaCPAN/API.pm +++ b/lib/MetaCPAN/API.pm @@ -215,7 +215,7 @@ sub _set_up_oauth_routes { $c->session( is_logged_in => 1 ); $c->session( github_username => $username ); if ( $self->_is_admin($username) ) { - $c->session( gitnub_username => $username ); + $c->session( github_username => $username ); $c->redirect_to('/admin'); return; } From 57ac38accd5a8e336cae777a1d4d6581c17fef13 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 20:38:46 -0400 Subject: [PATCH 103/725] Drop OpenID logic I don't think we have supported this for a number of years. --- cpanfile | 2 - .../Server/Controller/Login/OpenID.pm | 93 --------------- metacpan_server.conf | 4 - t/server/controller/login/openid.t | 110 ------------------ 4 files changed, 209 deletions(-) delete mode 100644 lib/MetaCPAN/Server/Controller/Login/OpenID.pm delete mode 100644 t/server/controller/login/openid.t diff --git a/cpanfile b/cpanfile index 7e0390e6f..9ec29419a 100644 --- a/cpanfile +++ b/cpanfile @@ -130,7 +130,6 @@ requires 'Mozilla::CA'; requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; requires 'Net::Fastly', '1.05'; -requires 'Net::OpenID::Consumer'; requires 'Net::Twitter', '4.01010'; requires 'OrePAN2'; requires 'Parse::CPAN::Packages::Fast', '0.09'; @@ -193,7 +192,6 @@ requires 'Plack::Test::Agent'; requires 'Test::Code::TidyAll'; requires 'Test::More', '0.99'; requires 'Test::Most'; -requires 'Test::OpenID::Server', '0.03'; requires 'Test::Perl::Critic'; requires 'Test::RequiresInternet'; requires 'Test::Routine', '0.012'; diff --git a/lib/MetaCPAN/Server/Controller/Login/OpenID.pm b/lib/MetaCPAN/Server/Controller/Login/OpenID.pm deleted file mode 100644 index 25ed5d11d..000000000 --- a/lib/MetaCPAN/Server/Controller/Login/OpenID.pm +++ /dev/null @@ -1,93 +0,0 @@ -package MetaCPAN::Server::Controller::Login::OpenID; - -use strict; -use warnings; - -use Moose; -use Net::OpenID::Consumer; -use LWP::UserAgent::Paranoid; -use MooseX::ClassAttribute; -use MetaCPAN::Types::TypeTiny qw( Str ); - -BEGIN { extends 'MetaCPAN::Server::Controller::Login' } - -class_has '_ua' => ( - is => 'ro', - isa => 'LWP::UserAgent::Paranoid', - lazy => 1, - builder => '_build_ua', -); - -sub _build_ua { - LWP::UserAgent::Paranoid->new( - protocols_allowed => [ 'http', 'https' ], - request_timeout => 10, - resolver => Net::DNS::Paranoid->new(), - ); -} - -has 'sreg' => ( - is => 'ro', - isa => Str, - default => 'http://openid.net/extensions/sreg/1.1', -); - -sub index : Path { - my ( $self, $c ) = @_; - my $claimed_uri = $c->req->params->{openid_identifier}; - my $csr = Net::OpenID::Consumer->new( - ua => $self->_ua, - required_root => $c->uri_for(q{/}), - args => $c->req->params, - consumer_secret => - $c->config->{'Controller::Login::OpenID'}->{secret_key}, - assoc_options => [ - max_encrypt => 1, - session_no_encrypt_https => 1, - ], - ); - if ($claimed_uri) { - if ( my $claimed_identity = $csr->claimed_identity("$claimed_uri") ) { - $claimed_identity->set_extension_args( - $self->sreg, - { - optional => 'email,fullname', - }, - ); - - my $check_url = $claimed_identity->check_url( - return_to => $c->uri_for( $self->action_for('index') ), - trust_root => $c->uri_for(q{/}), - delayed_return => 1, - ); - - $c->res->redirect($check_url); - } - else { - $c->controller('OAuth2')->redirect( $c, error => $csr->err ); - } - } - - if ( $c->req->params->{'openid.mode'} ) { - if ( $csr->setup_needed and my $setup_url = $csr->user_setup_url ) { - $c->res->redirect($setup_url); - } - elsif ( $csr->user_cancel ) { - $c->controller('OAuth2') - ->redirect( $c, error => 'access denied' ); - } - elsif ( my $vident = $csr->verified_identity ) { - my $user_data = $vident->signed_extension_fields( $self->sreg ); - $self->update_user( - $c, - openid => $vident->url, - $user_data, - ); - } - else { - $c->controller('OAuth2')->redirect( $c, error => $csr->err ); - } - } -} - -1; diff --git a/metacpan_server.conf b/metacpan_server.conf index 714c402c2..fda5a3485 100644 --- a/metacpan_server.conf +++ b/metacpan_server.conf @@ -7,10 +7,6 @@ minion_dsn = postgresql:///minion_queue private_key 59125ffc09413eed3f2a2c07a37c7a44b95633e2 - - secret_key 8225b1874fdc431cedb1cf7d454a92b8fde3a5e6 - - host smtp.fastmail.com port 465 diff --git a/t/server/controller/login/openid.t b/t/server/controller/login/openid.t deleted file mode 100644 index 4e43648f1..000000000 --- a/t/server/controller/login/openid.t +++ /dev/null @@ -1,110 +0,0 @@ -use strict; -use warnings; -use lib 't/lib'; -use utf8; - -package # Test::Routine's run_me (in main) doesn't mix well with Test::Aggregate. - t::server::controller::login::openid; - -use Cpanel::JSON::XS qw( decode_json ); -use MetaCPAN::Server::Test; -use Test::More; -use Test::OpenID::Server; -use Test::Routine; -use Test::Routine::Util; - -with 'MetaCPAN::Tests::UserAgent'; - -BEGIN { - $SIG{__WARN__} = sub { - my $msg = shift; - return if $msg =~ m{NEXT}; - warn $msg; - }; -} - -my $openid_server = Test::OpenID::Server->new; -my $url = $openid_server->started_ok('start server'); - -sub fix_localhost_uri { - my $uri = shift; - - # The dev vm make it localhost, but on travis it becomes `.localdomain`. - $uri =~ s{^(\w+://localhost)\.localdomain([:/])}{$1$2}; - $uri; -} - -test authorization => sub { - my $self = shift; - - # Set client_id to get cookie. - my %params = ( - openid_identifier => "$url/test", - client_id => 'metacpan.dev', - ); - my $uri_params = URI->new; - $uri_params->query_form(%params); - - ok( $self->request( GET '/login/openid?' . $uri_params->query ), - 'login with test URL' ); - - like fix_localhost_uri( $self->redirect_uri ), - qr{\Q$url\E/openid.server}, 'get correct OpenID server url'; - - $self->follow_redirect; - - like $self->redirect_uri, - qr{/login/openid .+ openid\.mode}x, - 'returns to openid controller'; - - $self->follow_redirect; - - my $authed_uri = $self->redirect_uri; - my %authed_params = $authed_uri->query_form; - - is $authed_params{$_}, $params{$_}, "preserved $_ param" - for sort keys %params; - - is $authed_uri->path, '/oauth2/authorize', - 'redirect to internal oauth provider'; - - $self->follow_redirect; - - my $final_url = $self->redirect_uri; - - is $final_url->host_port, 'localhost:5001', - 'final redirect goes to web ui'; - is $final_url->path, '/login', 'login to ui'; - ok { $final_url->query_form }->{code}, 'request has code param'; -}; - -test unknown_provider => sub { - my $self = shift; - my $res; - - ok( - $res - = $self->cb->( - GET "/login/openid?openid_identifier=$url/unknown" ), - 'get unknown ID page' - ); - my $body = decode_json( $res->content ); - like( $body->{error}, qr/no_identity_server/, - 'get descriptive error for unknown ID' ); -}; - -test_psgi app, sub { - my $cb = shift; - require MetaCPAN::Server::Controller::Login::OpenID; - - MetaCPAN::Server::Controller::Login::OpenID->_ua->resolver - ->whitelisted_hosts( [ 'localhost', '127.0.0.1' ] ); - - run_me( - { - cb => $cb, - } - ); -}; - -done_testing(); From 025c1b4c213bff0c11ff1dcdd0a851cbd12be4ab Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 20:39:11 -0400 Subject: [PATCH 104/725] Simplify wait-for-es.sh script --- wait-for-es.sh | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/wait-for-es.sh b/wait-for-es.sh index f1dc822f0..af83001a9 100755 --- a/wait-for-es.sh +++ b/wait-for-es.sh @@ -3,40 +3,36 @@ # Courtesy of @fxdgear # https://github.com/elastic/elasticsearch-py/issues/778#issuecomment-384389668 -set -e +set -ux host="$1" -shift -cmd="$@" - - -until $(curl --output /dev/null --silent --head --fail "$host"); do - printf '.' - sleep 1 -done -# First wait for ES to start... -response=$(curl $host) +while true; do + response=$(curl --write-out '%{http_code}' --silent --fail --output /dev/null "$host") + if [[ "$response" -eq "200" ]]; then + break + fi -until [ "$response" = "200" ]; do - response=$(curl --write-out %{http_code} --silent --output /dev/null "$host") - >&2 echo "Elastic Search is unavailable - sleeping" + echo "Elastic Search is unavailable - sleeping" >&2 sleep 1 done +# set -e now because it was causing the curl command above to exit the script +# if the server was not available +set -e -# Wait for ES status to turn to yellow. -# TODO: Ideally we'd be waiting for green, but we need multiple nodes for that. - -health="$(curl -fsSL "$host/_cat/health?h=status")" -health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") - -until [ "$health" = 'yellow' ]; do +while true; do + ## Wait for ES status to turn to yellow. + ## TODO: Ideally we'd be waiting for green, but we need multiple nodes for that. health="$(curl -fsSL "$host/_cat/health?h=status")" - health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") - >&2 echo "Elastic Search is unavailable ($health) - sleeping" + health="$(echo "$health" | xargs)" # trim whitespace (otherwise we'll have "green ") + if [[ $health == 'yellow' || $health == 'green' ]]; then + break + fi + echo "Elastic Search is unavailable ($health) - sleeping" >&2 sleep 1 done ->&2 echo "Elastic Search is up" -exec $cmd +echo "Elastic Search is up" >&2 +shift +exec "$@" From 377ce4d5e4f924e62298fac36f3a7620558cd59b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 20:41:28 -0400 Subject: [PATCH 105/725] Test docker-compose via CircleCI --- .circleci/config.yml | 62 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01c267cc2..5ef4d798f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,63 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 # Use a package of configuration called an orb. -orbs: - # Declare a dependency on the welcome-orb - welcome: circleci/welcome-orb@0.4.1 # Orchestrate or schedule a set of jobs workflows: - # Name the workflow "welcome" - welcome: + docker-compose: # Run the welcome/run job in its own container jobs: - - welcome/run \ No newline at end of file + - build-and-test +jobs: + build-and-test: + machine: true + steps: + - run: + name: Install Docker Compose + command: | + set -x + curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose + sudo chmod +x ~/docker-compose + - run: + command: > + git clone https://github.com/metacpan/metacpan-docker.git && + cd metacpan-docker && + git checkout -b oalders/api-test origin/oalders/api-test + name: metacpan-docker checkout + - run: + command: > + pushd metacpan-docker && + ./bin/metacpan-docker init + name: clone missing repositories + - run: + command: > + pushd metacpan-docker/src/metacpan-api && + git checkout -b ${CIRCLE_BRANCH} origin/${CIRCLE_BRANCH} + name: metacpan-api checkout + - run: + command: > + pushd metacpan-docker && + ~/docker-compose build --build-arg CPM_ARGS='--with-test' api_test + name: compose build + - run: + command: > + pushd metacpan-docker && + ./bin/metacpan-docker init && + ~/docker-compose --verbose up -d api_test + name: compose up + - run: + command: > + pushd metacpan-docker/src/metacpan-api && + ./wait-for-es.sh http://localhost:9200 + name: wait for ES + - run: + command: > + pushd metacpan-docker && + ~/docker-compose exec -T api_test prove -lvr t + - run: + command: > + pushd metacpan-docker && + ~/docker-compose logs && + docker stats --no-stream && + docker ps -a | head + name: docker-compose logs + when: on_fail From b67d6f723263d1216b90c0c18cac705d076b4888 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 20:41:50 -0400 Subject: [PATCH 106/725] Make cpanfile compliant with Perl linter --- cpanfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpanfile b/cpanfile index 9ec29419a..75dabfa98 100644 --- a/cpanfile +++ b/cpanfile @@ -1,3 +1,6 @@ +use strict; +use warnings; + requires 'perl', '5.010'; requires 'Archive::Any', '0.0942'; From 2b9446c687be8148bc41dcc80a51137fd1d71427 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 21:14:57 -0400 Subject: [PATCH 107/725] Switch to main metacpan-docker branch --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ef4d798f..50c3e11b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,10 +18,9 @@ jobs: curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose sudo chmod +x ~/docker-compose - run: - command: > - git clone https://github.com/metacpan/metacpan-docker.git && - cd metacpan-docker && - git checkout -b oalders/api-test origin/oalders/api-test + command: | + git clone https://github.com/metacpan/metacpan-docker.git + cd metacpan-docker name: metacpan-docker checkout - run: command: > From a1fdb55d686a4b6ed7f2161f7d9fc0a97d072fe1 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 21:15:16 -0400 Subject: [PATCH 108/725] Update YAML syntax in CircleCI config --- .circleci/config.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50c3e11b9..8c98a70c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,40 +23,40 @@ jobs: cd metacpan-docker name: metacpan-docker checkout - run: - command: > - pushd metacpan-docker && + command: | + pushd metacpan-docker ./bin/metacpan-docker init name: clone missing repositories - run: - command: > - pushd metacpan-docker/src/metacpan-api && + command: | + pushd metacpan-docker/src/metacpan-api git checkout -b ${CIRCLE_BRANCH} origin/${CIRCLE_BRANCH} name: metacpan-api checkout - run: - command: > - pushd metacpan-docker && + command: | + pushd metacpan-docker ~/docker-compose build --build-arg CPM_ARGS='--with-test' api_test name: compose build - run: - command: > - pushd metacpan-docker && - ./bin/metacpan-docker init && + command: | + pushd metacpan-docker + ./bin/metacpan-docker init ~/docker-compose --verbose up -d api_test name: compose up - run: - command: > - pushd metacpan-docker/src/metacpan-api && + command: | + pushd metacpan-docker/src/metacpan-api ./wait-for-es.sh http://localhost:9200 name: wait for ES - run: - command: > - pushd metacpan-docker && + command: | + pushd metacpan-docker ~/docker-compose exec -T api_test prove -lvr t - run: - command: > - pushd metacpan-docker && - ~/docker-compose logs && - docker stats --no-stream && + command: | + pushd metacpan-docker + ~/docker-compose logs + docker stats --no-stream docker ps -a | head name: docker-compose logs when: on_fail From 8d1e1a029ac3bbca411569fd42eacf9d8901450b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 26 Aug 2020 21:23:01 -0400 Subject: [PATCH 109/725] Be explicit about using a medium CircleCI resource class https://circleci.com/docs/2.0/configuration-reference/#resource_class This should have 2 vCPUs --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c98a70c4..964904817 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ workflows: jobs: build-and-test: machine: true + resource_class: medium steps: - run: name: Install Docker Compose @@ -51,7 +52,7 @@ jobs: - run: command: | pushd metacpan-docker - ~/docker-compose exec -T api_test prove -lvr t + ~/docker-compose exec -T api_test prove -lr --jobs 2 t - run: command: | pushd metacpan-docker From a3c81df2ef711a6375b6f75899064e7a03640ed8 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 10 Oct 2020 16:32:00 +0100 Subject: [PATCH 110/725] fix git error in CircleCI config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 964904817..2d2b9e9fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: - run: command: | pushd metacpan-docker/src/metacpan-api - git checkout -b ${CIRCLE_BRANCH} origin/${CIRCLE_BRANCH} + git checkout ${CIRCLE_BRANCH} name: metacpan-api checkout - run: command: | From 8fc0ac065db2b16c2ce9ff9406d314994e9a9dca Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Mon, 19 Oct 2020 10:27:59 +0200 Subject: [PATCH 111/725] GH#927 Add plain mode + version filter to release/versions endpoint This commit adds support for two new parameters to the release/versions endpoint. Examples: https://fastapi.metacpan.org/v1/release/versions/perl?plain=1 https://fastapi.metacpan.org/v1/release/versions/perl?versions=5.26.0,5.30.1 https://fastapi.metacpan.org/v1/release/versions/perl?plain=1&versions=5.26.0,5.30.1 --- lib/MetaCPAN/Query/Release.pm | 21 +++++++++++++++++++-- lib/MetaCPAN/Server/Controller/Release.pm | 14 +++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 41d43f631..fd851fcef 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -560,11 +560,28 @@ sub all_by_author { } sub versions { - my ( $self, $dist ) = @_; + my ( $self, $dist, $versions ) = @_; my $size = $dist eq 'perl' ? 1000 : 250; + + my $query; + + if ( @{$versions} ) { + $query = { + bool => { + must => [ + { term => { distribution => $dist } }, + { terms => { version => $versions } }, + ] + } + }; + } + else { + $query = { term => { distribution => $dist } }; + } + my $body = { - query => { term => { distribution => $dist } }, + query => $query, size => $size, sort => [ { date => 'desc' } ], fields => [ diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index 44c2f3003..e277fbff1 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -86,9 +86,21 @@ sub all_by_author : Path('all_by_author') : Args(1) { sub versions : Path('versions') : Args(1) { my ( $self, $c, $dist ) = @_; + my %params = %{ $c->req->params }{qw( plain versions )}; $c->add_dist_key($dist); $c->cdn_max_age('1y'); - $c->stash_or_detach( $self->model($c)->versions($dist) ); + my $data = $self->model($c) + ->versions( $dist, [ split /,/, $params{versions} || '' ] ); + + if ( $params{plain} ) { + my $data = join "\n", + map { join "\t", @{$_}{qw/ version download_url /} } + @{ $data->{releases} }; + $c->res->body($data); + } + else { + $c->stash_or_detach($data); + } } sub top_uploaders : Path('top_uploaders') : Args() { From a5d522f3872cd70ee4460bc1d4f27090bc986174 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 22 Oct 2020 00:21:03 +0200 Subject: [PATCH 112/725] added support for 'latest' in versions param of release/versions/DIST When using versions (CSV) you can use 'latest' as a valid verison number to refer to the release marked with 'status=latest' Examples: https://fastapi.metacpan.org/v1/release/versions/perl?versions=latest https://fastapi.metacpan.org/v1/release/versions/perl?versions=5.26.0,latest --- lib/MetaCPAN/Query/Release.pm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index fd851fcef..31162d33e 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -566,12 +566,39 @@ sub versions { my $query; + # 'versions' param was sent if ( @{$versions} ) { + my $filter_versions; + + # we only want 'latest' version + if ( @{$versions} == 1 and $versions->[0] eq 'latest' ) { + $filter_versions = { term => { status => 'latest' } }; + } + else { + if ( grep $_ eq 'latest', @{$versions} ) { + + # we want a combination of 'latest' and specific versions + @{$versions} = grep $_ ne 'latest', @{$versions}; + $filter_versions = { + bool => { + should => [ + { terms => { version => $versions } }, + { term => { status => 'latest' } }, + ], + } + }; + } + else { + # we only want specific versions + $filter_versions = { terms => { version => $versions } }; + } + } + $query = { bool => { must => [ - { term => { distribution => $dist } }, - { terms => { version => $versions } }, + { term => { distribution => $dist } }, + $filter_versions ] } }; From b84963e99837f4500f43e16378840b99a6486721 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 22 Oct 2020 09:11:46 +0200 Subject: [PATCH 113/725] Added tests for versions & plain params inc. 'latest' support --- t/server/controller/release.t | 37 +++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/t/server/controller/release.t b/t/server/controller/release.t index ce37ef511..03541d25f 100644 --- a/t/server/controller/release.t +++ b/t/server/controller/release.t @@ -53,7 +53,7 @@ test_psgi app, sub { ); # versions (/release/versions/DIST) - get_json_ok( + my $versions = get_json_ok( $cb, '/release/versions/Moose', 'GET /release/versions/Moose', @@ -61,6 +61,40 @@ test_psgi app, sub { # ??? } ); + is( @{ $versions->{releases} }, 2, "Got 2 Moose versions (all)" ); + + # versions - specific (/release/versions/DIST?versions=VERSION) + my $versions_specific = get_json_ok( + $cb, + '/release/versions/Moose?versions=0.01', + 'GET /release/versions/Moose?versions=0.01', + { + # ??? + } + ); + is( @{ $versions_specific->{releases} }, + 1, "Got 1 Moose version (specificly requested)" ); + + # versions - latest (/release/versions/DIST?versions=latest) + my $versions_latest = get_json_ok( + $cb, + '/release/versions/Moose?versions=latest', + 'GET /release/versions/Moose?versions=latest', + { + # ??? + } + ); + is( @{ $versions_latest->{releases} }, + 1, "Got 1 Moose version (only latest requested)" ); + is( $versions_latest->{releases}[0]{status}, + 'latest', "Release status is latest" ); + + # versions - plain (/release/versions/DIST?plain=1) + ok( my $versions_plain = $cb->( GET '/release/versions/Moose?plain=1' ), + 'GET /release/versions/Moose?plain=1' ); + is( $versions_plain->code, 200, 'code 200' ); + ok( $versions_plain->content =~ /\A .+ \t .+ \n .+ \t .+ \z/xsm, + 'Content is plain text result' ); # latest_by_distribution (/release/latest_by_distribution/DIST) get_json_ok( @@ -74,4 +108,3 @@ test_psgi app, sub { }; done_testing; - From 0294d390f5efc03d27bbc5c423dacc740a3c3f68 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 14:42:29 -0500 Subject: [PATCH 114/725] Use docker-compose exec when waiting for Elasticsearch --- .circleci/config.yml | 2 +- wait-for-es.sh | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2d2b9e9fe..03b9d6dbb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,7 +47,7 @@ jobs: - run: command: | pushd metacpan-docker/src/metacpan-api - ./wait-for-es.sh http://localhost:9200 + ./wait-for-es.sh elasticsearch_test http://localhost:9200 name: wait for ES - run: command: | diff --git a/wait-for-es.sh b/wait-for-es.sh index af83001a9..9458c9735 100755 --- a/wait-for-es.sh +++ b/wait-for-es.sh @@ -5,10 +5,13 @@ set -ux -host="$1" +container="$1" +host="$2" + +preamble="docker-compose exec $container" while true; do - response=$(curl --write-out '%{http_code}' --silent --fail --output /dev/null "$host") + response=$($preamble curl --write-out '%{http_code}' --silent --fail --output /dev/null "$host") if [[ "$response" -eq "200" ]]; then break fi @@ -24,9 +27,8 @@ set -e while true; do ## Wait for ES status to turn to yellow. ## TODO: Ideally we'd be waiting for green, but we need multiple nodes for that. - health="$(curl -fsSL "$host/_cat/health?h=status")" - health="$(echo "$health" | xargs)" # trim whitespace (otherwise we'll have "green ") - if [[ $health == 'yellow' || $health == 'green' ]]; then + health=$($preamble curl -fsSL "$host/_cat/health?format=JSON" | jq '.[0].status == "yellow" or .[0].status == "green"') + if [[ $health == 'true' ]]; then break fi echo "Elastic Search is unavailable ($health) - sleeping" >&2 @@ -34,5 +36,4 @@ while true; do done echo "Elastic Search is up" >&2 -shift -exec "$@" +exit 0 From 1322b650d634869dfee6979d4c904d67686fcbb4 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 15:36:31 -0500 Subject: [PATCH 115/725] Install jq for wait-for-es.sh --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 06620575e..138e7d90e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /metacpan-api # size of the images. RUN mkdir /CPAN \ && apt-get update \ - && apt-get install -y --no-install-recommends rsync=3.1.3-6 \ + && apt-get install -y --no-install-recommends rsync=3.1.3-6 jq \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && cpm install --global \ From 9a5d28af19e554d70c970d2f83f242cc87cc9210 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 15:37:13 -0500 Subject: [PATCH 116/725] Set a maximum number of Elasticsearch checks --- .circleci/config.yml | 2 +- wait-for-es.sh | 30 +++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 03b9d6dbb..882101698 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,7 +47,7 @@ jobs: - run: command: | pushd metacpan-docker/src/metacpan-api - ./wait-for-es.sh elasticsearch_test http://localhost:9200 + ./wait-for-es.sh http://localhost:9200 elasticsearch_test -- name: wait for ES - run: command: | diff --git a/wait-for-es.sh b/wait-for-es.sh index 9458c9735..47cdb4d7b 100755 --- a/wait-for-es.sh +++ b/wait-for-es.sh @@ -5,13 +5,18 @@ set -ux -container="$1" -host="$2" -preamble="docker-compose exec $container" +HOST="$1" +CONTAINER=${2:-""} +PREAMBLE="" + +echo "container |$CONTAINER|" +if [[ $CONTAINER != "" ]]; then + PREAMBLE="docker-compose exec $CONTAINER" +fi while true; do - response=$($preamble curl --write-out '%{http_code}' --silent --fail --output /dev/null "$host") + response=$($PREAMBLE curl --write-out '%{http_code}' --silent --fail --output /dev/null "$HOST") if [[ "$response" -eq "200" ]]; then break fi @@ -24,16 +29,27 @@ done # if the server was not available set -e +COUNTER=0 +MAX_LOOPS=60 while true; do ## Wait for ES status to turn to yellow. ## TODO: Ideally we'd be waiting for green, but we need multiple nodes for that. - health=$($preamble curl -fsSL "$host/_cat/health?format=JSON" | jq '.[0].status == "yellow" or .[0].status == "green"') + health=$($PREAMBLE curl -fsSL "$HOST/_cat/health?format=JSON" | jq '.[0].status == "yellow" or .[0].status == "green"') if [[ $health == 'true' ]]; then + echo "Elasticsearch is up" >&2 break fi echo "Elastic Search is unavailable ($health) - sleeping" >&2 + COUNTER=$((COUNTER + 1)) + if [[ $COUNTER -gt $MAX_LOOPS ]]; then + echo "Giving up after $COUNTER attempts" + exit 1 + break + fi sleep 1 done -echo "Elastic Search is up" >&2 -exit 0 +# Allow commands to be chained +shift +shift +exec "$@" From c90f9421f417648d34b7ec4c9470b901b698f97e Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 15:56:36 -0500 Subject: [PATCH 117/725] Run wait-for-es from metacpan-docker dir in CircleCI --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 882101698..132607609 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,6 +18,7 @@ jobs: set -x curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose sudo chmod +x ~/docker-compose + docker-compose --version - run: command: | git clone https://github.com/metacpan/metacpan-docker.git @@ -46,8 +47,8 @@ jobs: name: compose up - run: command: | - pushd metacpan-docker/src/metacpan-api - ./wait-for-es.sh http://localhost:9200 elasticsearch_test -- + pushd metacpan-docker + ./src/metacpan-api/wait-for-es.sh http://localhost:9200 elasticsearch_test -- name: wait for ES - run: command: | From 43dd8acd611d0ed3a15be3cc3bc09123f64e86ea Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 16:14:35 -0500 Subject: [PATCH 118/725] Install local docker-compose to /home/circleci/bin --- .circleci/config.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 132607609..ff43c00cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,10 +1,8 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 -# Use a package of configuration called an orb. # Orchestrate or schedule a set of jobs workflows: docker-compose: - # Run the welcome/run job in its own container jobs: - build-and-test jobs: @@ -16,8 +14,9 @@ jobs: name: Install Docker Compose command: | set -x - curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose - sudo chmod +x ~/docker-compose + curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-`uname -s`-`uname -m` > /home/circleci/bin/docker-compose + sudo chmod +x /home/circleci/bin/docker-compose + which docker-compose docker-compose --version - run: command: | @@ -37,13 +36,13 @@ jobs: - run: command: | pushd metacpan-docker - ~/docker-compose build --build-arg CPM_ARGS='--with-test' api_test + docker-compose build --build-arg CPM_ARGS='--with-test' api_test name: compose build - run: command: | pushd metacpan-docker ./bin/metacpan-docker init - ~/docker-compose --verbose up -d api_test + docker-compose --verbose up -d api_test name: compose up - run: command: | @@ -53,11 +52,11 @@ jobs: - run: command: | pushd metacpan-docker - ~/docker-compose exec -T api_test prove -lr --jobs 2 t + docker-compose exec -T api_test prove -lr --jobs 2 t - run: command: | pushd metacpan-docker - ~/docker-compose logs + docker-compose logs docker stats --no-stream docker ps -a | head name: docker-compose logs From 593a3f923964bfb393f6d01961d22fedb4fc8ca6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 10 Nov 2020 17:04:12 +0100 Subject: [PATCH 119/725] split examples into paths and files The list of things we're trying to list for examples included 'ex' and 'examples'. These don't both make sense to match in the same way. Split the file and path matching. Match directories at the top level, not just the path prefix. This prevents matching a /ext/ directory. And match files starting with examples, but not ex. --- lib/MetaCPAN/Query/File.pm | 43 +++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index aabea5aaf..b5a1c3822 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -141,11 +141,19 @@ my %perl_files = ( ) ], ); -my %prefix_files = ( + +my %path_files = ( example => [ qw( eg ex + ) + ], +); + +my %prefix_files = ( + example => [ + qw( example Example sample @@ -219,13 +227,35 @@ for my $type ( keys %special_files ) { for my $type ( keys %prefix_files ) { my @prefixes = @{ $prefix_files{$type} }; - my @parts = map +( { prefix => { 'name' => $_ } }, - { prefix => { 'path' => $_ } }, ), @prefixes; + my @parts = map +{ prefix => { 'name' => $_ } }, @prefixes; + + push @{ $query_parts{$type} }, @parts; - my ($regex) = map qr/\A(?:$_)/, join '|', @prefixes; + my ($regex) = map qr{(?:\A|/)(?:$_)[^/]*\z}, join '|', @prefixes; + + if ( $type_to_regex{$type} ) { + $type_to_regex{$type} = qr{$type_to_regex{$type}|$regex}; + } + else { + $type_to_regex{$type} = $regex; + } +} + +for my $type ( keys %path_files ) { + my @prefixes = @{ $path_files{$type} }; + + my @parts = map +{ prefix => { 'path' => "$_/" } }, @prefixes; - $type_to_regex{$type} = $regex; push @{ $query_parts{$type} }, @parts; + + my ($regex) = map qr{\A(?:$_)/}, join '|', @prefixes; + + if ( $type_to_regex{$type} ) { + $type_to_regex{$type} = qr{$type_to_regex{$type}|$regex}; + } + else { + $type_to_regex{$type} = $regex; + } } sub interesting_files { @@ -302,8 +332,7 @@ sub interesting_files { my $category = $file_to_type{ $file->{name} }; if ( !$category ) { for my $type ( keys %type_to_regex ) { - my $re = $type_to_regex{$type}; - if ( $file->{name} =~ $re || $file->{path} =~ $re ) { + if ( $file->{path} =~ $type_to_regex{$type} ) { $category = $type; last; } From fb88339dbe5c49c52388f401e07786fbcc549466 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 16:29:20 -0500 Subject: [PATCH 120/725] Add some comments to CircleCI config --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff43c00cf..80858f432 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: machine: true resource_class: medium steps: + # CircleCI has its own docker-compose already installed, but as of this writing, their version is too old to understand our docker-compose.yml - run: name: Install Docker Compose command: | @@ -44,6 +45,9 @@ jobs: ./bin/metacpan-docker init docker-compose --verbose up -d api_test name: compose up + # Since we're running docker-compose -d, we don't actually know if + # Elasticsearch is available at the time this build step begins. We + # probably need to wait for it here, so we'll add our own check. - run: command: | pushd metacpan-docker From 0c81331c8755caa71d77505fbfd3911ee34efe66 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 17:34:47 -0500 Subject: [PATCH 121/725] Add CircleCI badge to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b82439dea..9e2038b7c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metcpan-api) [![Build Status](https://travis-ci.org/metacpan/metacpan-api.svg?branch=master)](https://travis-ci.org/metacpan/metacpan-api) [![Coverage Status](https://coveralls.io/repos/metacpan/metacpan-api/badge.svg)](https://coveralls.io/r/metacpan/metacpan-api) [![Kritika Analysis Status](https://kritika.io/users/oalders/repos/6702044523424530/heads/master/status.svg)](https://kritika.io/users/oalders/repos/6702044523424530/heads/master/) From 20fadeaee2ea19a668ea2d18e4d11995f985a055 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 17:35:04 -0500 Subject: [PATCH 122/725] Remove broken Kritika badge from README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9e2038b7c..caf61c5f2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ [![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metcpan-api) [![Build Status](https://travis-ci.org/metacpan/metacpan-api.svg?branch=master)](https://travis-ci.org/metacpan/metacpan-api) [![Coverage Status](https://coveralls.io/repos/metacpan/metacpan-api/badge.svg)](https://coveralls.io/r/metacpan/metacpan-api) -[![Kritika Analysis Status](https://kritika.io/users/oalders/repos/6702044523424530/heads/master/status.svg)](https://kritika.io/users/oalders/repos/6702044523424530/heads/master/) A Web Service for the CPAN ========================== From d6e02f8341b604256545e849e70bb09407370c58 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 1 Dec 2020 17:36:21 -0500 Subject: [PATCH 123/725] Fix typo in CircleCI badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index caf61c5f2..144f52883 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metcpan-api) +[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metacpan-api) [![Build Status](https://travis-ci.org/metacpan/metacpan-api.svg?branch=master)](https://travis-ci.org/metacpan/metacpan-api) [![Coverage Status](https://coveralls.io/repos/metacpan/metacpan-api/badge.svg)](https://coveralls.io/r/metacpan/metacpan-api) From b1363a2a903a381eded6e770245c169931fa067b Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sat, 16 Jan 2021 10:13:06 +0100 Subject: [PATCH 124/725] Fix reverse_dependency query Added stricter check for type of relationship. --- lib/MetaCPAN/Query/Release.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 31162d33e..2af1442cc 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -815,7 +815,18 @@ sub _get_depended_releases { my $filter_modules = { bool => { should => [ - map +{ term => { 'dependency.module' => $_ } }, + map +{ + bool => { + must => [ + { term => { 'dependency.module' => $_ } }, + { + term => { + 'dependency.relationship' => 'requires' + } + } + ], + }, + }, @{$modules} ] } From 98881060acedf1fce674f441c222f6bd4398159b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 19 Jan 2021 10:46:09 -0500 Subject: [PATCH 125/725] Bump Perl::Tidy to 20210111 --- cpanfile | 2 +- cpanfile.snapshot | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cpanfile b/cpanfile index 75dabfa98..69ad84c69 100644 --- a/cpanfile +++ b/cpanfile @@ -190,7 +190,7 @@ requires 'LWP::ConsoleLogger::Easy'; requires 'MetaCPAN::Client', '2.017000'; requires 'Module::Faker', '0.015'; requires 'Module::Faker::Dist', '0.010'; -requires 'Perl::Tidy', '20191203'; +requires 'Perl::Tidy' => '20210111'; requires 'Plack::Test::Agent'; requires 'Test::Code::TidyAll'; requires 'Test::More', '0.99'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 86260c8f1..1c2b3fe07 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6782,27 +6782,27 @@ DISTRIBUTIONS strict 0 version 0.77 warnings 0 - Perl-Tidy-20191203 - pathname: S/SH/SHANCOCK/Perl-Tidy-20191203.tar.gz - provides: - Perl::Tidy 20191203 - Perl::Tidy::Debugger 20191203 - Perl::Tidy::DevNull 20191203 - Perl::Tidy::Diagnostics 20191203 - Perl::Tidy::FileWriter 20191203 - Perl::Tidy::Formatter 20191203 - Perl::Tidy::HtmlWriter 20191203 - Perl::Tidy::IOScalar 20191203 - Perl::Tidy::IOScalarArray 20191203 - Perl::Tidy::IndentationItem 20191203 - Perl::Tidy::LineBuffer 20191203 - Perl::Tidy::LineSink 20191203 - Perl::Tidy::LineSource 20191203 - Perl::Tidy::Logger 20191203 - Perl::Tidy::Tokenizer 20191203 - Perl::Tidy::VerticalAligner 20191203 - Perl::Tidy::VerticalAligner::Alignment 20191203 - Perl::Tidy::VerticalAligner::Line 20191203 + Perl-Tidy-20210111 + pathname: S/SH/SHANCOCK/Perl-Tidy-20210111.tar.gz + provides: + Perl::Tidy 20210111 + Perl::Tidy::Debugger 20210111 + Perl::Tidy::DevNull 20210111 + Perl::Tidy::Diagnostics 20210111 + Perl::Tidy::FileWriter 20210111 + Perl::Tidy::Formatter 20210111 + Perl::Tidy::HtmlWriter 20210111 + Perl::Tidy::IOScalar 20210111 + Perl::Tidy::IOScalarArray 20210111 + Perl::Tidy::IndentationItem 20210111 + Perl::Tidy::LineBuffer 20210111 + Perl::Tidy::LineSink 20210111 + Perl::Tidy::LineSource 20210111 + Perl::Tidy::Logger 20210111 + Perl::Tidy::Tokenizer 20210111 + Perl::Tidy::VerticalAligner 20210111 + Perl::Tidy::VerticalAligner::Alignment 20210111 + Perl::Tidy::VerticalAligner::Line 20210111 requirements: ExtUtils::MakeMaker 0 PerlIO-gzip-0.20 From 99f460d4727158192a06a77d68a419017a32c3d9 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 19 Jan 2021 10:46:33 -0500 Subject: [PATCH 126/725] Tidy tests --- t/server/controller/changes.t | 2 +- t/server/controller/package.t | 2 +- t/server/controller/search/autocomplete.t | 2 +- t/server/controller/source.t | 2 +- t/server/sanitize_query.t | 2 +- t/types.t | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/t/server/controller/changes.t b/t/server/controller/changes.t index 9974174c6..0e5f427fb 100644 --- a/t/server/controller/changes.t +++ b/t/server/controller/changes.t @@ -74,7 +74,7 @@ my @tests = ( # 'perl' doesn't get flagged as latest. [ '/changes/RWSTAUNER/perl-1' => 200, - 'perldelta.pod' => + 'perldelta.pod' => qr/^=head1 NAME\n\nperldelta - changes for perl\n\n/m, $RWSTAUNER_default_headers, ], diff --git a/t/server/controller/package.t b/t/server/controller/package.t index 7aad216d9..9257df476 100644 --- a/t/server/controller/package.t +++ b/t/server/controller/package.t @@ -23,7 +23,7 @@ test_psgi app, sub { { module_name => $module_name, version => '0.02', - file => + file => 'M/MI/MIYAGAWA/CPAN-Test-Dummy-Perl5-VersionBump-0.02.tar.gz', author => 'MIYAGAWA', distribution => 'CPAN-Test-Dummy-Perl5-VersionBump', diff --git a/t/server/controller/search/autocomplete.t b/t/server/controller/search/autocomplete.t index 77778331a..f69bee85d 100644 --- a/t/server/controller/search/autocomplete.t +++ b/t/server/controller/search/autocomplete.t @@ -27,7 +27,7 @@ test_psgi app, sub { Multiple::Modules::Tester Multiple::Modules::RDeps::A Multiple::Modules::RDeps::Deprecated - ) + ) ], 'results are sorted lexically by module name + length' or diag( Test::More::explain($got) ); diff --git a/t/server/controller/source.t b/t/server/controller/source.t index 3cf0cb367..337b075e6 100644 --- a/t/server/controller/source.t +++ b/t/server/controller/source.t @@ -87,7 +87,7 @@ test_psgi app, sub { t/00-nop.t META.json META.yml - ) + ) ); if ( $k =~ /callback=foo/ ) { ok( diff --git a/t/server/sanitize_query.t b/t/server/sanitize_query.t index 1712f01b9..ecce2fc6b 100644 --- a/t/server/sanitize_query.t +++ b/t/server/sanitize_query.t @@ -55,7 +55,7 @@ test_psgi app, sub { test_all_methods( { - query => { match_all => {} }, + query => { match_all => {} }, script_fields => { pauselen2 => { metacpan_script => 'test_script_field' }, }, filter => { term => { pauseid => 'RWSTAUNER' } }, diff --git a/t/types.t b/t/types.t index 31e7cbcb1..2373c0832 100644 --- a/t/types.t +++ b/t/types.t @@ -94,7 +94,7 @@ ok( 'http://search.cpan.org/dist/Dist-Zilla-Plugin-GitHub/', repository => { type => 'git', - url => + url => 'git://github.com/AlexBio/Dist-Zilla-Plugin-GitHub.git', web => 'https://github.com/AlexBio/Dist-Zilla-Plugin-GitHub' } From 40e58b29d6ab7420b657e8f3e31ed3e187731381 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 19 Jan 2021 15:04:39 -0500 Subject: [PATCH 127/725] Tidy more files I think there was tidyall caching on my previous PR --- lib/MetaCPAN/API.pm | 2 +- lib/MetaCPAN/Document/File/Set.pm | 6 +++--- lib/MetaCPAN/Document/Release/Set.pm | 4 ++-- lib/MetaCPAN/Model.pm | 2 +- lib/MetaCPAN/Model/Archive.pm | 2 +- lib/MetaCPAN/Model/Search.pm | 4 ++-- lib/MetaCPAN/Model/User/Account.pm | 2 +- lib/MetaCPAN/Query/Contributor.pm | 6 ++---- lib/MetaCPAN/Query/File.pm | 24 ++++++++++----------- lib/MetaCPAN/Query/Release.pm | 10 ++++----- lib/MetaCPAN/Role/HasRogueDistributions.pm | 2 +- lib/MetaCPAN/Role/Script.pm | 18 ++++++++-------- lib/MetaCPAN/Script/Author.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 6 +++--- lib/MetaCPAN/Script/CPANTesters.pm | 4 ++-- lib/MetaCPAN/Script/CPANTestersAPI.pm | 4 ++-- lib/MetaCPAN/Script/Check.pm | 18 ++++++++-------- lib/MetaCPAN/Script/Contributor.pm | 8 +++---- lib/MetaCPAN/Script/Cover.pm | 6 +++--- lib/MetaCPAN/Script/Favorite.pm | 14 ++++++------ lib/MetaCPAN/Script/Release.pm | 2 +- lib/MetaCPAN/Script/Role/External/Fedora.pm | 4 ++-- lib/MetaCPAN/Script/Session.pm | 2 +- lib/MetaCPAN/Script/Snapshot.pm | 16 +++++++------- lib/MetaCPAN/Server.pm | 4 ++-- lib/MetaCPAN/Server/Controller.pm | 2 +- lib/MetaCPAN/Types.pm | 2 +- lib/MetaCPAN/Types/Internal.pm | 2 +- lib/MetaCPAN/Types/TypeTiny.pm | 6 +++--- lib/MetaCPAN/Util.pm | 2 +- t/document/file.t | 6 +++--- t/document/module.t | 8 +++---- t/model/archive.t | 2 +- t/release/binary-data.t | 2 +- t/release/common-files.t | 2 +- t/release/local-lib.t | 2 +- t/release/multiple-modules.t | 2 +- t/release/oops-locallib.t | 4 ++-- t/release/packages-unclaimable.t | 6 +++--- t/release/packages.t | 4 ++-- t/release/pm-PL.t | 2 +- t/release/pod-with-data-token.t | 2 +- t/release/pod-with-generator.t | 2 +- 43 files changed, 114 insertions(+), 116 deletions(-) diff --git a/lib/MetaCPAN/API.pm b/lib/MetaCPAN/API.pm index 8ba2c2e1b..0c0e4502f 100644 --- a/lib/MetaCPAN/API.pm +++ b/lib/MetaCPAN/API.pm @@ -164,7 +164,7 @@ sub _is_admin { return 0 unless $username; my @admins = ( - 'haarg', 'jberger', 'mickeyn', 'oalders', + 'haarg', 'jberger', 'mickeyn', 'oalders', 'ranguard', 'reyjrar', 'ssoriche', $ENV{HARNESS_ACTIVE} ? 'tester' : (), ); diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index 65ecf1870..c5db09032 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -22,7 +22,7 @@ has query_file => ( dir interesting_files files_by_category - ) + ) ], ); @@ -626,7 +626,7 @@ sub autocomplete_suggester { my $got = $_->{fields}; my %record; @record{@fields} = map { $got->{$_}[0] } @fields; - $record{name} = delete $record{documentation}; # rename + $record{name} = delete $record{documentation}; # rename ( $_->{fields}{documentation}[0] => \%record ); } @{ $data->{hits}{hits} }; @@ -649,7 +649,7 @@ sub autocomplete_suggester { $valid{$a}->{deprecated} <=> $valid{$b}->{deprecated} || $favorites->{ $valid{$b}->{distribution} } <=> $favorites->{ $valid{$a}->{distribution} } - || $docs{$b} <=> $docs{$a} + || $docs{$b} <=> $docs{$a} || length($a) <=> length($b) || $a cmp $b } diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index b22603ec4..7ca56d4f9 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -31,7 +31,7 @@ has query_release => ( reverse_dependencies top_uploaders versions - > + > ], ); @@ -66,7 +66,7 @@ sub predecessor { { and => [ { term => { distribution => $name } }, - { not => { filter => { term => { status => 'latest' } } } }, + { not => { filter => { term => { status => 'latest' } } } }, ] } )->sort( [ { date => 'desc' } ] )->first; diff --git a/lib/MetaCPAN/Model.pm b/lib/MetaCPAN/Model.pm index 782045640..01058e600 100644 --- a/lib/MetaCPAN/Model.pm +++ b/lib/MetaCPAN/Model.pm @@ -13,7 +13,7 @@ analyzer lowercase => ( analyzer fulltext => ( type => 'english' ); tokenizer camelcase => ( - type => 'pattern', + type => 'pattern', pattern => "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])" ); diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index b85093e65..44cda9c4a 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -57,7 +57,7 @@ has _extractor => ( qw( is_impolite is_naughty - ) + ) ], init_arg => undef, lazy => 1, diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index e26a93223..199eca5bd 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -152,7 +152,7 @@ sub _search_collapsed { size => 0, fields => [ qw( - ) + ) ], }; @@ -357,7 +357,7 @@ sub build_query { pod_lines release status - ) + ) ], } ); diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index 9298dbed1..f9acfe47a 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -148,7 +148,7 @@ sub get_identities { sub remove_identity { my ( $self, $identity ) = @_; - my $ids = $self->identity; + my $ids = $self->identity; my ($id) = grep { $_->{name} eq $identity } @$ids; @$ids = grep { $_->{name} ne $identity } @$ids; diff --git a/lib/MetaCPAN/Query/Contributor.pm b/lib/MetaCPAN/Query/Contributor.pm index 2b4ba8eb3..0599420fd 100644 --- a/lib/MetaCPAN/Query/Contributor.pm +++ b/lib/MetaCPAN/Query/Contributor.pm @@ -27,8 +27,7 @@ sub find_release_contributors { $res->{hits}{total} or return {}; return +{ - contributors => [ map { $_->{_source} } @{ $res->{hits}{hits} } ] - }; + contributors => [ map { $_->{_source} } @{ $res->{hits}{hits} } ] }; } sub find_author_contributions { @@ -47,8 +46,7 @@ sub find_author_contributions { $res->{hits}{total} or return {}; return +{ - contributors => [ map { $_->{_source} } @{ $res->{hits}{hits} } ] - }; + contributors => [ map { $_->{_source} } @{ $res->{hits}{hits} } ] }; } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index b5a1c3822..024315cd4 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -63,7 +63,7 @@ my %special_files = ( ChangeLog Changes News - ) + ) ), ], contributing => [ @@ -72,7 +72,7 @@ my %special_files = ( Contributing Hacking Development - ) + ) ), ], license => [ @@ -85,13 +85,13 @@ my %special_files = ( COPYING Artistic ARTISTIC - ) + ) ], install => [ _doc_files( qw( Install - ) + ) ), ], dist => [ @@ -107,7 +107,7 @@ my %special_files = ( prereqs.yml dist.ini minil.toml - ) + ) ], other => [ _doc_files( @@ -119,7 +119,7 @@ my %special_files = ( THANKS ToDo Todo - ) + ) ), ], ); @@ -127,18 +127,18 @@ my %perl_files = ( changelog => [ qw( perldelta.pod - ) + ) ], license => [ qw( perlartistic.pod perlgpl.pod - ) + ) ], contributing => [ qw( perlhack.pod - ) + ) ], ); @@ -147,7 +147,7 @@ my %path_files = ( qw( eg ex - ) + ) ], ); @@ -157,7 +157,7 @@ my %prefix_files = ( example Example sample - ) + ) ], ); @@ -285,7 +285,7 @@ sub interesting_files { pod_lines release status - ) + ) ]; my $body = { diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 31162d33e..76fa5a8c1 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -19,14 +19,14 @@ sub author_status { my ( $id_2, $id_1 ) = $id =~ /^((\w)\w)/; $status->{links} = { - cpan_directory => "http://cpan.org/authors/id/$id_1/$id_2/$id", + cpan_directory => "http://cpan.org/authors/id/$id_1/$id_2/$id", backpan_directory => "https://cpan.metacpan.org/authors/id/$id_1/$id_2/$id", - cpants => "http://cpants.cpanauthors.org/author/$id", + cpants => "http://cpants.cpanauthors.org/author/$id", cpantesters_reports => "http://cpantesters.org/author/$id_1/$id.html", cpantesters_matrix => "http://matrix.cpantesters.org/?author=$id", - metacpan_explorer => + metacpan_explorer => "https://explorer.metacpan.org/?url=/author/$id", }; } @@ -86,7 +86,7 @@ sub get_contributors { my $release = $res->{hits}{hits}[0]{_source}; my $contribs = $release->{metadata}{x_contributors} || []; - my $authors = $release->{metadata}{author} || []; + my $authors = $release->{metadata}{author} || []; for ( \( $contribs, $authors ) ) { @@ -982,7 +982,7 @@ sub modules { pod_lines release status - ) + ) ], }; diff --git a/lib/MetaCPAN/Role/HasRogueDistributions.pm b/lib/MetaCPAN/Role/HasRogueDistributions.pm index d4fd12041..b4d235c56 100644 --- a/lib/MetaCPAN/Role/HasRogueDistributions.pm +++ b/lib/MetaCPAN/Role/HasRogueDistributions.pm @@ -18,7 +18,7 @@ has rogue_distributions => ( perl_mlb pod2texi spodcxx - ) + ) ]; }, ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 01094fd7e..f90d5168b 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -20,11 +20,11 @@ with( 'MetaCPAN::Role::HasConfig', 'MetaCPAN::Role::Fastly', 'MetaCPAN::Role::Logger' ); has cpan => ( - is => 'ro', - isa => Path, - lazy => 1, - builder => '_build_cpan', - coerce => 1, + is => 'ro', + isa => Path, + lazy => 1, + builder => '_build_cpan', + coerce => 1, documentation => 'Location of a local CPAN mirror, looks for $ENV{MINICPAN} and ~/CPAN', ); @@ -64,10 +64,10 @@ has model => ( ); has index => ( - reader => '_index', - is => 'ro', - isa => Str, - default => 'cpan', + reader => '_index', + is => 'ro', + isa => Str, + default => 'cpan', documentation => 'Index to use, defaults to "cpan" (when used: also export ES_SCRIPT_INDEX)', ); diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index c60c8be5a..5ac2f1ea8 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -163,7 +163,7 @@ sub author_config { # Get the most recent version my ($file) = sort { $dir->child($b)->stat->mtime <=> $dir->child($a)->stat->mtime } - grep {m/author-.*?\.json/} readdir($dh); + grep {m/author-.*?\.json/} readdir($dh); return $fallback unless ($file); $file = $dir->child($file); return $fallback if !-e $file; diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 4d083259e..450923ae1 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -16,9 +16,9 @@ use Try::Tiny; with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; has batch_size => ( - is => 'ro', - isa => Int, - default => 100, + is => 'ro', + isa => Int, + default => 100, documentation => 'Number of documents to restore in one batch, defaults to 100', ); diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 994efbf33..781b7bbb7 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -105,8 +105,8 @@ sub index_reports { $version =~ s{\Av}{} if $version; $releases{ - join( '-', grep {defined} $data->{distribution}, $version ) - } = $data; + join( '-', grep {defined} $data->{distribution}, $version ) } + = $data; } log_info { 'Opening database file at ' . $db }; diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index 843ed019f..dc781cfd6 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -79,8 +79,8 @@ sub index_reports { $version =~ s{\Av}{} if $version; $releases{ - join( '-', grep {defined} $data->{distribution}, $version ) - } = $data; + join( '-', grep {defined} $data->{distribution}, $version ) } + = $data; } for my $row (@$data) { diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index 31c09ee4b..985e58cc2 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -25,9 +25,9 @@ has module => ( ); has max_errors => ( - is => 'ro', - isa => Int, - default => 0, + is => 'ro', + isa => Int, + default => 0, documentation => 'the maximum number of errors to encounter before stopping', ); @@ -104,9 +104,9 @@ sub check_modules { # now find the first latest releases for these files foreach my $file (@files) { my $release_results = $es->search( - index => $self->index->name, - type => 'release', - size => 1, + index => $self->index->name, + type => 'release', + size => 1, fields => [qw(name status authorized version id date)], query => { match_all => {} }, @@ -133,9 +133,9 @@ sub check_modules { if ( !@releases ) { foreach my $file (@files) { my $release_results = $es->search( - index => $self->index->name, - type => 'release', - size => 1, + index => $self->index->name, + type => 'release', + size => 1, fields => [qw(name status authorized version id date)], query => { match_all => {} }, diff --git a/lib/MetaCPAN/Script/Contributor.pm b/lib/MetaCPAN/Script/Contributor.pm index 3d9aa69ba..3b90050f9 100644 --- a/lib/MetaCPAN/Script/Contributor.pm +++ b/lib/MetaCPAN/Script/Contributor.pm @@ -21,15 +21,15 @@ has all => ( ); has distribution => ( - is => 'ro', - isa => Str, + is => 'ro', + isa => Str, documentation => 'update contributors for all releases matching distribution name', ); has release => ( - is => 'ro', - isa => Str, + is => 'ro', + isa => Str, documentation => 'update contributors for a single release (format: author/release_name)', ); diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 1dd2223ca..09bbfdbe3 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -32,9 +32,9 @@ has test => ( ); has json_file => ( - is => 'ro', - isa => Str, - default => 0, + is => 'ro', + isa => Str, + default => 0, documentation => 'Path to JSON file to be read instead of URL (for testing)', ); diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index 076b2689e..4a2726289 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -22,16 +22,16 @@ has queue => ( ); has check_missing => ( - is => 'ro', - isa => Bool, - default => 0, + is => 'ro', + isa => Bool, + default => 0, documentation => 'Report distributions that are missing from "file" or queue jobs if "--queue" specified', ); has age => ( - is => 'ro', - isa => Int, + is => 'ro', + isa => Int, documentation => 'Update distributions that were voted on in the last X minutes', ); @@ -49,8 +49,8 @@ has distribution => ( ); has count => ( - is => 'ro', - isa => Int, + is => 'ro', + isa => Int, documentation => 'Update this count to a given distribution (will only work with "--distribution"', ); diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index f2d1b54c2..c3ad8f6b9 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -108,7 +108,7 @@ my @skip_dists = ( SREZIC/perl-5.005-minimal-bin-0-arm-linux.tar.gz SREZIC/perl-5.005-minimal-bin-1-arm-linux.tar.gz SREZIC/perl-5.005-Tk-800.023-bin-0-arm-linux.tar.gz - ), + ), # ILYAZ has lots of old weird os2 files that don't fit as dists or perl releases qr{/ILYAZ/os2/[^/]+/perl_\w+\.zip\z}, diff --git a/lib/MetaCPAN/Script/Role/External/Fedora.pm b/lib/MetaCPAN/Script/Role/External/Fedora.pm index f9a24c665..80fe8b125 100644 --- a/lib/MetaCPAN/Script/Role/External/Fedora.pm +++ b/lib/MetaCPAN/Script/Role/External/Fedora.pm @@ -15,8 +15,8 @@ sub run_fedora { my $uri = URI->new('https://admin.fedoraproject.org/pkgdb/api/packages/'); my $options = { - page => 1, # start at the beginning - limit => 500, # max, says https://admin.fedoraproject.org/pkgdb/api/ + page => 1, # start at the beginning + limit => 500, # max, says https://admin.fedoraproject.org/pkgdb/api/ status => 'Approved', }; my $total = 1; diff --git a/lib/MetaCPAN/Script/Session.pm b/lib/MetaCPAN/Script/Session.pm index 3dd6c7ad2..fba3eb70a 100644 --- a/lib/MetaCPAN/Script/Session.pm +++ b/lib/MetaCPAN/Script/Session.pm @@ -16,7 +16,7 @@ sub run { scroll => '1m', index => 'user', type => 'session', - body => + body => { query => { filtered => { query => { match_all => {} }, }, }, }, ); diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index 49eb3a89d..b0f90d702 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -61,8 +61,8 @@ has purge_old => ( ## Options has snap_stub => ( - is => 'ro', - isa => Str, + is => 'ro', + isa => Str, documentation => 'Stub of snapshot name ( e.g full, user etc ), used with dateformat to create the actual name in S3', ); @@ -88,9 +88,9 @@ has host => ( # Note: can take wild cards https://www.elastic.co/guide/en/elasticsearch/reference/2.4/multi-index.html has indices => ( - is => 'ro', - isa => ArrayRef, - default => sub { ['*'] }, + is => 'ro', + isa => ArrayRef, + default => sub { ['*'] }, documentation => 'Which indices to snapshot, defaults to "*" (all), can take wild cards - "*v100*"', ); @@ -121,7 +121,7 @@ has http_client => ( sub _build_http_client { return HTTP::Tiny->new( default_headers => { 'Accept' => 'application/json' }, - timeout => 120, # list can be slow + timeout => 120, # list can be slow ); } @@ -152,7 +152,7 @@ sub run_snapshot { my $snap_name = $self->snap_stub . '_' . $date; my $indices = join ',', @{ $self->indices }; - my $data = { + my $data = { "ignore_unavailable" => 0, "include_global_state" => 1, "indices" => $indices, @@ -213,7 +213,7 @@ sub run_purge_old { foreach my $snap ( sort keys %to_delete ) { my $path = "${repository_name}/${snap}"; - log_info {"Deleting ${path}"}; + log_info {"Deleting ${path}"}; my $response = $self->_request( 'delete', $path, {} ); } diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index b547f6b63..b2a71b354 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -26,7 +26,7 @@ __PACKAGE__->apply_request_class_roles( Catalyst::TraitFor::Request::REST Catalyst::TraitFor::Request::REST::ForBrowsers MetaCPAN::Server::Role::Request - ) + ) ); __PACKAGE__->config( encoding => 'UTF-8', @@ -87,7 +87,7 @@ __PACKAGE__->setup( Session::State::Cookie Authentication OAuth2::Provider - ) + ) ); sub app { diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 47fc93d21..a64e40cb3 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -166,7 +166,7 @@ sub join : ActionClass('Deserialize') { ]; my @ids = List::MoreUtils::uniq grep {defined} map { ref $cself eq 'CODE' ? $cself->($_) : $_->{$cself} } @$data; - my $filter = { terms => { $config->{foreign} => [@ids] } }; + my $filter = { terms => { $config->{foreign} => [@ids] } }; my $filtered = {%$query}; # don't work on $query $filtered->{filter} = $query->{filter} diff --git a/lib/MetaCPAN/Types.pm b/lib/MetaCPAN/Types.pm index 057896611..938407a0a 100644 --- a/lib/MetaCPAN/Types.pm +++ b/lib/MetaCPAN/Types.pm @@ -8,7 +8,7 @@ use parent 'MooseX::Types::Combine'; __PACKAGE__->provide_types_from( qw( MetaCPAN::Types::Internal - ) + ) ); 1; diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index 412b174a7..c73da3805 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -14,7 +14,7 @@ use MooseX::Types -declare => [ Identity Dependency Profile - ) + ) ]; subtype Module, as ArrayRef [ Type ['MetaCPAN::Document::Module'] ]; diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index 59f52e596..2a0492220 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -19,7 +19,7 @@ use Type::Library -base, -declare => ( Logger HashRefCPANMeta - ) + ) ); use Type::Utils -all; @@ -75,8 +75,8 @@ declare RiverSummary, declare Resources, as Dict [ - license => Optional [ ArrayRef [Str] ], - homepage => Optional [Str], + license => Optional [ ArrayRef [Str] ], + homepage => Optional [Str], bugtracker => Optional [ Dict [ web => Optional [Str], mailto => Optional [Str] ] ], repository => Optional [ diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 7fb4a37fd..1607e7719 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -52,7 +52,7 @@ sub fix_version { $version =~ s/\.[._]+/./; $version =~ s/[._]*_[._]*/_/g; $version =~ s/\.{2,}/./g; - $v ||= $version =~ tr/.// > 1; + $v ||= $version =~ tr/.// > 1; $version ||= 0; return ( ( $v ? 'v' : '' ) . $version ); } diff --git a/t/document/file.t b/t/document/file.t index c7c80fc45..8ffcd0f67 100644 --- a/t/document/file.t +++ b/t/document/file.t @@ -318,7 +318,7 @@ END sloc => 2, slop => 2, pod_lines => [ [ 3, 3 ], ], - pod => + pod => q[NAME "Perl6Attribute" -- An example attribute metaclass for Perl 6 style attributes], }; }; @@ -365,7 +365,7 @@ END sloc => 1, slop => 10, pod_lines => [ [ 6, 19 ], ], - pod => + pod => q[NAME Foo -- An example attribute metaclass for Perl 6 style attributes DESCRIPTION hot stuff * Foo * Bar], }; }; @@ -456,7 +456,7 @@ END sloc => 3, slop => 12, pod_lines => [ [ 4, 17 ], ], - pod => + pod => q[Something some paragraph .. Fully qualified subroutine names are also supported. For example, __DATA__ sub foo::bar {23} package baz; sub dob {32} will all be loaded correctly by the SelfLoader, and the SelfLoader will ensure that the packages 'foo' and 'baz' correctly have the SelfLoader "AUTOLOAD" method when the data after "__DATA__" is first parsed.], }; }; diff --git a/t/document/module.t b/t/document/module.t index ed6caabd4..f2efedeb2 100644 --- a/t/document/module.t +++ b/t/document/module.t @@ -76,24 +76,24 @@ subtest set_associated_pod => sub { test_associated_pod( 'Squirrel::Face', [qw( bin/sf.pl lib/Face.pm README.pod )], - 'lib/Face.pm', 'prefer .pm to README.pod', + 'lib/Face.pm', 'prefer .pm to README.pod', ); test_associated_pod( 'Squirrel::Face', [qw( Zoob.pod README.pod )], - 'Zoob.pod', 'prefer any .pod to README.pod', + 'Zoob.pod', 'prefer any .pod to README.pod', ); test_associated_pod( 'Squirrel::Face', [qw( narf.pl README.pod )], - 'narf.pl', 'prefer .pl to README.pod', + 'narf.pl', 'prefer .pl to README.pod', ); # This goes along with the Pod::With::Generator tests. # Since file order is not reliable (there) we can't get a reliable failure # so test here so that we can ensure the order. test_associated_pod( - 'Foo::Bar', [qw( a/b.pm x/Foo/Bar.pm lib/Foo/Bar.pm )], + 'Foo::Bar', [qw( a/b.pm x/Foo/Bar.pm lib/Foo/Bar.pm )], 'lib/Foo/Bar.pm', 'prefer lib/ with matching name to other files', ); }; diff --git a/t/model/archive.t b/t/model/archive.t index 9ad4b54bf..720fae958 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -30,7 +30,7 @@ subtest 'archive extraction' => sub { '2eba5fd5f9e08a9dcc1c5e2166b7d7d958caf377', 'Some-1.00-TRIAL/META.json' => qr/"meta-spec"/, 'Some-1.00-TRIAL/META.yml' => qr/provides:/, - 'Some-1.00-TRIAL/MANIFEST' => + 'Some-1.00-TRIAL/MANIFEST' => 'e93d21831fb3d3cac905dbe852ba1a4a07abd991', ); diff --git a/t/release/binary-data.t b/t/release/binary-data.t index 64a1df8e9..28b65b715 100644 --- a/t/release/binary-data.t +++ b/t/release/binary-data.t @@ -32,7 +32,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '0.02', version_numified => 0.02, - associated_pod => + associated_pod => 'BORISNAT/Binary-Data-0.01/lib/Binary/Data/WithPod.pm', }, ], diff --git a/t/release/common-files.t b/t/release/common-files.t index 8cb509c62..5d8f110dd 100644 --- a/t/release/common-files.t +++ b/t/release/common-files.t @@ -21,7 +21,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '1.1', version_numified => 1.1, - associated_pod => + associated_pod => 'BORISNAT/Common-Files-1.1/lib/Common/Files.pm', }, ], diff --git a/t/release/local-lib.t b/t/release/local-lib.t index 79adf23f3..17f001425 100644 --- a/t/release/local-lib.t +++ b/t/release/local-lib.t @@ -23,7 +23,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '0.01', version_numified => 0.01, - associated_pod => + associated_pod => 'BORISNAT/local-lib-0.01/lib/local/lib.pm', }, ], diff --git a/t/release/multiple-modules.t b/t/release/multiple-modules.t index f2d72ee59..17ec21d4b 100644 --- a/t/release/multiple-modules.t +++ b/t/release/multiple-modules.t @@ -115,7 +115,7 @@ ok( my $file = $idx->type('file')->filter( { and => [ - { term => { release => 'Multiple-Modules-0.1' } }, + { term => { release => 'Multiple-Modules-0.1' } }, { match_phrase => { documentation => 'Moose' } } ] } diff --git a/t/release/oops-locallib.t b/t/release/oops-locallib.t index b470071a2..1944c2238 100644 --- a/t/release/oops-locallib.t +++ b/t/release/oops-locallib.t @@ -22,7 +22,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '0.01', version_numified => 0.01, - associated_pod => + associated_pod => 'BORISNAT/Oops-LocalLib-0.01/lib/Oops/LocalLib.pm', }, ], @@ -33,7 +33,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '1', version_numified => 1, - associated_pod => + associated_pod => 'BORISNAT/Oops-LocalLib-0.01/foreign/Fruits.pm', }, ], diff --git a/t/release/packages-unclaimable.t b/t/release/packages-unclaimable.t index 949ec79df..d44c05e2d 100644 --- a/t/release/packages-unclaimable.t +++ b/t/release/packages-unclaimable.t @@ -12,8 +12,8 @@ use Test::More; test_release( { - name => 'Packages-Unclaimable-2', - author => 'RWSTAUNER', + name => 'Packages-Unclaimable-2', + author => 'RWSTAUNER', abstract => 'Dist that appears to declare packages that are not allowed', authorized => 1, @@ -29,7 +29,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => 2, version_numified => 2, - associated_pod => + associated_pod => 'RWSTAUNER/Packages-Unclaimable-2/lib/Packages/Unclaimable.pm', }, ], diff --git a/t/release/packages.t b/t/release/packages.t index b61f2ee15..f5b850003 100644 --- a/t/release/packages.t +++ b/t/release/packages.t @@ -25,7 +25,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '1.103', version_numified => 1.103, - associated_pod => + associated_pod => 'RWSTAUNER/Packages-1.103/lib/Packages.pm', }, ], @@ -36,7 +36,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => 0.04, version_numified => 0.04, - associated_pod => + associated_pod => 'RWSTAUNER/Packages-1.103/lib/Packages/BOM.pm', }, ], diff --git a/t/release/pm-PL.t b/t/release/pm-PL.t index dce0b58df..bd51e64f1 100644 --- a/t/release/pm-PL.t +++ b/t/release/pm-PL.t @@ -46,7 +46,7 @@ is( $pm->module->[0]->version, lib/uncommon/sense.pm sense.pod sense.pm.PL - ) + ) ], 'release contains expected files', ); diff --git a/t/release/pod-with-data-token.t b/t/release/pod-with-data-token.t index c9477dc57..3b5e6826a 100644 --- a/t/release/pod-with-data-token.t +++ b/t/release/pod-with-data-token.t @@ -22,7 +22,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '0.01', version_numified => 0.01, - associated_pod => + associated_pod => 'BORISNAT/Pod-With-Data-Token-0.01/lib/Pod/With/Data/Token.pm', }, ], diff --git a/t/release/pod-with-generator.t b/t/release/pod-with-generator.t index e27434712..cc1f39d4b 100644 --- a/t/release/pod-with-generator.t +++ b/t/release/pod-with-generator.t @@ -22,7 +22,7 @@ test_release( authorized => Cpanel::JSON::XS::true(), version => '1', version_numified => 1, - associated_pod => + associated_pod => 'BORISNAT/Pod-With-Generator-1/lib/Pod/With/Generator.pm', }, ], From e74a87fcd8312d1739dcc5338b2e15d50e1ec657 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 19 Jan 2021 15:50:48 -0500 Subject: [PATCH 128/725] Set --character-encoding=none in .perltidyrc --- .perltidyrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.perltidyrc b/.perltidyrc index 961585943..fe50193ff 100644 --- a/.perltidyrc +++ b/.perltidyrc @@ -4,3 +4,7 @@ # Break a line after opening/before closing token. -vt=0 -vtc=0 + +# Fix t/server/controller/login/pause.t tidyall failure +# See https://github.com/autarch/Dist-Zilla-PluginBundle-DROLSKY/commit/b7f9c0194b83a72e4fe07ee5f9c541b6cfbf9b6d +--character-encoding=none From 9ca3563e9cb040ef56cc8c35de581e0d3cefaf12 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 4 Feb 2021 08:16:36 +0100 Subject: [PATCH 129/725] add plurals of example directories --- lib/MetaCPAN/Query/File.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 024315cd4..cc49aa121 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -155,8 +155,11 @@ my %prefix_files = ( example => [ qw( example + examples Example + Examples sample + samples ) ], ); From fea821ad0495f9413ad6efd02d301a80b6f35171 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 4 Feb 2021 09:38:11 -0500 Subject: [PATCH 130/725] Tidy test imports --- t/00_setup.t | 5 +- t/01_darkpan.t | 2 +- t/api/controller/cover.t | 8 +-- t/api/controller/search/first.t | 4 +- t/api/controller/search/web.t | 2 +- t/document/author.t | 2 +- t/document/file.t | 2 +- t/document/module.t | 2 +- t/fff_tidyall.t | 2 +- t/model/archive.t | 4 +- t/model/release.t | 4 +- t/model/release/dependencies.t | 6 +- t/model/release/metadata.t | 4 +- t/model/search.t | 2 +- t/pod/renderer.t | 2 +- t/release/badpod.t | 2 +- t/release/binary-data.t | 2 +- t/release/bugs.t | 2 +- t/release/common-files.t | 2 +- t/release/devel-gofaster-0.000.t | 2 +- t/release/documentation-not-readme.t | 2 +- t/release/file-duplicates.t | 2 +- t/release/ipsonar-0.29.t | 2 +- t/release/local-lib.t | 2 +- t/release/meta-license.t | 2 +- t/release/meta-provides.t | 2 +- t/release/no-modules.t | 2 +- t/release/no-packages.t | 2 +- t/release/oops-locallib.t | 2 +- t/release/packages-unclaimable.t | 4 +- t/release/packages.t | 2 +- t/release/pod-examples.t | 2 +- t/release/pod-with-data-token.t | 2 +- t/release/pod-with-generator.t | 2 +- t/release/text-tabs-wrap.t | 2 +- t/release/weblint++-1.15.t | 2 +- t/release/www-tumblr-0.t | 2 +- t/script/load.t | 88 +++++++++++------------ t/script/queue.t | 2 +- t/server/controller/author.t | 2 +- t/server/controller/changes.t | 2 +- t/server/controller/diff.t | 7 +- t/server/controller/distribution.t | 2 +- t/server/controller/download_url.t | 6 +- t/server/controller/file.t | 2 +- t/server/controller/login/pause.t | 4 +- t/server/controller/mirror.t | 2 +- t/server/controller/module.t | 2 +- t/server/controller/pod.t | 8 +-- t/server/controller/release.t | 3 +- t/server/controller/root.t | 3 +- t/server/controller/scroll.t | 2 +- t/server/controller/search/autocomplete.t | 2 +- t/server/controller/source.t | 2 +- t/server/controller/user/favorite.t | 2 +- t/server/controller/user/turing.t | 2 +- t/server/not_found.t | 2 +- t/server/sanitize_query.t | 5 +- t/test-vars.t | 2 +- t/types.t | 6 +- t/util.t | 2 +- 61 files changed, 127 insertions(+), 130 deletions(-) diff --git a/t/00_setup.t b/t/00_setup.t index f80512cc0..bfe1a4552 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use CPAN::Faker 0.010; +use CPAN::Faker 0.010 (); use Devel::Confess; use MetaCPAN::Script::Tickets (); use MetaCPAN::Server::Test; @@ -14,7 +14,6 @@ use MetaCPAN::TestHelpers qw( ); use MetaCPAN::TestServer (); use Module::Faker 0.015 (); # Generates META.json. -use Path::Tiny qw( path ); use Test::More 0.96; use URI::FromHash qw( uri ); @@ -78,7 +77,7 @@ $fakecpan_dir->child('indices')->mkpath; } # Help debug inconsistent parsing failures. -require Parse::PMFile; +use Parse::PMFile (); local $Parse::PMFile::VERBOSE = $ENV{TEST_VERBOSE} ? 9 : 0; my $src_dir = $fakecpan_configs; diff --git a/t/01_darkpan.t b/t/01_darkpan.t index a74c58e13..78b6106ad 100644 --- a/t/01_darkpan.t +++ b/t/01_darkpan.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Devel::Confess; -use MetaCPAN::DarkPAN; +use MetaCPAN::DarkPAN (); use MetaCPAN::TestServer; use MetaCPAN::Tests::Controller::Search::DownloadURL; use Test::More; diff --git a/t/api/controller/cover.t b/t/api/controller/cover.t index 7d61310dc..d04821a4c 100644 --- a/t/api/controller/cover.t +++ b/t/api/controller/cover.t @@ -1,12 +1,12 @@ use Mojo::Base -strict; -use lib 't/lib'; -use Test::More; -use Test::Mojo; -use Mojo::JSON qw(true false); +use lib 't/lib'; use MetaCPAN::Model::Search (); use MetaCPAN::TestServer (); +use Test::More; +use Test::Mojo (); + my $server = MetaCPAN::TestServer->new; my $t = Test::Mojo->new( diff --git a/t/api/controller/search/first.t b/t/api/controller/search/first.t index 3ca6acdf4..3e3d19ab4 100644 --- a/t/api/controller/search/first.t +++ b/t/api/controller/search/first.t @@ -1,8 +1,7 @@ use Mojo::Base -strict; use Test::More; -use Test::Mojo; -use Mojo::JSON qw(true false); +use Test::Mojo (); my $t = Test::Mojo->new('MetaCPAN::API'); @@ -13,4 +12,3 @@ $t->get_ok( '/v1/search/first', form => { q => 'DOESNOTEXISTS' } ) ->status_is(404)->content_is(''); done_testing; - diff --git a/t/api/controller/search/web.t b/t/api/controller/search/web.t index cc433b980..feb3e6575 100644 --- a/t/api/controller/search/web.t +++ b/t/api/controller/search/web.t @@ -2,7 +2,7 @@ use Mojo::Base -strict; use Test::More; use Test::Mojo; -use Mojo::JSON qw(true false); +use Mojo::JSON qw( false true ); # Note: we need a release marked as status => latest # so we're using Versions::PkgVar for now diff --git a/t/document/author.t b/t/document/author.t index c53e416a7..6db29b13c 100644 --- a/t/document/author.t +++ b/t/document/author.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Document::Author; +use MetaCPAN::Document::Author (); use Test::More; my @errors = MetaCPAN::Document::Author->validate( diff --git a/t/document/file.t b/t/document/file.t index 8ffcd0f67..8e34bf0e3 100644 --- a/t/document/file.t +++ b/t/document/file.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Document::File; +use MetaCPAN::Document::File (); use Test::More; sub cpan_meta { diff --git a/t/document/module.t b/t/document/module.t index f2efedeb2..d21fcac7d 100644 --- a/t/document/module.t +++ b/t/document/module.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Document::Module; +use MetaCPAN::Document::Module (); use Test::More; subtest hide_from_pause => sub { diff --git a/t/fff_tidyall.t b/t/fff_tidyall.t index 849ddfede..e96e8e278 100644 --- a/t/fff_tidyall.t +++ b/t/fff_tidyall.t @@ -4,5 +4,5 @@ use strict; use warnings; use lib 't/lib'; -use Test::Code::TidyAll; +use Test::Code::TidyAll qw( tidyall_ok ); tidyall_ok( verbose => $ENV{TEST_VERBOSE} ); diff --git a/t/model/archive.t b/t/model/archive.t index 720fae958..86a025ef5 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -4,7 +4,9 @@ use lib 't/lib'; use Digest::SHA qw( sha1_hex ); use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use Test::Most; +use Test::Most import => + [qw( cmp_bag done_testing is isa_ok like ok require_ok subtest throws_ok ) + ]; my $CLASS = 'MetaCPAN::Model::Archive'; require_ok $CLASS; diff --git a/t/model/release.t b/t/model/release.t index a75dbef08..58602402e 100644 --- a/t/model/release.t +++ b/t/model/release.t @@ -3,8 +3,8 @@ use warnings; use lib 't/lib'; use File::Temp (); -use LWP::Simple qw(getstore); -use MetaCPAN::Model::Release; +use LWP::Simple qw( getstore ); +use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner; use MetaCPAN::TestHelpers qw( get_config ); use Test::More; diff --git a/t/model/release/dependencies.t b/t/model/release/dependencies.t index bf4437921..97f24f5cd 100644 --- a/t/model/release/dependencies.t +++ b/t/model/release/dependencies.t @@ -2,11 +2,11 @@ use strict; use warnings; use lib 't/lib'; -use FindBin; -use MetaCPAN::Model::Release; +use FindBin (); +use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner; use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); -use Test::Most; +use Test::Most import => [qw( cmp_bag done_testing subtest )]; my $config = get_config(); diff --git a/t/model/release/metadata.t b/t/model/release/metadata.t index 9492c9aec..f182fc860 100644 --- a/t/model/release/metadata.t +++ b/t/model/release/metadata.t @@ -2,9 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use FindBin; -use MetaCPAN::Model::Release; -use MetaCPAN::Script::Runner; +use MetaCPAN::Model::Release (); use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); use Test::More; diff --git a/t/model/search.t b/t/model/search.t index e62e2ef5d..1cc7808b6 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -5,7 +5,7 @@ use lib 't/lib'; use MetaCPAN::Model::Search (); use MetaCPAN::TestServer (); use Test::More; -use Test::Deep qw(cmp_deeply ignore); +use Test::Deep qw( cmp_deeply ignore ); use Cpanel::JSON::XS (); # Just use this to get an es object. diff --git a/t/pod/renderer.t b/t/pod/renderer.t index 34bbe83c7..1b16ee1b0 100644 --- a/t/pod/renderer.t +++ b/t/pod/renderer.t @@ -4,7 +4,7 @@ use lib 't/lib'; use Test::More; -use MetaCPAN::Pod::Renderer; +use MetaCPAN::Pod::Renderer (); my $factory = MetaCPAN::Pod::Renderer->new(); my $html_renderer = $factory->html_renderer; diff --git a/t/release/badpod.t b/t/release/badpod.t index bbde2aaef..672001978 100644 --- a/t/release/badpod.t +++ b/t/release/badpod.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/binary-data.t b/t/release/binary-data.t index 28b65b715..6b5cf0302 100644 --- a/t/release/binary-data.t +++ b/t/release/binary-data.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/bugs.t b/t/release/bugs.t index 11c02390d..5b1a724b1 100644 --- a/t/release/bugs.t +++ b/t/release/bugs.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_distribution ); use Test::More; test_distribution( diff --git a/t/release/common-files.t b/t/release/common-files.t index 5d8f110dd..4ea22b27b 100644 --- a/t/release/common-files.t +++ b/t/release/common-files.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/devel-gofaster-0.000.t b/t/release/devel-gofaster-0.000.t index 9d5c4e150..1c4e53812 100644 --- a/t/release/devel-gofaster-0.000.t +++ b/t/release/devel-gofaster-0.000.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/documentation-not-readme.t b/t/release/documentation-not-readme.t index 8e7ae52db..5ce7d39a7 100644 --- a/t/release/documentation-not-readme.t +++ b/t/release/documentation-not-readme.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/file-duplicates.t b/t/release/file-duplicates.t index 62be2737e..c27776b0e 100644 --- a/t/release/file-duplicates.t +++ b/t/release/file-duplicates.t @@ -4,7 +4,7 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/ipsonar-0.29.t b/t/release/ipsonar-0.29.t index 606a3b514..26f101bd2 100644 --- a/t/release/ipsonar-0.29.t +++ b/t/release/ipsonar-0.29.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/local-lib.t b/t/release/local-lib.t index 17f001425..947ebf83e 100644 --- a/t/release/local-lib.t +++ b/t/release/local-lib.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/meta-license.t b/t/release/meta-license.t index 3914c969e..63010f78a 100644 --- a/t/release/meta-license.t +++ b/t/release/meta-license.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/meta-provides.t b/t/release/meta-provides.t index 929a8b2f1..8bfe83375 100644 --- a/t/release/meta-provides.t +++ b/t/release/meta-provides.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/no-modules.t b/t/release/no-modules.t index 078aa9582..9b2ba4017 100644 --- a/t/release/no-modules.t +++ b/t/release/no-modules.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; # Some uploads contain no usable modules. diff --git a/t/release/no-packages.t b/t/release/no-packages.t index 7f3d16f4f..c1a13db68 100644 --- a/t/release/no-packages.t +++ b/t/release/no-packages.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; # Some uploads contain no usable modules. diff --git a/t/release/oops-locallib.t b/t/release/oops-locallib.t index 1944c2238..302d3d962 100644 --- a/t/release/oops-locallib.t +++ b/t/release/oops-locallib.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/packages-unclaimable.t b/t/release/packages-unclaimable.t index d44c05e2d..74b915e6e 100644 --- a/t/release/packages-unclaimable.t +++ b/t/release/packages-unclaimable.t @@ -4,9 +4,9 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use IO::String; -use List::MoreUtils qw(uniq); +use List::MoreUtils qw( uniq ); use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Module::Metadata; use Test::More; diff --git a/t/release/packages.t b/t/release/packages.t index f5b850003..f326d9c26 100644 --- a/t/release/packages.t +++ b/t/release/packages.t @@ -4,7 +4,7 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/pod-examples.t b/t/release/pod-examples.t index 401f267e4..e79b108f8 100644 --- a/t/release/pod-examples.t +++ b/t/release/pod-examples.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/pod-with-data-token.t b/t/release/pod-with-data-token.t index 3b5e6826a..150161e59 100644 --- a/t/release/pod-with-data-token.t +++ b/t/release/pod-with-data-token.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/pod-with-generator.t b/t/release/pod-with-generator.t index cc1f39d4b..015770dbe 100644 --- a/t/release/pod-with-generator.t +++ b/t/release/pod-with-generator.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/text-tabs-wrap.t b/t/release/text-tabs-wrap.t index 43a313909..49b494730 100644 --- a/t/release/text-tabs-wrap.t +++ b/t/release/text-tabs-wrap.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_distribution test_release ); use Test::More; test_distribution( diff --git a/t/release/weblint++-1.15.t b/t/release/weblint++-1.15.t index b31a78b1e..c1ec9478c 100644 --- a/t/release/weblint++-1.15.t +++ b/t/release/weblint++-1.15.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/release/www-tumblr-0.t b/t/release/www-tumblr-0.t index 8aabd4f69..c30651869 100644 --- a/t/release/www-tumblr-0.t +++ b/t/release/www-tumblr-0.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_release ); use Test::More; test_release( diff --git a/t/script/load.t b/t/script/load.t index 100a48a7e..0830fb070 100644 --- a/t/script/load.t +++ b/t/script/load.t @@ -4,54 +4,54 @@ use lib 't/lib'; use Test::More; -require MetaCPAN::Script::Author; -require MetaCPAN::Script::Backpan; -require MetaCPAN::Script::Backup; -require MetaCPAN::Script::CPANTesters; -require MetaCPAN::Script::CPANTestersAPI; -require MetaCPAN::Script::Check; -require MetaCPAN::Script::Checksum; -require MetaCPAN::Script::Contributor; -require MetaCPAN::Script::Cover; -require MetaCPAN::Script::External; -require MetaCPAN::Script::Favorite; -require MetaCPAN::Script::First; -require MetaCPAN::Script::Latest; -require MetaCPAN::Script::Mapping; -require MetaCPAN::Script::Mapping::CPAN::Author; -require MetaCPAN::Script::Mapping::CPAN::Distribution; -require MetaCPAN::Script::Mapping::CPAN::Favorite; -require MetaCPAN::Script::Mapping::CPAN::File; -require MetaCPAN::Script::Mapping::CPAN::Mirror; -require MetaCPAN::Script::Mapping::CPAN::Package; -require MetaCPAN::Script::Mapping::CPAN::Permission; -require MetaCPAN::Script::Mapping::CPAN::Rating; -require MetaCPAN::Script::Mapping::CPAN::Release; -require MetaCPAN::Script::Mapping::Contributor; -require MetaCPAN::Script::Mapping::Cover; -require MetaCPAN::Script::Mapping::DeployStatement; -require MetaCPAN::Script::Mapping::User::Account; -require MetaCPAN::Script::Mapping::User::Identity; -require MetaCPAN::Script::Mapping::User::Session; -require MetaCPAN::Script::Mirrors; -require MetaCPAN::Script::Package; -require MetaCPAN::Script::Permission; -require MetaCPAN::Script::Purge; -require MetaCPAN::Script::Queue; -require MetaCPAN::Script::Ratings; -require MetaCPAN::Script::Release; -require MetaCPAN::Script::Restart; -require MetaCPAN::Script::River; +use MetaCPAN::Script::Author (); +use MetaCPAN::Script::Backpan (); +use MetaCPAN::Script::Backup (); +use MetaCPAN::Script::CPANTesters (); +use MetaCPAN::Script::CPANTestersAPI (); +use MetaCPAN::Script::Check (); +use MetaCPAN::Script::Checksum (); +use MetaCPAN::Script::Contributor (); +use MetaCPAN::Script::Cover (); +use MetaCPAN::Script::External (); +use MetaCPAN::Script::Favorite (); +use MetaCPAN::Script::First (); +use MetaCPAN::Script::Latest (); +use MetaCPAN::Script::Mapping (); +use MetaCPAN::Script::Mapping::CPAN::Author (); +use MetaCPAN::Script::Mapping::CPAN::Distribution (); +use MetaCPAN::Script::Mapping::CPAN::Favorite (); +use MetaCPAN::Script::Mapping::CPAN::File (); +use MetaCPAN::Script::Mapping::CPAN::Mirror (); +use MetaCPAN::Script::Mapping::CPAN::Package (); +use MetaCPAN::Script::Mapping::CPAN::Permission (); +use MetaCPAN::Script::Mapping::CPAN::Rating (); +use MetaCPAN::Script::Mapping::CPAN::Release (); +use MetaCPAN::Script::Mapping::Contributor (); +use MetaCPAN::Script::Mapping::Cover (); +use MetaCPAN::Script::Mapping::DeployStatement (); +use MetaCPAN::Script::Mapping::User::Account (); +use MetaCPAN::Script::Mapping::User::Identity (); +use MetaCPAN::Script::Mapping::User::Session (); +use MetaCPAN::Script::Mirrors (); +use MetaCPAN::Script::Package (); +use MetaCPAN::Script::Permission (); +use MetaCPAN::Script::Purge (); +use MetaCPAN::Script::Queue (); +use MetaCPAN::Script::Ratings (); +use MetaCPAN::Script::Release (); +use MetaCPAN::Script::Restart (); +use MetaCPAN::Script::River (); require MetaCPAN::Script::Role::Contributor; require MetaCPAN::Script::Role::External::Cygwin; require MetaCPAN::Script::Role::External::Debian; require MetaCPAN::Script::Role::External::Fedora; -require MetaCPAN::Script::Runner; -require MetaCPAN::Script::Session; -require MetaCPAN::Script::Snapshot; -require MetaCPAN::Script::Suggest; -require MetaCPAN::Script::Tickets; -require MetaCPAN::Script::Watcher; +use MetaCPAN::Script::Runner (); +use MetaCPAN::Script::Session (); +use MetaCPAN::Script::Snapshot (); +use MetaCPAN::Script::Suggest (); +use MetaCPAN::Script::Tickets (); +use MetaCPAN::Script::Watcher (); pass 'all loaded Ok'; diff --git a/t/script/queue.t b/t/script/queue.t index 63b911d07..40007c81e 100644 --- a/t/script/queue.t +++ b/t/script/queue.t @@ -5,7 +5,7 @@ use lib 't/lib'; use Test::More; use MetaCPAN::Script::Runner; -use MetaCPAN::Script::Queue; +use MetaCPAN::Script::Queue (); my $config = MetaCPAN::Script::Runner::build_config; local @ARGV = ( '--dir', $config->{cpan} ); diff --git a/t/server/controller/author.t b/t/server/controller/author.t index 2a1b20816..4be01f987 100644 --- a/t/server/controller/author.t +++ b/t/server/controller/author.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok encode_json test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/changes.t b/t/server/controller/changes.t index 0e5f427fb..0adfa4999 100644 --- a/t/server/controller/changes.t +++ b/t/server/controller/changes.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my $LOCAL_default_headers = { diff --git a/t/server/controller/diff.t b/t/server/controller/diff.t index 4d927d5e2..926d8ed8d 100644 --- a/t/server/controller/diff.t +++ b/t/server/controller/diff.t @@ -2,9 +2,12 @@ use strict; use warnings; use lib 't/lib'; -use Encode; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( + decode_json_ok + multiline_diag + test_cache_headers +); use Test::More; { diff --git a/t/server/controller/distribution.t b/t/server/controller/distribution.t index fa72fd689..101ee30f9 100644 --- a/t/server/controller/distribution.t +++ b/t/server/controller/distribution.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my @tests = ( diff --git a/t/server/controller/download_url.t b/t/server/controller/download_url.t index 7cd03194b..ed44437d3 100644 --- a/t/server/controller/download_url.t +++ b/t/server/controller/download_url.t @@ -5,10 +5,10 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use HTTP::Request::Common qw( GET ); use MetaCPAN::Server (); -use MetaCPAN::TestHelpers; -use Plack::Test; +use MetaCPAN::TestHelpers qw( test_cache_headers ); +use Plack::Test (); use Test::More; -use Ref::Util qw(is_hashref); +use Ref::Util qw( is_hashref ); my $app = MetaCPAN::Server->new->to_app(); my $test = Plack::Test->create($app); diff --git a/t/server/controller/file.t b/t/server/controller/file.t index 396799fc3..c1a92dbec 100644 --- a/t/server/controller/file.t +++ b/t/server/controller/file.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/login/pause.t b/t/server/controller/login/pause.t index 312ba2830..608859499 100644 --- a/t/server/controller/login/pause.t +++ b/t/server/controller/login/pause.t @@ -3,9 +3,9 @@ use warnings; use lib 't/lib'; use utf8; -use Encode qw( encode is_utf8 FB_CROAK LEAVE_SRC ); +use Encode qw( encode FB_CROAK is_utf8 LEAVE_SRC ); use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; BEGIN { $ENV{EMAIL_SENDER_TRANSPORT} = 'Test' } diff --git a/t/server/controller/mirror.t b/t/server/controller/mirror.t index 54c7505c9..3f2263905 100644 --- a/t/server/controller/mirror.t +++ b/t/server/controller/mirror.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/module.t b/t/server/controller/module.t index 8b905473b..08d235166 100644 --- a/t/server/controller/module.t +++ b/t/server/controller/module.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/pod.t b/t/server/controller/pod.t index 7fb948fca..d362dc5a5 100644 --- a/t/server/controller/pod.t +++ b/t/server/controller/pod.t @@ -5,11 +5,11 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use HTTP::Request::Common qw( GET ); use MetaCPAN::Server (); -use MetaCPAN::TestHelpers; -use Path::Tiny qw(path); -use Plack::Test; +use MetaCPAN::TestHelpers qw( test_cache_headers ); +use Path::Tiny qw( path ); +use Plack::Test (); use Test::More; -use Try::Tiny qw( catch try ); +use Try::Tiny qw( try ); my $dir = path( MetaCPAN::Server->model('Source')->base_dir, 'DOY/Moose-0.02/Moose-0.02' ); diff --git a/t/server/controller/release.t b/t/server/controller/release.t index 03541d25f..73d7e574e 100644 --- a/t/server/controller/release.t +++ b/t/server/controller/release.t @@ -2,9 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use Encode; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; { diff --git a/t/server/controller/root.t b/t/server/controller/root.t index c0b417aa8..0b5f71831 100644 --- a/t/server/controller/root.t +++ b/t/server/controller/root.t @@ -2,8 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::Server::Test qw( app GET test_psgi); use Test::More; test_psgi app, sub { diff --git a/t/server/controller/scroll.t b/t/server/controller/scroll.t index a391a77a5..f044f9578 100644 --- a/t/server/controller/scroll.t +++ b/t/server/controller/scroll.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; test_psgi app, sub { diff --git a/t/server/controller/search/autocomplete.t b/t/server/controller/search/autocomplete.t index f69bee85d..ef95500c8 100644 --- a/t/server/controller/search/autocomplete.t +++ b/t/server/controller/search/autocomplete.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; test_psgi app, sub { diff --git a/t/server/controller/source.t b/t/server/controller/source.t index 337b075e6..46bd90ea4 100644 --- a/t/server/controller/source.t +++ b/t/server/controller/source.t @@ -4,7 +4,7 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/user/favorite.t b/t/server/controller/user/favorite.t index beedcba3b..b0be96ed0 100644 --- a/t/server/controller/user/favorite.t +++ b/t/server/controller/user/favorite.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok encode_json ); use Test::More; test_psgi app, sub { diff --git a/t/server/controller/user/turing.t b/t/server/controller/user/turing.t index 91c7a9ce1..6d203b2ec 100644 --- a/t/server/controller/user/turing.t +++ b/t/server/controller/user/turing.t @@ -16,7 +16,7 @@ use lib 't/lib'; } use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok encode_json ); use Test::More; test_psgi app, sub { diff --git a/t/server/not_found.t b/t/server/not_found.t index f842b6790..61f3d2849 100644 --- a/t/server/not_found.t +++ b/t/server/not_found.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; my @tests = ( diff --git a/t/server/sanitize_query.t b/t/server/sanitize_query.t index ecce2fc6b..f4b9ae6eb 100644 --- a/t/server/sanitize_query.t +++ b/t/server/sanitize_query.t @@ -3,10 +3,9 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::TestHelpers qw( decode_json_ok encode_json ); use Test::More skip_all => 'Scripting is disabled'; -use Try::Tiny qw( catch try ); -use URI; +use URI (); sub uri { my $uri = URI->new(shift); diff --git a/t/test-vars.t b/t/test-vars.t index ed4ee03ef..1787f26c4 100644 --- a/t/test-vars.t +++ b/t/test-vars.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Test::More; -use Test::Vars; +use Test::Vars import => [qw( vars_ok )]; vars_ok('MetaCPAN::Server'); diff --git a/t/types.t b/t/types.t index 2373c0832..5edb78efb 100644 --- a/t/types.t +++ b/t/types.t @@ -1,8 +1,8 @@ -use Test::Most; use strict; use warnings; -use lib 't/lib'; -use MetaCPAN::Types::TypeTiny qw(Resources); + +use MetaCPAN::Types::TypeTiny qw( Resources ); +use Test::Most import => [qw( done_testing is_deeply ok )]; is_deeply( Resources->coerce( diff --git a/t/util.t b/t/util.t index 365495def..5c721c019 100644 --- a/t/util.t +++ b/t/util.t @@ -10,7 +10,7 @@ use MetaCPAN::Util qw( strip_pod ); -use Test::Most; +use Test::Most import => [qw( done_testing is lives_ok ok )]; ok( generate_sid(), 'generate_sid' ); From 5d31924c97f0eff4972da50d88204812fa39e076 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 4 Feb 2021 17:54:49 -0500 Subject: [PATCH 131/725] Tidy lib imports --- .../Deserialize/MetaCPANSanitizedJSON.pm | 2 +- lib/Catalyst/Plugin/OAuth2/Provider.pm | 6 +++--- .../Plugin/Session/Store/ElasticSearch.pm | 1 - lib/MetaCPAN/Document/Author.pm | 13 +++++++++--- lib/MetaCPAN/Document/Author/Set.pm | 2 +- lib/MetaCPAN/Document/Contributor/Set.pm | 2 +- lib/MetaCPAN/Document/Distribution/Set.pm | 2 +- lib/MetaCPAN/Document/Favorite/Set.pm | 2 +- lib/MetaCPAN/Document/File.pm | 19 ++++++++++------- lib/MetaCPAN/Document/File/Set.pm | 10 ++++----- lib/MetaCPAN/Document/Mirror/Set.pm | 2 +- lib/MetaCPAN/Document/Package/Set.pm | 2 +- lib/MetaCPAN/Document/Permission/Set.pm | 2 +- lib/MetaCPAN/Document/Rating/Set.pm | 2 +- lib/MetaCPAN/Document/Release.pm | 18 +++++++++------- lib/MetaCPAN/Document/Release/Set.pm | 2 +- lib/MetaCPAN/Model/Release.pm | 4 ++-- lib/MetaCPAN/Model/User/Account.pm | 6 +++--- lib/MetaCPAN/Pod/Renderer.pm | 4 ++-- lib/MetaCPAN/Role/HasConfig.pm | 4 ++-- lib/MetaCPAN/Role/Logger.pm | 2 +- lib/MetaCPAN/Role/Script.pm | 9 ++++---- lib/MetaCPAN/Script/Author.pm | 6 +++--- lib/MetaCPAN/Script/Backup.pm | 6 +++--- lib/MetaCPAN/Script/CPANTesters.pm | 14 +++++-------- lib/MetaCPAN/Script/CPANTestersAPI.pm | 2 +- lib/MetaCPAN/Script/Check.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 2 +- lib/MetaCPAN/Script/Mirrors.pm | 2 +- lib/MetaCPAN/Script/Purge.pm | 2 +- lib/MetaCPAN/Script/River.pm | 2 +- lib/MetaCPAN/Script/Role/External/Fedora.pm | 2 +- lib/MetaCPAN/Script/Snapshot.pm | 6 +++--- lib/MetaCPAN/Script/Tickets.pm | 21 +++++++------------ lib/MetaCPAN/Script/Watcher.pm | 2 +- lib/MetaCPAN/Server.pm | 5 ++--- lib/MetaCPAN/Server/Controller.pm | 9 +++----- lib/MetaCPAN/Server/Controller/Changes.pm | 2 +- lib/MetaCPAN/Server/Controller/Diff.pm | 4 ++-- lib/MetaCPAN/Server/Controller/Login.pm | 2 +- .../Server/Controller/Login/GitHub.pm | 10 ++++----- .../Server/Controller/Login/Google.pm | 6 +++--- lib/MetaCPAN/Server/Controller/Login/PAUSE.pm | 5 +---- .../Server/Controller/Login/Twitter.pm | 9 ++------ lib/MetaCPAN/Server/Controller/Scroll.pm | 2 +- lib/MetaCPAN/Server/Diff.pm | 2 +- lib/MetaCPAN/Server/Model/CPAN.pm | 2 +- lib/MetaCPAN/Server/Model/Search.pm | 2 +- lib/MetaCPAN/Server/Model/Source.pm | 4 ++-- lib/MetaCPAN/Server/View/JSONP.pm | 2 +- lib/MetaCPAN/Server/View/Pod.pm | 2 +- lib/MetaCPAN/Types/Internal.pm | 4 ++-- lib/MetaCPAN/Types/TypeTiny.pm | 2 +- t/model/release/dependencies.t | 1 - 54 files changed, 123 insertions(+), 137 deletions(-) diff --git a/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm b/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm index b491ff9c9..7d38b3d57 100644 --- a/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm +++ b/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm @@ -2,7 +2,7 @@ package Catalyst::Action::Deserialize::MetaCPANSanitizedJSON; use Moose; use namespace::autoclean; -use Try::Tiny; +use Try::Tiny qw( catch try ); use Cpanel::JSON::XS (); use MetaCPAN::Server::QuerySanitizer (); diff --git a/lib/Catalyst/Plugin/OAuth2/Provider.pm b/lib/Catalyst/Plugin/OAuth2/Provider.pm index f96ff6812..f5bc00283 100644 --- a/lib/Catalyst/Plugin/OAuth2/Provider.pm +++ b/lib/Catalyst/Plugin/OAuth2/Provider.pm @@ -18,9 +18,9 @@ package Catalyst::Plugin::OAuth2::Provider::Controller; use Moose; BEGIN { extends 'Catalyst::Controller' } -use Digest::SHA; -use Cpanel::JSON::XS; -use URI; +use Digest::SHA (); +use Cpanel::JSON::XS qw( decode_json encode_json ); +use URI (); has login => ( is => 'ro' ); has clients => ( is => 'ro' ); diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index 0ccc266d0..f4ec351d7 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -4,7 +4,6 @@ package Catalyst::Plugin::Session::Store::ElasticSearch; use Moose; extends 'Catalyst::Plugin::Session::Store'; -use List::MoreUtils qw(); use MooseX::Types::ElasticSearch qw(:all); has _session_es => ( diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 0526c91be..ce2967cb9 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -8,10 +8,17 @@ use ElasticSearchX::Model::Document; # load order not important use Gravatar::URL (); -use MetaCPAN::Types qw(Profile); +use MetaCPAN::Types qw( Profile ); use MetaCPAN::Types::TypeTiny qw( - ArrayRefPromote Blog NonEmptySimpleStr PerlMongers - ArrayRef Bool Dict HashRef Str Tuple Optional + ArrayRef + ArrayRefPromote + Blog + Bool + Dict + HashRef + NonEmptySimpleStr + PerlMongers + Str ); use MetaCPAN::Util; diff --git a/lib/MetaCPAN/Document/Author/Set.pm b/lib/MetaCPAN/Document/Author/Set.pm index 2120ecd2b..8ad81236c 100644 --- a/lib/MetaCPAN/Document/Author/Set.pm +++ b/lib/MetaCPAN/Document/Author/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Author::Set; use Moose; -use MetaCPAN::Query::Author; +use MetaCPAN::Query::Author (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Contributor/Set.pm b/lib/MetaCPAN/Document/Contributor/Set.pm index 18e19deb5..17fdbba37 100644 --- a/lib/MetaCPAN/Document/Contributor/Set.pm +++ b/lib/MetaCPAN/Document/Contributor/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Contributor::Set; use Moose; -use MetaCPAN::Query::Contributor; +use MetaCPAN::Query::Contributor (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Distribution/Set.pm b/lib/MetaCPAN/Document/Distribution/Set.pm index cf275c749..d0d0df59d 100644 --- a/lib/MetaCPAN/Document/Distribution/Set.pm +++ b/lib/MetaCPAN/Document/Distribution/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Distribution::Set; use Moose; -use MetaCPAN::Query::Distribution; +use MetaCPAN::Query::Distribution (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Favorite/Set.pm b/lib/MetaCPAN/Document/Favorite/Set.pm index 6e3112021..b2006b3f1 100644 --- a/lib/MetaCPAN/Document/Favorite/Set.pm +++ b/lib/MetaCPAN/Document/Favorite/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Favorite::Set; use Moose; -use MetaCPAN::Query::Favorite; +use MetaCPAN::Query::Favorite (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 04a88be13..f3525c995 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -7,18 +7,23 @@ use utf8; use Moose; use ElasticSearchX::Model::Document; -use Encode; use List::AllUtils qw( any ); -use MetaCPAN::Document::Module; -use MetaCPAN::Types qw(Module); +use MetaCPAN::Document::Module (); +use MetaCPAN::Types qw( Module ); use MetaCPAN::Types::TypeTiny qw( - Stat ArrayRef Bool Int Maybe Num ScalarRef Str + ArrayRef + Bool + Int + Maybe + Num + ScalarRef + Stat + Str ); use MetaCPAN::Util qw(numify_version); -use Plack::MIME; -use Pod::Text; +use Plack::MIME (); +use Pod::Text (); use Try::Tiny qw( catch try ); -use URI::Escape (); Plack::MIME->add_type( '.t' => 'text/x-script.perl' ); Plack::MIME->add_type( '.pod' => 'text/x-pod' ); diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index c5db09032..bc76de401 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -2,13 +2,11 @@ package MetaCPAN::Document::File::Set; use Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); -use Ref::Util qw( is_hashref ); use List::Util qw( max ); - -use MetaCPAN::Query::File; -use MetaCPAN::Query::Favorite; -use MetaCPAN::Query::Release; +use MetaCPAN::Query::Favorite (); +use MetaCPAN::Query::File (); +use MetaCPAN::Query::Release (); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Mirror/Set.pm b/lib/MetaCPAN/Document/Mirror/Set.pm index b07889e58..35b0d0248 100644 --- a/lib/MetaCPAN/Document/Mirror/Set.pm +++ b/lib/MetaCPAN/Document/Mirror/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Mirror::Set; use Moose; -use MetaCPAN::Query::Mirror; +use MetaCPAN::Query::Mirror (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Package/Set.pm b/lib/MetaCPAN/Document/Package/Set.pm index 3a9aec12c..ed7774331 100644 --- a/lib/MetaCPAN/Document/Package/Set.pm +++ b/lib/MetaCPAN/Document/Package/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Package::Set; use Moose; -use MetaCPAN::Query::Package; +use MetaCPAN::Query::Package (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Permission/Set.pm b/lib/MetaCPAN/Document/Permission/Set.pm index ac51db2d4..c6ac91110 100644 --- a/lib/MetaCPAN/Document/Permission/Set.pm +++ b/lib/MetaCPAN/Document/Permission/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Permission::Set; use Moose; -use MetaCPAN::Query::Permission; +use MetaCPAN::Query::Permission (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Rating/Set.pm b/lib/MetaCPAN/Document/Rating/Set.pm index 9bb30d73c..7661b87cc 100644 --- a/lib/MetaCPAN/Document/Rating/Set.pm +++ b/lib/MetaCPAN/Document/Rating/Set.pm @@ -2,7 +2,7 @@ package MetaCPAN::Document::Rating::Set; use Moose; -use MetaCPAN::Query::Rating; +use MetaCPAN::Query::Rating (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index a6e89470a..c2e2d045b 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -1,17 +1,19 @@ package MetaCPAN::Document::Release; -use strict; -use warnings; - use Moose; + use DateTime qw(); -use Ref::Util qw(); use ElasticSearchX::Model::Document; - -use MetaCPAN::Types qw(Dependency); +use MetaCPAN::Types qw( Dependency ); use MetaCPAN::Types::TypeTiny qw( - HashRefCPANMeta Resources Stat Tests - ArrayRef Bool Num Str + ArrayRef + Bool + HashRefCPANMeta + Num + Resources + Stat + Str + Tests ); use MetaCPAN::Util qw( numify_version ); diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index 7ca56d4f9..5ec58e62e 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -4,7 +4,7 @@ use Moose; use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); -use MetaCPAN::Query::Release; +use MetaCPAN::Query::Release (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index 5b811f741..f0a0d0e60 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -10,12 +10,12 @@ use DateTime (); use File::Find (); use File::Spec (); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Model::Archive; +use MetaCPAN::Model::Archive (); use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Str ); use MetaCPAN::Util qw( fix_version); use Module::Metadata 1.000012 (); # Improved package detection. use MooseX::StrictConstructor; -use Path::Tiny qw(path); +use Path::Tiny qw( path ); use Parse::PMFile; use Try::Tiny qw( catch try ); diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index f9acfe47a..1c730d02f 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -6,9 +6,9 @@ use warnings; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Model::User::Identity; -use MetaCPAN::Types qw(Identity); -use MetaCPAN::Types::TypeTiny qw(ArrayRef Bool Dict Str); +use MetaCPAN::Model::User::Identity (); +use MetaCPAN::Types qw( Identity ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Dict Str ); use MetaCPAN::Util; =head1 PROPERTIES diff --git a/lib/MetaCPAN/Pod/Renderer.pm b/lib/MetaCPAN/Pod/Renderer.pm index 00b6bfcb2..909951a68 100644 --- a/lib/MetaCPAN/Pod/Renderer.pm +++ b/lib/MetaCPAN/Pod/Renderer.pm @@ -5,9 +5,9 @@ use MetaCPAN::Moose; use MetaCPAN::Pod::XHTML; use MetaCPAN::Types::TypeTiny qw( Uri ); use Pod::Markdown; -use Pod::POM; +use Pod::POM (); use Pod::POM::View::Pod; -use Pod::Text; +use Pod::Text (); has perldoc_url_prefix => ( is => 'ro', diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index cc1957c8e..3e75e7f2d 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -2,9 +2,9 @@ package MetaCPAN::Role::HasConfig; use Moose::Role; -use FindBin; +use FindBin (); use Config::ZOMG (); -use MetaCPAN::Types::TypeTiny qw(HashRef); +use MetaCPAN::Types::TypeTiny qw( HashRef ); use Module::Runtime qw( require_module ); # Done like this so can be required by a role diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index 19d671cf8..dd7bbea66 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; -use MetaCPAN::Types::TypeTiny qw(Logger Str); +use MetaCPAN::Types::TypeTiny qw( Logger Str ); use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; use Path::Tiny qw( path ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index f90d5168b..da11e0890 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -3,15 +3,14 @@ package MetaCPAN::Role::Script; use Moose::Role; use ElasticSearchX::Model::Document::Types qw(:all); -use FindBin; use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Model; -use MetaCPAN::Types::TypeTiny qw( Path Int Str Bool ); -use Mojo::Server; +use MetaCPAN::Model (); +use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str ); +use Mojo::Server (); use Term::ANSIColor qw( colored ); use IO::Interactive qw( is_interactive ); -use IO::Prompt; +use IO::Prompt qw( prompt ); use File::Path (); use Carp (); diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 5ac2f1ea8..e59bbdb3d 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -12,9 +12,9 @@ use Encode (); use File::stat (); use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log ); -use MetaCPAN::Document::Author; -use URI (); -use XML::Simple qw(XMLin); +use MetaCPAN::Document::Author (); +use URI (); +use XML::Simple qw( XMLin ); =head1 SYNOPSIS diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 450923ae1..a1e2c664a 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -7,11 +7,11 @@ use feature qw( state ); use Data::Printer; use DateTime; use IO::Zlib (); -use Cpanel::JSON::XS; +use Cpanel::JSON::XS qw( decode_json encode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types::TypeTiny qw( Path Bool Int Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str ); use Moose; -use Try::Tiny; +use Try::Tiny qw( catch try ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 781b7bbb7..dc7e15949 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -1,17 +1,13 @@ package MetaCPAN::Script::CPANTesters; -use strict; -use warnings; +use Moose; use DBI (); -use File::Spec::Functions qw(catfile); -use File::Temp qw(tempdir); -use File::stat qw(stat); -use IO::Uncompress::Bunzip2 qw(bunzip2); +use File::stat qw( stat ); +use IO::Uncompress::Bunzip2 qw( bunzip2 ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types::TypeTiny qw( Path Bool Uri ); -use ElasticSearchX::Model::Document::Types qw(ESBulk); -use Moose; +use MetaCPAN::Types::TypeTiny qw( Bool Path Uri ); +use ElasticSearchX::Model::Document::Types qw( ESBulk ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index dc781cfd6..9a4f3a6b8 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -6,7 +6,7 @@ use warnings; use Log::Contextual qw( :log :dlog ); use Cpanel::JSON::XS qw( decode_json ); use MetaCPAN::Types::TypeTiny qw( Uri ); -use ElasticSearchX::Model::Document::Types qw(ESBulk); +use ElasticSearchX::Model::Document::Types qw( ESBulk ); use Moose; with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index 985e58cc2..768392bf1 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Check; use strict; use warnings; -use File::Spec::Functions qw(catfile); +use File::Spec::Functions qw( catfile ); use Log::Contextual qw( :log ); use Moose; use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index c5504141b..a3e0e9e02 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -8,7 +8,7 @@ use Moose; use MooseX::Aliases; use Parse::CPAN::Packages::Fast; use Regexp::Common qw(time); -use Time::Local; +use Time::Local qw( timelocal ); use MetaCPAN::Types::TypeTiny qw( Bool Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Mirrors.pm b/lib/MetaCPAN/Script/Mirrors.pm index d27170a83..df2abc9f1 100644 --- a/lib/MetaCPAN/Script/Mirrors.pm +++ b/lib/MetaCPAN/Script/Mirrors.pm @@ -5,7 +5,7 @@ use warnings; use Cpanel::JSON::XS (); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Document::Mirror; +use MetaCPAN::Document::Mirror (); use Moose; with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index 980dfca67..9da812cd6 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Purge; use Moose; use Log::Contextual qw( :log ); -use MetaCPAN::Types::TypeTiny qw( Bool Str HashRef ); +use MetaCPAN::Types::TypeTiny qw( Bool HashRef Str ); use MetaCPAN::Util qw( author_dir ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index c69aa79bd..ca8146a27 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -5,7 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types::TypeTiny qw( ArrayRef Str Uri ); +use MetaCPAN::Types::TypeTiny qw( Uri ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Role/External/Fedora.pm b/lib/MetaCPAN/Script/Role/External/Fedora.pm index 80fe8b125..2825ea33c 100644 --- a/lib/MetaCPAN/Script/Role/External/Fedora.pm +++ b/lib/MetaCPAN/Script/Role/External/Fedora.pm @@ -4,7 +4,7 @@ use v5.010; use Moose::Role; use namespace::autoclean; -use URI; +use URI (); use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log ); diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index b0f90d702..7ccaae533 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -3,15 +3,15 @@ package MetaCPAN::Script::Snapshot; use strict; use warnings; -use Cpanel::JSON::XS qw(encode_json decode_json); +use Cpanel::JSON::XS qw( decode_json encode_json ); use DateTime (); use DateTime::Format::ISO8601 (); use DDP; use HTTP::Tiny (); use Log::Contextual qw( :log ); -use MetaCPAN::Types::TypeTiny qw( Bool Int Str ArrayRef ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Str ); use Moose; -use Sys::Hostname qw(hostname); +use Sys::Hostname qw( hostname ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index a7ff38b43..2f55b270a 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -1,24 +1,19 @@ package MetaCPAN::Script::Tickets; -use strict; -use warnings; +use Moose; use namespace::autoclean; # Some issue with rt.cpan.org's cert $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; -use HTTP::Request::Common; -use IO::String; -use LWP::UserAgent; -use List::MoreUtils qw(uniq); -use List::Util qw(sum); +use HTTP::Request::Common qw( GET ); +use IO::String (); use Log::Contextual qw( :log :dlog ); -use Moose; -use Parse::CSV; -use Pithub; -use URI::Escape qw(uri_escape); -use MetaCPAN::Types::TypeTiny qw( ArrayRef Str ); -use Ref::Util qw( is_ref is_hashref); +use MetaCPAN::Types::TypeTiny (); +use Parse::CSV (); +use Pithub (); +use Ref::Util qw( is_hashref is_ref ); +use URI::Escape qw( uri_escape ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index ab84af910..b746253a1 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -5,7 +5,7 @@ use warnings; use Moose; use CPAN::DistnameInfo; -use Cpanel::JSON::XS; +use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log ); use MetaCPAN::Util; use MetaCPAN::Types::TypeTiny qw( Bool ); diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index b2a71b354..e8cd6c7e1 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -5,10 +5,9 @@ use Moose; ## no critic (Modules::RequireEndWithOne) use Catalyst qw( +MetaCPAN::Role::Fastly::Catalyst ), '-Log=warn,error,fatal'; use CatalystX::RoleApplicator; -use Digest::SHA; -use File::Temp qw( tempdir ); +use Digest::SHA (); use Log::Log4perl::Catalyst; -use Plack::Builder; +use Plack::Builder qw( builder enable ); use Plack::Middleware::ReverseProxy; use Plack::Middleware::ServerStatus::Lite; use Ref::Util qw( is_arrayref is_hashref ); diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index a64e40cb3..7a3985d97 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -1,13 +1,10 @@ package MetaCPAN::Server::Controller; -use strict; -use warnings; +use Moose; use namespace::autoclean; -use Cpanel::JSON::XS; -use List::MoreUtils (); -use Moose::Util (); -use Moose; +use Cpanel::JSON::XS (); +use Moose::Util (); use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); diff --git a/lib/MetaCPAN/Server/Controller/Changes.pm b/lib/MetaCPAN/Server/Controller/Changes.pm index 6f0294f2b..71f6ad0b1 100644 --- a/lib/MetaCPAN/Server/Controller/Changes.pm +++ b/lib/MetaCPAN/Server/Controller/Changes.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use Encode (); use Moose; -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Diff.pm b/lib/MetaCPAN/Server/Controller/Diff.pm index 08615daa3..2df5157b7 100644 --- a/lib/MetaCPAN/Server/Controller/Diff.pm +++ b/lib/MetaCPAN/Server/Controller/Diff.pm @@ -3,9 +3,9 @@ package MetaCPAN::Server::Controller::Diff; use strict; use warnings; -use MetaCPAN::Server::Diff; +use MetaCPAN::Server::Diff (); use Moose; -use Try::Tiny; +use Try::Tiny qw( catch try ); use namespace::autoclean; BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Login.pm b/lib/MetaCPAN/Server/Controller/Login.pm index d4b7af597..d4e5602f7 100644 --- a/lib/MetaCPAN/Server/Controller/Login.pm +++ b/lib/MetaCPAN/Server/Controller/Login.pm @@ -3,7 +3,7 @@ package MetaCPAN::Server::Controller::Login; use strict; use warnings; -use Cpanel::JSON::XS; +use Cpanel::JSON::XS qw( decode_json encode_json ); use Moose; BEGIN { extends 'Catalyst::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Login/GitHub.pm b/lib/MetaCPAN/Server/Controller/Login/GitHub.pm index 723be8fef..7c23c99bc 100644 --- a/lib/MetaCPAN/Server/Controller/Login/GitHub.pm +++ b/lib/MetaCPAN/Server/Controller/Login/GitHub.pm @@ -1,13 +1,11 @@ package MetaCPAN::Server::Controller::Login::GitHub; -use strict; -use warnings; - -use HTTP::Request::Common; -use Cpanel::JSON::XS; -use LWP::UserAgent; use Moose; +use HTTP::Request::Common qw( GET POST ); +use Cpanel::JSON::XS qw( decode_json ); +use LWP::UserAgent (); + BEGIN { extends 'MetaCPAN::Server::Controller::Login' } has [qw(consumer_key consumer_secret)] => ( diff --git a/lib/MetaCPAN/Server/Controller/Login/Google.pm b/lib/MetaCPAN/Server/Controller/Login/Google.pm index 8d7d636b8..818c41815 100644 --- a/lib/MetaCPAN/Server/Controller/Login/Google.pm +++ b/lib/MetaCPAN/Server/Controller/Login/Google.pm @@ -3,9 +3,9 @@ package MetaCPAN::Server::Controller::Login::Google; use strict; use warnings; -use HTTP::Request::Common; -use Cpanel::JSON::XS; -use LWP::UserAgent; +use HTTP::Request::Common qw( GET POST ); +use Cpanel::JSON::XS qw( decode_json ); +use LWP::UserAgent (); use Moose; BEGIN { extends 'MetaCPAN::Server::Controller::Login' } diff --git a/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm b/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm index 125fac102..f806a33f4 100644 --- a/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm +++ b/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm @@ -1,13 +1,10 @@ package MetaCPAN::Server::Controller::Login::PAUSE; -use strict; -use warnings; +use Moose; use namespace::autoclean; use CHI (); use Log::Contextual qw( :log :dlog ); -use Moose; -use Try::Tiny qw( catch try ); use MetaCPAN::Model::Email::PAUSE (); use MetaCPAN::Util qw( generate_sid ); diff --git a/lib/MetaCPAN/Server/Controller/Login/Twitter.pm b/lib/MetaCPAN/Server/Controller/Login/Twitter.pm index 134fb1ba9..7cc03d07f 100644 --- a/lib/MetaCPAN/Server/Controller/Login/Twitter.pm +++ b/lib/MetaCPAN/Server/Controller/Login/Twitter.pm @@ -1,13 +1,8 @@ package MetaCPAN::Server::Controller::Login::Twitter; -use strict; -use warnings; - -use HTTP::Request::Common; -use Cpanel::JSON::XS; -use LWP::UserAgent; use Moose; -use Net::Twitter; + +use Net::Twitter (); BEGIN { extends 'MetaCPAN::Server::Controller::Login' } diff --git a/lib/MetaCPAN/Server/Controller/Scroll.pm b/lib/MetaCPAN/Server/Controller/Scroll.pm index e3eb5271e..cae641f99 100644 --- a/lib/MetaCPAN/Server/Controller/Scroll.pm +++ b/lib/MetaCPAN/Server/Controller/Scroll.pm @@ -5,7 +5,7 @@ use warnings; use namespace::autoclean; use Moose; -use Try::Tiny; +use Try::Tiny qw( catch try ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Diff.pm b/lib/MetaCPAN/Server/Diff.pm index b075bec51..68a187697 100644 --- a/lib/MetaCPAN/Server/Diff.pm +++ b/lib/MetaCPAN/Server/Diff.pm @@ -5,7 +5,7 @@ use warnings; use Moose; use Encoding::FixLatin (); -use IPC::Run3; +use IPC::Run3 qw( run3 ); use MetaCPAN::Types::TypeTiny qw( ArrayRef ); use File::Spec; diff --git a/lib/MetaCPAN/Server/Model/CPAN.pm b/lib/MetaCPAN/Server/Model/CPAN.pm index 72f2c6f56..0c02e06d5 100644 --- a/lib/MetaCPAN/Server/Model/CPAN.pm +++ b/lib/MetaCPAN/Server/Model/CPAN.pm @@ -3,7 +3,7 @@ package MetaCPAN::Server::Model::CPAN; use strict; use warnings; -use MetaCPAN::Model; +use MetaCPAN::Model (); use Moose; extends 'Catalyst::Model'; diff --git a/lib/MetaCPAN/Server/Model/Search.pm b/lib/MetaCPAN/Server/Model/Search.pm index bba8f2163..6e9049d4c 100644 --- a/lib/MetaCPAN/Server/Model/Search.pm +++ b/lib/MetaCPAN/Server/Model/Search.pm @@ -4,7 +4,7 @@ use strict; use warnings; use Moose; -use MetaCPAN::Model::Search; +use MetaCPAN::Model::Search (); extends 'MetaCPAN::Server::Model::CPAN'; diff --git a/lib/MetaCPAN/Server/Model/Source.pm b/lib/MetaCPAN/Server/Model/Source.pm index 6c05c9937..6c55a7bf4 100644 --- a/lib/MetaCPAN/Server/Model/Source.pm +++ b/lib/MetaCPAN/Server/Model/Source.pm @@ -3,8 +3,8 @@ package MetaCPAN::Server::Model::Source; use strict; use warnings; -use File::Find::Rule (); -use MetaCPAN::Model::Archive; +use File::Find::Rule (); +use MetaCPAN::Model::Archive (); use MetaCPAN::Types::TypeTiny qw( Path ); use MetaCPAN::Util (); use Moose; diff --git a/lib/MetaCPAN/Server/View/JSONP.pm b/lib/MetaCPAN/Server/View/JSONP.pm index 2c603be92..63e9eaec6 100644 --- a/lib/MetaCPAN/Server/View/JSONP.pm +++ b/lib/MetaCPAN/Server/View/JSONP.pm @@ -3,7 +3,7 @@ package MetaCPAN::Server::View::JSONP; use strict; use warnings; -use Encode qw(decode_utf8); +use Encode qw( decode_utf8 ); use Cpanel::JSON::XS (); use Moose; diff --git a/lib/MetaCPAN/Server/View/Pod.pm b/lib/MetaCPAN/Server/View/Pod.pm index b7d6e57d2..f1602cbb3 100644 --- a/lib/MetaCPAN/Server/View/Pod.pm +++ b/lib/MetaCPAN/Server/View/Pod.pm @@ -3,7 +3,7 @@ package MetaCPAN::Server::View::Pod; use strict; use warnings; -use MetaCPAN::Pod::Renderer; +use MetaCPAN::Pod::Renderer (); use Moose; extends 'Catalyst::View'; diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index c73da3805..b6b57cb4a 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -4,8 +4,8 @@ use strict; use warnings; use CPAN::Meta; -use ElasticSearchX::Model::Document::Types qw(Type); -use MooseX::Getopt::OptionTypeMap; +use ElasticSearchX::Model::Document::Types qw( Type ); +use MooseX::Getopt::OptionTypeMap (); use MooseX::Types::Moose qw( ArrayRef HashRef ); use MooseX::Types -declare => [ diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index 2a0492220..2a3f657fa 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -21,7 +21,7 @@ use Type::Library -base, -declare => ( HashRefCPANMeta ) ); -use Type::Utils -all; +use Type::Utils qw( as coerce declare extends from via ); BEGIN { extends qw( diff --git a/t/model/release/dependencies.t b/t/model/release/dependencies.t index 97f24f5cd..afdc62317 100644 --- a/t/model/release/dependencies.t +++ b/t/model/release/dependencies.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use FindBin (); use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner; use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); From 531c10f9344e1f30c5dd7e2e1aae62307ec87b88 Mon Sep 17 00:00:00 2001 From: Graham TerMarsch Date: Sat, 20 Feb 2021 18:21:32 -0800 Subject: [PATCH 132/725] Add a negative boost to Deprecated modules, when searching MetaCPAN. --- lib/MetaCPAN/Model/Search.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index 199eca5bd..41e5b4e46 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -222,8 +222,14 @@ sub build_query { $params //= {}; ( my $clean = $search_term ) =~ s/::/ /g; - my $negative - = { term => { 'mime' => { value => 'text/x-script.perl' } } }; + my $negative = { + bool => { + should => [ + { term => { 'mime' => { value => 'text/x-script.perl' } } }, + { term => { 'deprecated' => { value => 1, boost => -100 } } }, + ], + }, + }; my $positive = { bool => { From 65ca6915782063db544857b00ecac2c7f9617d22 Mon Sep 17 00:00:00 2001 From: Graham TerMarsch Date: Sat, 27 Feb 2021 16:19:07 -0800 Subject: [PATCH 133/725] No longer need this boolean re-cast; ES indexes return proper bools now. As per discussion in metacpan/metacpan-web#2438, the ElasticSearch indices that back the MetaCPAN API have been updated to now consistently return Boolean values for the `deprecated` field. Thus, no longer need this check for string `"true"` or `"false"` values, which would then be cast accordingly to a proper boolean. --- lib/MetaCPAN/Document/File/Set.pm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index bc76de401..d17c3f798 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -628,12 +628,6 @@ sub autocomplete_suggester { ( $_->{fields}{documentation}[0] => \%record ); } @{ $data->{hits}{hits} }; - # normalize 'deprecated' field values to boolean (1/0) values (because ES) - for my $v ( values %valid ) { - $v->{deprecated} = 1 if $v->{deprecated} eq 'true'; - $v->{deprecated} = 0 if $v->{deprecated} eq 'false'; - } - # remove any exact match, it will be added later my $exact = delete $valid{$query}; From dff61beca229a4ad01deef6501ce1a550182869d Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sun, 4 Apr 2021 11:10:22 +0200 Subject: [PATCH 134/725] Add single pauseid handling option to Author script --- lib/MetaCPAN/Script/Author.pm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index e59bbdb3d..35afe8dc0 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -15,6 +15,7 @@ use Log::Contextual qw( :log ); use MetaCPAN::Document::Author (); use URI (); use XML::Simple qw( XMLin ); +use MetaCPAN::Types::TypeTiny qw( Str ); =head1 SYNOPSIS @@ -29,6 +30,11 @@ has author_fh => ( default => sub { shift->cpan . '/authors/00whois.xml' }, ); +has pauseid => ( + is => 'ro', + isa => Str, +); + sub run { my $self = shift; @@ -46,9 +52,14 @@ sub index_authors { my $self = shift; my $type = $self->index->type('author'); my $authors = XMLin( $self->author_fh )->{cpanid}; - my $count = keys %$authors; - log_debug {"Counting author"}; - log_info {"Indexing $count authors"}; + if ( $self->pauseid ) { + log_info {"Indexing 1 author"}; + } + else { + my $count = keys %$authors; + log_debug {"Counting author"}; + log_info {"Indexing $count authors"}; + } log_debug {"Getting last update dates"}; my $dates @@ -70,7 +81,9 @@ sub index_authors { my @author_ids_to_purge; - while ( my ( $pauseid, $data ) = each %$authors ) { + for my $pauseid ( keys %$authors ) { + next if ( $self->pauseid and $self->pauseid ne $pauseid ); + my $data = $authors->{$pauseid}; my ( $name, $email, $homepage, $asciiname ) = ( @$data{qw(fullname email homepage asciiname)} ); $name = undef if ( ref $name ); @@ -140,6 +153,7 @@ sub index_authors { } ); } + $bulk->flush; $self->index->refresh; @@ -163,7 +177,7 @@ sub author_config { # Get the most recent version my ($file) = sort { $dir->child($b)->stat->mtime <=> $dir->child($a)->stat->mtime } - grep {m/author-.*?\.json/} readdir($dh); + grep {m/author-.*?\.json/} readdir($dh); return $fallback unless ($file); $file = $dir->child($file); return $fallback if !-e $file; From e759491a1bf8b4ccb84592a5cac02ccfd8128674 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sun, 4 Apr 2021 11:21:12 +0200 Subject: [PATCH 135/725] Ensure name update from CPAN in case of custodial account --- lib/MetaCPAN/Script/Author.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 35afe8dc0..932914de4 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -90,12 +90,16 @@ sub index_authors { $asciiname = q{} unless defined $asciiname; $email = lc($pauseid) . '@cpan.org' unless ( $email && Email::Valid->address($email) ); + my $is_pause_custodial_account + = ( $name && $name =~ /\(PAUSE Custodial Account\)/ ); log_debug { Encode::encode_utf8( sprintf( "Indexing %s: %s <%s>", $pauseid, $name, $email ) ); }; - my $conf = $self->author_config( $pauseid, $dates ) || next; - my $put = { + my $conf = $self->author_config( $pauseid, $dates ); + next unless ( $conf or $is_pause_custodial_account ); + $conf ||= {}; + my $put = { pauseid => $pauseid, name => $name, asciiname => ref $asciiname ? undef : $asciiname, @@ -114,8 +118,7 @@ sub index_authors { grep {$_} @{ $put->{website} } ]; - $put->{is_pause_custodial_account} = 1 - if $name and $name =~ /\(PAUSE Custodial Account\)/; + $put->{is_pause_custodial_account} = 1 if $is_pause_custodial_account; # Now check the format we have is actually correct my @errors = MetaCPAN::Document::Author->validate($put); From 3bc704fe0afa9b52ec10de48c85e2c837792ad6d Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Mon, 5 Apr 2021 01:18:23 +0200 Subject: [PATCH 136/725] Added bus_factor to the mapping file This is just for future reference, the index (type) mapping is already done. --- lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm index 1328965de..757cdd3ed 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm @@ -96,6 +96,9 @@ sub mapping { "bucket" : { "type" : "integer" }, + "bus_factor" : { + "type" : "integer" + }, "immediate" : { "type" : "integer" }, From d88a818d7b609a2cb9c818ae75300f0e21effbc8 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 14 Apr 2021 11:33:58 -0400 Subject: [PATCH 137/725] Upgrade Perl::Tidy to 20210402 --- cpanfile | 2 +- cpanfile.snapshot | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cpanfile b/cpanfile index 69ad84c69..8693a69a5 100644 --- a/cpanfile +++ b/cpanfile @@ -190,7 +190,7 @@ requires 'LWP::ConsoleLogger::Easy'; requires 'MetaCPAN::Client', '2.017000'; requires 'Module::Faker', '0.015'; requires 'Module::Faker::Dist', '0.010'; -requires 'Perl::Tidy' => '20210111'; +requires 'Perl::Tidy' => '20210402'; requires 'Plack::Test::Agent'; requires 'Test::Code::TidyAll'; requires 'Test::More', '0.99'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 1c2b3fe07..128369efd 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6782,27 +6782,27 @@ DISTRIBUTIONS strict 0 version 0.77 warnings 0 - Perl-Tidy-20210111 - pathname: S/SH/SHANCOCK/Perl-Tidy-20210111.tar.gz - provides: - Perl::Tidy 20210111 - Perl::Tidy::Debugger 20210111 - Perl::Tidy::DevNull 20210111 - Perl::Tidy::Diagnostics 20210111 - Perl::Tidy::FileWriter 20210111 - Perl::Tidy::Formatter 20210111 - Perl::Tidy::HtmlWriter 20210111 - Perl::Tidy::IOScalar 20210111 - Perl::Tidy::IOScalarArray 20210111 - Perl::Tidy::IndentationItem 20210111 - Perl::Tidy::LineBuffer 20210111 - Perl::Tidy::LineSink 20210111 - Perl::Tidy::LineSource 20210111 - Perl::Tidy::Logger 20210111 - Perl::Tidy::Tokenizer 20210111 - Perl::Tidy::VerticalAligner 20210111 - Perl::Tidy::VerticalAligner::Alignment 20210111 - Perl::Tidy::VerticalAligner::Line 20210111 + Perl-Tidy-20210402 + pathname: S/SH/SHANCOCK/Perl-Tidy-20210402.tar.gz + provides: + Perl::Tidy 20210402 + Perl::Tidy::Debugger 20210402 + Perl::Tidy::DevNull 20210402 + Perl::Tidy::Diagnostics 20210402 + Perl::Tidy::FileWriter 20210402 + Perl::Tidy::Formatter 20210402 + Perl::Tidy::HtmlWriter 20210402 + Perl::Tidy::IOScalar 20210402 + Perl::Tidy::IOScalarArray 20210402 + Perl::Tidy::IndentationItem 20210402 + Perl::Tidy::LineBuffer 20210402 + Perl::Tidy::LineSink 20210402 + Perl::Tidy::LineSource 20210402 + Perl::Tidy::Logger 20210402 + Perl::Tidy::Tokenizer 20210402 + Perl::Tidy::VerticalAligner 20210402 + Perl::Tidy::VerticalAligner::Alignment 20210402 + Perl::Tidy::VerticalAligner::Line 20210402 requirements: ExtUtils::MakeMaker 0 PerlIO-gzip-0.20 From cbc58735658122f66c340136fbd33b7aee4b4851 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 14 Apr 2021 11:34:08 -0400 Subject: [PATCH 138/725] Tidy --- lib/MetaCPAN/Script/Author.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 932914de4..b3cf6307b 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -180,7 +180,7 @@ sub author_config { # Get the most recent version my ($file) = sort { $dir->child($b)->stat->mtime <=> $dir->child($a)->stat->mtime } - grep {m/author-.*?\.json/} readdir($dh); + grep {m/author-.*?\.json/} readdir($dh); return $fallback unless ($file); $file = $dir->child($file); return $fallback if !-e $file; From b88f0e66f1311d10da4007808a49258a7ca1e71b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 17 Apr 2021 10:44:42 -0400 Subject: [PATCH 139/725] Add workflow to create pull requests with cpanfile.snapshot updates --- .github/workflows/update-snapshot.yml | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/update-snapshot.yml diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml new file mode 100644 index 000000000..3ce7ed5e4 --- /dev/null +++ b/.github/workflows/update-snapshot.yml @@ -0,0 +1,35 @@ +name: Update cpanfile.snapshot +on: + schedule: + - cron: "1 15 * * 0" + workflow_dispatch: +jobs: + update-dep: + runs-on: "ubuntu-20.04" + steps: + - uses: actions/checkout@v2 + - name: Install Carton + run: > + curl -sL https://git.io/cpm | perl - + install -g Carton + --show-build-log-on-failure + - name: Install deps + run: > + curl -sL https://git.io/cpm | perl - + install + --cpanfile cpanfile + --resolver metacpan + --show-build-log-on-failure + --local-lib-contained=local + - name: Maybe update cpanfile.snapshot + run: carton + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + commit-message: Update cpanfile.snapshot + title: Update cpanfile.snapshot + body: | + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + branch: update-cpanfile-snapshot From 9fdd1047b7e3af2b3290c75656704038ed8bb11d Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Mon, 17 May 2021 23:40:01 -0400 Subject: [PATCH 140/725] Update links to ElasticSearch documentation Updates the documentation to the ElasticSearch 2.4 reference in order to fix the 404 errors. --- docs/API-docs.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/API-docs.md b/docs/API-docs.md index 9583cf3cb..73b855fbf 100644 --- a/docs/API-docs.md +++ b/docs/API-docs.md @@ -8,15 +8,15 @@ _All of these URLs can be tested using the [MetaCPAN Explorer](https://explorer. To learn more about the ElasticSearch query DSL (Domain-Specific Language) check out Clinton Gormley's [Terms of Endearment - ES Query DSL Explained](https://www.slideshare.net/clintongormley/terms-of-endearment-the-elasticsearch-query-dsl-explained) slides. -The query syntax is explained on ElasticSearch's [reference page](https://www.elasticsearch.org/guide/reference/query-dsl/). You can also check out this getting started tutorial about Elasticsearch [reference page](http://joelabrahamsson.com/elasticsearch-101/). +The query syntax is explained on ElasticSearch's [reference page](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/query-dsl.html). You can also check out this getting started tutorial about Elasticsearch [reference page](http://joelabrahamsson.com/elasticsearch-101/). ## Being polite -Currently, the only rules around using the API are to "be polite". We have enforced an upper limit of a size of 5,000 on search requests. If you need to fetch more than 5,000 items, you should look at using the scrolling API. Search this page for "scroll" to get an example using [Search::Elasticsearch](https://metacpan.org/pod/Search::Elasticsearch) or see the [Elasticsearch scroll docs](https://www.elasticsearch.org/guide/reference/fastapi/search/scroll.html) if you are connecting in some other way. +Currently, the only rules around using the API are to "be polite". We have enforced an upper limit of a size of 5,000 on search requests. If you need to fetch more than 5,000 items, you should look at using the scrolling API. Search this page for "scroll" to get an example using [Search::Elasticsearch](https://metacpan.org/pod/Search::Elasticsearch) or see the [Elasticsearch scroll docs](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html) if you are connecting in some other way. You can certainly scroll if you are fetching less than 5,000 items. You might want to do this if you are expecting a large data set, but will still need to run many requests to get all of the required data. -Be aware that when you scroll, your docs will come back unsorted, as noted in the [ElasticSearch scan documentation](https://www.elasticsearch.org/guide/reference/fastapi/search/search-type.html). +Be aware that when you scroll, your docs will come back unsorted, as noted in the [ElasticSearch scan documentation](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-search-type.html#scan). ## Identifying Yourself @@ -64,7 +64,7 @@ Joins on documents: Joins on search results is work in progress. -Restricting the joined results can be done by using the [boolean "should"](https://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html) occurrence type: +Restricting the joined results can be done by using the [boolean "should"](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/query-dsl-bool-query.html) occurrence type: ```sh curl -XPOST https://fastapi.metacpan.org/v1/author/PERLER?join=release -d ' From 9e1a8ea7e65db799881ceb044d38b52d3fa0679f Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 29 May 2021 23:40:28 -0400 Subject: [PATCH 141/725] File queries shared by path and prefix for category example Otherwise directories that are used by releases such as: - - will not have their examples listed on their release page. Fixes . --- lib/MetaCPAN/Query/File.pm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index cc49aa121..84ef1b322 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -142,27 +142,26 @@ my %perl_files = ( ], ); +my @shared_path_prefix_examples = qw( + example + examples + Example + Examples + sample + samples +); + my %path_files = ( example => [ qw( eg ex - ) + ), + @shared_path_prefix_examples, ], ); -my %prefix_files = ( - example => [ - qw( - example - examples - Example - Examples - sample - samples - ) - ], -); +my %prefix_files = ( example => [ @shared_path_prefix_examples, ], ); my %file_to_type; my %type_to_regex; From 45ec6e41df2b1111eb920d377af622e3c15b9fa6 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Sat, 29 May 2021 23:49:52 -0400 Subject: [PATCH 142/725] Add demo/demos as category example For example, found in the release: - --- lib/MetaCPAN/Query/File.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 84ef1b322..cfc60a393 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -149,6 +149,8 @@ my @shared_path_prefix_examples = qw( Examples sample samples + demo + demos ); my %path_files = ( From 4815efa379111c0122b9d2445328782bc6b8d5e3 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 12 Jun 2021 21:01:56 +0200 Subject: [PATCH 143/725] update mailmap --- .mailmap | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.mailmap b/.mailmap index f28c7504c..8c9325def 100644 --- a/.mailmap +++ b/.mailmap @@ -2,30 +2,43 @@ Amrita Mathew Andreas Marienborg +Andreea Pirvulescu +Andreea Pirvulescu Andrew Fresh Andrew Fresh Barry Walsh Brad Lhotsky Chris Nehren +Christopher White +Christopher White +Christopher White Clinton Gormley +Ed J Gabor Szabo Grant McLean Grant McLean J. Bobby Lopez +Jess Robinson Joel Berger Johannes Plunien +Mario Zieschang Mark Fowler Matthew Horsfall (alh) Michael Peters Michael Peters Michiel Beijen +Mickey Nasriachi +Mickey Nasriachi Mickey Nasriachi Moritz Onken +Nicolas R Olaf Alders Olaf Alders +Olaf Alders Randy Stauner Renee Baecker Shawn M Moore +Shawn Sorichetti Sunny Patel Sunny Patel Talina Shrotriya @@ -35,5 +48,6 @@ Thomas Sibley Tim Bunce Vyacheslav Matyukhin Zachary Dykstra +lnation oiami oiami From 0b057d8cff4773f8cc7477d684bacb811ac8139f Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 1 Jul 2021 20:06:55 +0200 Subject: [PATCH 144/725] Distribution: add defulat river values for first release [GH#1025] Initialise new distributions to a bus factor of 1 and zero dependencies --- lib/MetaCPAN/Document/Distribution.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/MetaCPAN/Document/Distribution.pm b/lib/MetaCPAN/Document/Distribution.pm index a5ec49cff..82ffd4bb8 100644 --- a/lib/MetaCPAN/Document/Distribution.pm +++ b/lib/MetaCPAN/Document/Distribution.pm @@ -27,6 +27,14 @@ has river => ( isa => RiverSummary, dynamic => 1, writer => '_set_river', + default => sub { + +{ + bucket => 0, + bus_factor => 1, + immediate => 0, + total => 0, + }; + }, ); sub releases { From 667d760de2dee4e86c31d690cbaafcfd08e41459 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 5 Jul 2021 22:31:26 -0400 Subject: [PATCH 145/725] Update deps --- cpanfile | 38 +- cpanfile.snapshot | 2662 ++++++++++++++++++++------------------------- 2 files changed, 1178 insertions(+), 1522 deletions(-) diff --git a/cpanfile b/cpanfile index 8693a69a5..a91f0a342 100644 --- a/cpanfile +++ b/cpanfile @@ -8,7 +8,7 @@ requires 'Archive::Tar', '2.04'; requires 'Authen::SASL', '2.16'; requires 'BackPAN::Index', '0.42'; requires 'Captcha::reCAPTCHA', '0.99'; -requires 'Catalyst', '5.90103'; +requires 'Catalyst', '5.90128'; requires 'Catalyst::Action::RenderView'; requires 'Catalyst::Controller'; requires 'Catalyst::Controller::REST'; @@ -41,11 +41,11 @@ requires 'Cwd'; requires 'Data::DPath'; requires 'Data::Dump'; requires 'Data::Dumper'; -requires 'Data::Printer', '0.38'; -requires 'DateTime', '1.24'; +requires 'Data::Printer', '1.000004'; +requires 'DateTime', '1.54'; requires 'DateTime::Format::ISO8601'; -requires 'DBD::SQLite', '1.50'; -requires 'DBI', '1.616'; +requires 'DBD::SQLite', '1.66'; +requires 'DBI', '1.643'; requires 'Devel::ArgNames'; requires 'Digest::MD5'; requires 'Digest::SHA'; @@ -98,7 +98,7 @@ requires 'Log::Log4perl::Appender::ScreenColoredLevels'; requires 'Log::Log4perl::Catalyst'; requires 'Log::Log4perl::Layout::JSON'; requires 'LWP::Protocol::https'; -requires 'LWP::UserAgent', '6.15'; +requires 'LWP::UserAgent', '6.55'; requires 'LWP::UserAgent::Paranoid'; requires 'MetaCPAN::Moose'; requires 'MetaCPAN::Pod::XHTML'; @@ -114,7 +114,7 @@ requires 'Mojolicious::Plugin::MountPSGI', '0.14'; requires 'Mojolicious::Plugin::OpenAPI'; requires 'Mojolicious::Plugin::Web::Auth', '0.17'; requires 'Mojo::Pg', '4.08'; -requires 'Moose', '2.1403'; +requires 'Moose', '2.2015'; requires 'Moose::Role'; requires 'Moose::Util'; requires 'MooseX::Aliases'; @@ -129,20 +129,20 @@ requires 'MooseX::StrictConstructor'; requires 'MooseX::Types'; requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; -requires 'Mozilla::CA'; +requires 'Mozilla::CA', '20200520'; requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; -requires 'Net::Fastly', '1.05'; -requires 'Net::Twitter', '4.01010'; -requires 'OrePAN2'; +requires 'Net::Fastly', '1.12'; +requires 'Net::Twitter', '4.01043'; +requires 'OrePAN2', '0.48'; requires 'Parse::CPAN::Packages::Fast', '0.09'; requires 'Parse::CSV', '2.04'; requires 'Parse::PMFile', '0.41'; requires 'Path::Iterator::Rule', '>=1.011'; -requires 'PAUSE::Permissions'; +requires 'PAUSE::Permissions', '0.17'; requires 'PerlIO::gzip'; -requires 'Pithub', '0.01033'; -requires 'Plack', '1.0039'; +requires 'Pithub', '0.01036'; +requires 'Plack', '1.0048'; requires 'Plack::App::Directory'; requires 'Plack::Middleware::Header'; requires 'Plack::Middleware::ReverseProxy'; @@ -172,20 +172,20 @@ requires 'Try::Tiny', '0.24'; requires 'Type::Tiny', '1.002001'; requires 'Types::Path::Tiny'; requires 'Types::URI'; -requires 'URI', '1.71'; +requires 'URI', '5.09'; requires 'URI::Escape'; requires 'version', '0.9901'; requires 'XML::Simple'; -requires 'YAML::XS', '0.67'; # Mojolicious::Plugin::OpenAPI YAML loading +requires 'YAML::XS', '0.83'; # Mojolicious::Plugin::OpenAPI YAML loading # test requirements requires 'App::Prove'; -requires 'Code::TidyAll', '0.74'; +requires 'Code::TidyAll', '0.78'; requires 'Code::TidyAll::Plugin::UniqueLines'; requires 'CPAN::Faker', '0.010'; requires 'Devel::Confess'; requires 'File::Copy'; -requires 'HTTP::Cookies'; +requires 'HTTP::Cookies', '6.10'; requires 'LWP::ConsoleLogger::Easy'; requires 'MetaCPAN::Client', '2.017000'; requires 'Module::Faker', '0.015'; @@ -199,7 +199,7 @@ requires 'Test::Perl::Critic'; requires 'Test::RequiresInternet'; requires 'Test::Routine', '0.012'; requires 'Test::Routine::Util', '0'; -requires 'Test::Vars', '0.014'; +requires 'Test::Vars', '0.015'; # author requirements requires 'Plack::Middleware::Rewrite'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 128369efd..8843140cc 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -386,58 +386,6 @@ DISTRIBUTIONS Text::Template 0 strict 0 warnings 0 - CPAN-Meta-2.150010 - pathname: D/DA/DAGOLDEN/CPAN-Meta-2.150010.tar.gz - provides: - CPAN::Meta 2.150010 - CPAN::Meta::Converter 2.150010 - CPAN::Meta::Feature 2.150010 - CPAN::Meta::History 2.150010 - CPAN::Meta::Merge 2.150010 - CPAN::Meta::Prereqs 2.150010 - CPAN::Meta::Spec 2.150010 - CPAN::Meta::Validator 2.150010 - Parse::CPAN::Meta 2.150010 - requirements: - CPAN::Meta::Requirements 2.121 - CPAN::Meta::YAML 0.011 - Carp 0 - Encode 0 - Exporter 0 - ExtUtils::MakeMaker 6.17 - File::Spec 0.80 - JSON::PP 2.27300 - Scalar::Util 0 - perl 5.008001 - strict 0 - version 0.88 - warnings 0 - CPAN-Meta-Requirements-2.140 - pathname: D/DA/DAGOLDEN/CPAN-Meta-Requirements-2.140.tar.gz - provides: - CPAN::Meta::Requirements 2.140 - requirements: - B 0 - Carp 0 - ExtUtils::MakeMaker 6.17 - perl 5.006 - strict 0 - version 0.88 - warnings 0 - CPAN-Meta-YAML-0.018 - pathname: D/DA/DAGOLDEN/CPAN-Meta-YAML-0.018.tar.gz - provides: - CPAN::Meta::YAML 0.018 - requirements: - B 0 - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 6.17 - Fcntl 0 - Scalar::Util 0 - perl 5.008001 - strict 0 - warnings 0 CPAN-Repository-0.010 pathname: O/OA/OALDERS/CPAN-Repository-0.010.tar.gz provides: @@ -457,35 +405,6 @@ DISTRIBUTIONS IO::File 1.14 IO::Zlib 1.10 Moo 0.009013 - Cache-Cache-1.08 - pathname: R/RJ/RJBS/Cache-Cache-1.08.tar.gz - provides: - Cache::BaseCache undef - Cache::BaseCacheTester undef - Cache::Cache 1.08 - Cache::CacheMetaData undef - Cache::CacheSizer undef - Cache::CacheTester undef - Cache::CacheUtils undef - Cache::FileBackend undef - Cache::FileCache undef - Cache::MemoryBackend undef - Cache::MemoryCache undef - Cache::NullCache undef - Cache::Object undef - Cache::SharedMemoryBackend undef - Cache::SharedMemoryCache undef - Cache::SizeAwareCache undef - Cache::SizeAwareCacheTester undef - Cache::SizeAwareFileCache undef - Cache::SizeAwareMemoryCache undef - Cache::SizeAwareSharedMemoryCache undef - requirements: - Digest::SHA1 2.02 - Error 0.15 - ExtUtils::MakeMaker 0 - File::Spec 0.82 - Storable 1.014 Cache-LRU-0.04 pathname: K/KA/KAZUHO/Cache-LRU-0.04.tar.gz provides: @@ -701,10 +620,10 @@ DISTRIBUTIONS MooseX::Types 0 Test::More 0 namespace::autoclean 0 - Catalyst-Runtime-5.90115 - pathname: J/JJ/JJNAPIORK/Catalyst-Runtime-5.90115.tar.gz + Catalyst-Runtime-5.90128 + pathname: H/HA/HAARG/Catalyst-Runtime-5.90128.tar.gz provides: - Catalyst 5.90115 + Catalyst 5.90128 Catalyst::Action undef Catalyst::ActionChain undef Catalyst::ActionContainer undef @@ -735,13 +654,13 @@ DISTRIBUTIONS Catalyst::Log undef Catalyst::Middleware::Stash undef Catalyst::Model undef - Catalyst::Plugin::Unicode::Encoding 99.0 + Catalyst::Plugin::Unicode::Encoding 5.90128 Catalyst::Request undef Catalyst::Request::PartData undef Catalyst::Request::Upload undef Catalyst::Response undef Catalyst::Response::Writer undef - Catalyst::Runtime 5.90115 + Catalyst::Runtime 5.90128 Catalyst::Script::CGI undef Catalyst::Script::Create undef Catalyst::Script::FastCGI undef @@ -758,34 +677,30 @@ DISTRIBUTIONS CGI::Struct 0 Carp 1.25 Class::C3::Adopt::NEXT 0.07 - Class::Data::Inheritable 0 Class::Load 0.12 Data::Dump 0 Data::OptList 0 Devel::InnerPackage 0 Encode 2.49 - ExtUtils::MakeMaker 6.59 + ExtUtils::MakeMaker 0 HTML::Entities 0 HTML::HeadParser 0 HTTP::Body 1.22 HTTP::Headers 1.64 HTTP::Request 5.814 - HTTP::Request::AsCGI 1.0 - HTTP::Request::Common 0 HTTP::Response 5.813 - HTTP::Status 0 Hash::MultiValue 0 - IO::Scalar 0 JSON::MaybeXS 1.000000 LWP 5.837 - List::MoreUtils 0 + List::Util 1.45 MRO::Compat 0 Module::Pluggable 4.7 - Moose 1.03 + Moose 2.1400 MooseX::Emulate::Class::Accessor::Fast 0.00903 MooseX::Getopt 0.48 MooseX::MethodAttributes::Role::AttrContainer::Inheritable 0.24 Path::Class 0.09 + PerlIO::utf8_strict 0 Plack 0.9991 Plack::Middleware::Conditional 0 Plack::Middleware::ContentLength 0 @@ -802,21 +717,19 @@ DISTRIBUTIONS Plack::Test::ExternalServer 0 Safe::Isa 0 Scalar::Util 0 + Socket 1.96 Stream::Buffered 0 String::RewritePrefix 0.004 Sub::Exporter 0 Task::Weaken 0 - Test::Fatal 0 - Test::More 0.88 Text::Balanced 0 Text::SimpleTable 0.03 Time::HiRes 0 Tree::Simple 1.15 - Tree::Simple::Visitor::FindByPath 0 + Tree::Simple::Visitor::FindByUID 0 Try::Tiny 0.17 URI 1.65 URI::ws 0.03 - namespace::autoclean 0.28 namespace::clean 0.23 perl 5.008003 Catalyst-View-JSON-0.36 @@ -1051,44 +964,44 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Code-TidyAll-0.74 - pathname: D/DR/DROLSKY/Code-TidyAll-0.74.tar.gz - provides: - Code::TidyAll 0.74 - Code::TidyAll::Cache 0.74 - Code::TidyAll::CacheModel 0.74 - Code::TidyAll::CacheModel::Shared 0.74 - Code::TidyAll::Config::INI::Reader 0.74 - Code::TidyAll::Git::Precommit 0.74 - Code::TidyAll::Git::Prereceive 0.74 - Code::TidyAll::Git::Util 0.74 - Code::TidyAll::Plugin 0.74 - Code::TidyAll::Plugin::CSSUnminifier 0.74 - Code::TidyAll::Plugin::GenericTransformer 0.74 - Code::TidyAll::Plugin::GenericValidator 0.74 - Code::TidyAll::Plugin::JSBeautify 0.74 - Code::TidyAll::Plugin::JSHint 0.74 - Code::TidyAll::Plugin::JSLint 0.74 - Code::TidyAll::Plugin::JSON 0.74 - Code::TidyAll::Plugin::MasonTidy 0.74 - Code::TidyAll::Plugin::PHPCodeSniffer 0.74 - Code::TidyAll::Plugin::PerlCritic 0.74 - Code::TidyAll::Plugin::PerlTidy 0.74 - Code::TidyAll::Plugin::PerlTidySweet 0.74 - Code::TidyAll::Plugin::PodChecker 0.74 - Code::TidyAll::Plugin::PodSpell 0.74 - Code::TidyAll::Plugin::PodTidy 0.74 - Code::TidyAll::Plugin::SortLines 0.74 - Code::TidyAll::Result 0.74 - Code::TidyAll::Role::GenericExecutable 0.74 - Code::TidyAll::Role::HasIgnore 0.74 - Code::TidyAll::Role::RunsCommand 0.74 - Code::TidyAll::Role::Tempdir 0.74 - Code::TidyAll::SVN::Precommit 0.74 - Code::TidyAll::SVN::Util 0.74 - Code::TidyAll::Util::Zglob 0.74 - Code::TidyAll::Zglob 0.74 - Test::Code::TidyAll 0.74 + Code-TidyAll-0.78 + pathname: D/DR/DROLSKY/Code-TidyAll-0.78.tar.gz + provides: + Code::TidyAll 0.78 + Code::TidyAll::Cache 0.78 + Code::TidyAll::CacheModel 0.78 + Code::TidyAll::CacheModel::Shared 0.78 + Code::TidyAll::Config::INI::Reader 0.78 + Code::TidyAll::Git::Precommit 0.78 + Code::TidyAll::Git::Prereceive 0.78 + Code::TidyAll::Git::Util 0.78 + Code::TidyAll::Plugin 0.78 + Code::TidyAll::Plugin::CSSUnminifier 0.78 + Code::TidyAll::Plugin::GenericTransformer 0.78 + Code::TidyAll::Plugin::GenericValidator 0.78 + Code::TidyAll::Plugin::JSBeautify 0.78 + Code::TidyAll::Plugin::JSHint 0.78 + Code::TidyAll::Plugin::JSLint 0.78 + Code::TidyAll::Plugin::JSON 0.78 + Code::TidyAll::Plugin::MasonTidy 0.78 + Code::TidyAll::Plugin::PHPCodeSniffer 0.78 + Code::TidyAll::Plugin::PerlCritic 0.78 + Code::TidyAll::Plugin::PerlTidy 0.78 + Code::TidyAll::Plugin::PerlTidySweet 0.78 + Code::TidyAll::Plugin::PodChecker 0.78 + Code::TidyAll::Plugin::PodSpell 0.78 + Code::TidyAll::Plugin::PodTidy 0.78 + Code::TidyAll::Plugin::SortLines 0.78 + Code::TidyAll::Result 0.78 + Code::TidyAll::Role::GenericExecutable 0.78 + Code::TidyAll::Role::HasIgnore 0.78 + Code::TidyAll::Role::RunsCommand 0.78 + Code::TidyAll::Role::Tempdir 0.78 + Code::TidyAll::SVN::Precommit 0.78 + Code::TidyAll::SVN::Util 0.78 + Code::TidyAll::Util::Zglob 0.78 + Code::TidyAll::Zglob 0.78 + Test::Code::TidyAll 0.78 requirements: Capture::Tiny 0 Config::INI::Reader 0 @@ -1170,6 +1083,7 @@ DISTRIBUTIONS Config::Any::XML undef Config::Any::YAML undef requirements: + Config::General 2.47 Module::Pluggable::Object 3.6 Config-General-2.63 pathname: T/TL/TLINDEN/Config-General-2.63.tar.gz @@ -1262,20 +1176,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Pod::Text 2.08 - Crypt-DH-GMP-0.00012 - pathname: D/DM/DMAKI/Crypt-DH-GMP-0.00012.tar.gz - provides: - Crypt::DH::GMP 0.00012 - Crypt::DH::GMP::Compat undef - requirements: - Devel::CheckLib 0.4 - Devel::PPPort 3.19 - ExtUtils::MakeMaker 6.59 - ExtUtils::ParseXS 3.18 - Test::More 0 - Test::Requires 0 - XSLoader 0.02 - perl 5.0080001 DBD-Pg-3.7.0 pathname: T/TU/TURNSTEP/DBD-Pg-3.7.0.tar.gz provides: @@ -1287,13 +1187,14 @@ DISTRIBUTIONS Test::More 0.88 Time::HiRes 0 version 0 - DBD-SQLite-1.54 - pathname: I/IS/ISHIGAKI/DBD-SQLite-1.54.tar.gz + DBD-SQLite-1.66 + pathname: I/IS/ISHIGAKI/DBD-SQLite-1.66.tar.gz provides: - DBD::SQLite 1.54 + DBD::SQLite 1.66 DBD::SQLite::Constants undef - DBD::SQLite::VirtualTable 1.54 - DBD::SQLite::VirtualTable::Cursor 1.54 + DBD::SQLite::GetInfo undef + DBD::SQLite::VirtualTable 1.66 + DBD::SQLite::VirtualTable::Cursor 1.66 DBD::SQLite::VirtualTable::FileContent undef DBD::SQLite::VirtualTable::FileContent::Cursor undef DBD::SQLite::VirtualTable::PerlData undef @@ -1302,12 +1203,11 @@ DISTRIBUTIONS DBI 1.57 ExtUtils::MakeMaker 0 File::Spec 0.82 - Test::Builder 0.86 - Test::More 0.47 + Test::More 0.88 Tie::Hash 0 perl 5.006 - DBI-1.637 - pathname: T/TI/TIMB/DBI-1.637.tar.gz + DBI-1.643 + pathname: T/TI/TIMB/DBI-1.643.tar.gz provides: Bundle::DBI 12.008696 DBD::DBM 0.08 @@ -1342,6 +1242,13 @@ DISTRIBUTIONS DBD::Gofer::db 0.015327 DBD::Gofer::dr 0.015327 DBD::Gofer::st 0.015327 + DBD::Mem 0.001 + DBD::Mem::DataSource 0.001 + DBD::Mem::Statement 0.001 + DBD::Mem::Table 0.001 + DBD::Mem::db 0.001 + DBD::Mem::dr 0.001 + DBD::Mem::st 0.001 DBD::NullP 12.014715 DBD::NullP::db 12.014715 DBD::NullP::dr 12.014715 @@ -1356,7 +1263,7 @@ DISTRIBUTIONS DBD::Sponge::dr 12.010003 DBD::Sponge::st 12.010003 DBDI 12.015129 - DBI 1.637 + DBI 1.643 DBI::Const::GetInfo::ANSI 2.008697 DBI::Const::GetInfo::ODBC 2.011374 DBI::Const::GetInfoReturn 2.008697 @@ -1396,11 +1303,11 @@ DISTRIBUTIONS DBI::SQL::Nano::Table_ 1.015544 DBI::Util::CacheMemory 0.010315 DBI::Util::_accessor 0.009479 - DBI::common 1.637 + DBI::common 1.643 requirements: ExtUtils::MakeMaker 6.48 Test::Simple 0.90 - perl 5.008 + perl 5.008001 DBIx-Class-0.082840 pathname: R/RI/RIBASUSHI/DBIx-Class-0.082840.tar.gz provides: @@ -1604,28 +1511,45 @@ DISTRIBUTIONS Class::Accessor::Chained::Fast 0 Test::Exception 0 Test::More 0 - Data-Printer-0.40 - pathname: G/GA/GARU/Data-Printer-0.40.tar.gz + Data-Printer-1.000004 + pathname: G/GA/GARU/Data-Printer-1.000004.tar.gz provides: DDP undef - Data::Printer 0.40 + Data::Printer 1.000004 + Data::Printer::Common undef + Data::Printer::Config undef Data::Printer::Filter undef + Data::Printer::Filter::ARRAY undef + Data::Printer::Filter::CODE undef + Data::Printer::Filter::ContentType undef Data::Printer::Filter::DB undef Data::Printer::Filter::DateTime undef Data::Printer::Filter::Digest undef + Data::Printer::Filter::FORMAT undef + Data::Printer::Filter::GLOB undef + Data::Printer::Filter::GenericClass undef + Data::Printer::Filter::HASH undef + Data::Printer::Filter::REF undef + Data::Printer::Filter::Regexp undef + Data::Printer::Filter::SCALAR undef + Data::Printer::Filter::VSTRING undef + Data::Printer::Filter::Web undef + Data::Printer::Object undef + Data::Printer::Profile undef + Data::Printer::Profile::Dumper undef + Data::Printer::Profile::JSON undef + Data::Printer::Theme undef + Data::Printer::Theme::Classic undef + Data::Printer::Theme::Material undef + Data::Printer::Theme::Monokai undef + Data::Printer::Theme::Solarized undef requirements: - Carp 0 - Clone::PP 0 ExtUtils::MakeMaker 0 Fcntl 0 - File::HomeDir 0.91 File::Spec 0 File::Temp 0 - Package::Stash 0.3 Scalar::Util 0 - Sort::Naturally 0 - Term::ANSIColor 3 - Test::More 0.88 + Test::More 0 version 0.77 Data-Section-0.200007 pathname: R/RJ/RJBS/Data-Section-0.200007.tar.gz @@ -1657,27 +1581,27 @@ DISTRIBUTIONS Task::Weaken 0 Tie::ToObject 0.01 namespace::clean 0.19 - DateTime-1.44 - pathname: D/DR/DROLSKY/DateTime-1.44.tar.gz - provides: - DateTime 1.44 - DateTime::Duration 1.44 - DateTime::Helpers 1.44 - DateTime::Infinite 1.44 - DateTime::Infinite::Future 1.44 - DateTime::Infinite::Past 1.44 - DateTime::LeapSecond 1.44 - DateTime::PP 1.44 - DateTime::PPExtra 1.44 - DateTime::Types 1.44 + DateTime-1.54 + pathname: D/DR/DROLSKY/DateTime-1.54.tar.gz + provides: + DateTime 1.54 + DateTime::Duration 1.54 + DateTime::Helpers 1.54 + DateTime::Infinite 1.54 + DateTime::Infinite::Future 1.54 + DateTime::Infinite::Past 1.54 + DateTime::LeapSecond 1.54 + DateTime::PP 1.54 + DateTime::PPExtra 1.54 + DateTime::Types 1.54 requirements: Carp 0 DateTime::Locale 1.06 - DateTime::TimeZone 2.02 + DateTime::TimeZone 2.44 Dist::CheckConflicts 0.02 ExtUtils::MakeMaker 0 POSIX 0 - Params::ValidationCompiler 0.13 + Params::ValidationCompiler 0.26 Scalar::Util 0 Specio 0.18 Specio::Declare 0 @@ -1810,380 +1734,381 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 - DateTime-TimeZone-2.15 - pathname: D/DR/DROLSKY/DateTime-TimeZone-2.15.tar.gz - provides: - DateTime::TimeZone 2.15 - DateTime::TimeZone::Africa::Abidjan 2.15 - DateTime::TimeZone::Africa::Accra 2.15 - DateTime::TimeZone::Africa::Algiers 2.15 - DateTime::TimeZone::Africa::Bissau 2.15 - DateTime::TimeZone::Africa::Cairo 2.15 - DateTime::TimeZone::Africa::Casablanca 2.15 - DateTime::TimeZone::Africa::Ceuta 2.15 - DateTime::TimeZone::Africa::El_Aaiun 2.15 - DateTime::TimeZone::Africa::Johannesburg 2.15 - DateTime::TimeZone::Africa::Juba 2.15 - DateTime::TimeZone::Africa::Khartoum 2.15 - DateTime::TimeZone::Africa::Lagos 2.15 - DateTime::TimeZone::Africa::Maputo 2.15 - DateTime::TimeZone::Africa::Monrovia 2.15 - DateTime::TimeZone::Africa::Nairobi 2.15 - DateTime::TimeZone::Africa::Ndjamena 2.15 - DateTime::TimeZone::Africa::Tripoli 2.15 - DateTime::TimeZone::Africa::Tunis 2.15 - DateTime::TimeZone::Africa::Windhoek 2.15 - DateTime::TimeZone::America::Adak 2.15 - DateTime::TimeZone::America::Anchorage 2.15 - DateTime::TimeZone::America::Araguaina 2.15 - DateTime::TimeZone::America::Argentina::Buenos_Aires 2.15 - DateTime::TimeZone::America::Argentina::Catamarca 2.15 - DateTime::TimeZone::America::Argentina::Cordoba 2.15 - DateTime::TimeZone::America::Argentina::Jujuy 2.15 - DateTime::TimeZone::America::Argentina::La_Rioja 2.15 - DateTime::TimeZone::America::Argentina::Mendoza 2.15 - DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.15 - DateTime::TimeZone::America::Argentina::Salta 2.15 - DateTime::TimeZone::America::Argentina::San_Juan 2.15 - DateTime::TimeZone::America::Argentina::San_Luis 2.15 - DateTime::TimeZone::America::Argentina::Tucuman 2.15 - DateTime::TimeZone::America::Argentina::Ushuaia 2.15 - DateTime::TimeZone::America::Asuncion 2.15 - DateTime::TimeZone::America::Atikokan 2.15 - DateTime::TimeZone::America::Bahia 2.15 - DateTime::TimeZone::America::Bahia_Banderas 2.15 - DateTime::TimeZone::America::Barbados 2.15 - DateTime::TimeZone::America::Belem 2.15 - DateTime::TimeZone::America::Belize 2.15 - DateTime::TimeZone::America::Blanc_Sablon 2.15 - DateTime::TimeZone::America::Boa_Vista 2.15 - DateTime::TimeZone::America::Bogota 2.15 - DateTime::TimeZone::America::Boise 2.15 - DateTime::TimeZone::America::Cambridge_Bay 2.15 - DateTime::TimeZone::America::Campo_Grande 2.15 - DateTime::TimeZone::America::Cancun 2.15 - DateTime::TimeZone::America::Caracas 2.15 - DateTime::TimeZone::America::Cayenne 2.15 - DateTime::TimeZone::America::Chicago 2.15 - DateTime::TimeZone::America::Chihuahua 2.15 - DateTime::TimeZone::America::Costa_Rica 2.15 - DateTime::TimeZone::America::Creston 2.15 - DateTime::TimeZone::America::Cuiaba 2.15 - DateTime::TimeZone::America::Curacao 2.15 - DateTime::TimeZone::America::Danmarkshavn 2.15 - DateTime::TimeZone::America::Dawson 2.15 - DateTime::TimeZone::America::Dawson_Creek 2.15 - DateTime::TimeZone::America::Denver 2.15 - DateTime::TimeZone::America::Detroit 2.15 - DateTime::TimeZone::America::Edmonton 2.15 - DateTime::TimeZone::America::Eirunepe 2.15 - DateTime::TimeZone::America::El_Salvador 2.15 - DateTime::TimeZone::America::Fort_Nelson 2.15 - DateTime::TimeZone::America::Fortaleza 2.15 - DateTime::TimeZone::America::Glace_Bay 2.15 - DateTime::TimeZone::America::Godthab 2.15 - DateTime::TimeZone::America::Goose_Bay 2.15 - DateTime::TimeZone::America::Grand_Turk 2.15 - DateTime::TimeZone::America::Guatemala 2.15 - DateTime::TimeZone::America::Guayaquil 2.15 - DateTime::TimeZone::America::Guyana 2.15 - DateTime::TimeZone::America::Halifax 2.15 - DateTime::TimeZone::America::Havana 2.15 - DateTime::TimeZone::America::Hermosillo 2.15 - DateTime::TimeZone::America::Indiana::Indianapolis 2.15 - DateTime::TimeZone::America::Indiana::Knox 2.15 - DateTime::TimeZone::America::Indiana::Marengo 2.15 - DateTime::TimeZone::America::Indiana::Petersburg 2.15 - DateTime::TimeZone::America::Indiana::Tell_City 2.15 - DateTime::TimeZone::America::Indiana::Vevay 2.15 - DateTime::TimeZone::America::Indiana::Vincennes 2.15 - DateTime::TimeZone::America::Indiana::Winamac 2.15 - DateTime::TimeZone::America::Inuvik 2.15 - DateTime::TimeZone::America::Iqaluit 2.15 - DateTime::TimeZone::America::Jamaica 2.15 - DateTime::TimeZone::America::Juneau 2.15 - DateTime::TimeZone::America::Kentucky::Louisville 2.15 - DateTime::TimeZone::America::Kentucky::Monticello 2.15 - DateTime::TimeZone::America::La_Paz 2.15 - DateTime::TimeZone::America::Lima 2.15 - DateTime::TimeZone::America::Los_Angeles 2.15 - DateTime::TimeZone::America::Maceio 2.15 - DateTime::TimeZone::America::Managua 2.15 - DateTime::TimeZone::America::Manaus 2.15 - DateTime::TimeZone::America::Martinique 2.15 - DateTime::TimeZone::America::Matamoros 2.15 - DateTime::TimeZone::America::Mazatlan 2.15 - DateTime::TimeZone::America::Menominee 2.15 - DateTime::TimeZone::America::Merida 2.15 - DateTime::TimeZone::America::Metlakatla 2.15 - DateTime::TimeZone::America::Mexico_City 2.15 - DateTime::TimeZone::America::Miquelon 2.15 - DateTime::TimeZone::America::Moncton 2.15 - DateTime::TimeZone::America::Monterrey 2.15 - DateTime::TimeZone::America::Montevideo 2.15 - DateTime::TimeZone::America::Nassau 2.15 - DateTime::TimeZone::America::New_York 2.15 - DateTime::TimeZone::America::Nipigon 2.15 - DateTime::TimeZone::America::Nome 2.15 - DateTime::TimeZone::America::Noronha 2.15 - DateTime::TimeZone::America::North_Dakota::Beulah 2.15 - DateTime::TimeZone::America::North_Dakota::Center 2.15 - DateTime::TimeZone::America::North_Dakota::New_Salem 2.15 - DateTime::TimeZone::America::Ojinaga 2.15 - DateTime::TimeZone::America::Panama 2.15 - DateTime::TimeZone::America::Pangnirtung 2.15 - DateTime::TimeZone::America::Paramaribo 2.15 - DateTime::TimeZone::America::Phoenix 2.15 - DateTime::TimeZone::America::Port_au_Prince 2.15 - DateTime::TimeZone::America::Port_of_Spain 2.15 - DateTime::TimeZone::America::Porto_Velho 2.15 - DateTime::TimeZone::America::Puerto_Rico 2.15 - DateTime::TimeZone::America::Punta_Arenas 2.15 - DateTime::TimeZone::America::Rainy_River 2.15 - DateTime::TimeZone::America::Rankin_Inlet 2.15 - DateTime::TimeZone::America::Recife 2.15 - DateTime::TimeZone::America::Regina 2.15 - DateTime::TimeZone::America::Resolute 2.15 - DateTime::TimeZone::America::Rio_Branco 2.15 - DateTime::TimeZone::America::Santarem 2.15 - DateTime::TimeZone::America::Santiago 2.15 - DateTime::TimeZone::America::Santo_Domingo 2.15 - DateTime::TimeZone::America::Sao_Paulo 2.15 - DateTime::TimeZone::America::Scoresbysund 2.15 - DateTime::TimeZone::America::Sitka 2.15 - DateTime::TimeZone::America::St_Johns 2.15 - DateTime::TimeZone::America::Swift_Current 2.15 - DateTime::TimeZone::America::Tegucigalpa 2.15 - DateTime::TimeZone::America::Thule 2.15 - DateTime::TimeZone::America::Thunder_Bay 2.15 - DateTime::TimeZone::America::Tijuana 2.15 - DateTime::TimeZone::America::Toronto 2.15 - DateTime::TimeZone::America::Vancouver 2.15 - DateTime::TimeZone::America::Whitehorse 2.15 - DateTime::TimeZone::America::Winnipeg 2.15 - DateTime::TimeZone::America::Yakutat 2.15 - DateTime::TimeZone::America::Yellowknife 2.15 - DateTime::TimeZone::Antarctica::Casey 2.15 - DateTime::TimeZone::Antarctica::Davis 2.15 - DateTime::TimeZone::Antarctica::DumontDUrville 2.15 - DateTime::TimeZone::Antarctica::Macquarie 2.15 - DateTime::TimeZone::Antarctica::Mawson 2.15 - DateTime::TimeZone::Antarctica::Palmer 2.15 - DateTime::TimeZone::Antarctica::Rothera 2.15 - DateTime::TimeZone::Antarctica::Syowa 2.15 - DateTime::TimeZone::Antarctica::Troll 2.15 - DateTime::TimeZone::Antarctica::Vostok 2.15 - DateTime::TimeZone::Asia::Almaty 2.15 - DateTime::TimeZone::Asia::Amman 2.15 - DateTime::TimeZone::Asia::Anadyr 2.15 - DateTime::TimeZone::Asia::Aqtau 2.15 - DateTime::TimeZone::Asia::Aqtobe 2.15 - DateTime::TimeZone::Asia::Ashgabat 2.15 - DateTime::TimeZone::Asia::Atyrau 2.15 - DateTime::TimeZone::Asia::Baghdad 2.15 - DateTime::TimeZone::Asia::Baku 2.15 - DateTime::TimeZone::Asia::Bangkok 2.15 - DateTime::TimeZone::Asia::Barnaul 2.15 - DateTime::TimeZone::Asia::Beirut 2.15 - DateTime::TimeZone::Asia::Bishkek 2.15 - DateTime::TimeZone::Asia::Brunei 2.15 - DateTime::TimeZone::Asia::Chita 2.15 - DateTime::TimeZone::Asia::Choibalsan 2.15 - DateTime::TimeZone::Asia::Colombo 2.15 - DateTime::TimeZone::Asia::Damascus 2.15 - DateTime::TimeZone::Asia::Dhaka 2.15 - DateTime::TimeZone::Asia::Dili 2.15 - DateTime::TimeZone::Asia::Dubai 2.15 - DateTime::TimeZone::Asia::Dushanbe 2.15 - DateTime::TimeZone::Asia::Famagusta 2.15 - DateTime::TimeZone::Asia::Gaza 2.15 - DateTime::TimeZone::Asia::Hebron 2.15 - DateTime::TimeZone::Asia::Ho_Chi_Minh 2.15 - DateTime::TimeZone::Asia::Hong_Kong 2.15 - DateTime::TimeZone::Asia::Hovd 2.15 - DateTime::TimeZone::Asia::Irkutsk 2.15 - DateTime::TimeZone::Asia::Jakarta 2.15 - DateTime::TimeZone::Asia::Jayapura 2.15 - DateTime::TimeZone::Asia::Jerusalem 2.15 - DateTime::TimeZone::Asia::Kabul 2.15 - DateTime::TimeZone::Asia::Kamchatka 2.15 - DateTime::TimeZone::Asia::Karachi 2.15 - DateTime::TimeZone::Asia::Kathmandu 2.15 - DateTime::TimeZone::Asia::Khandyga 2.15 - DateTime::TimeZone::Asia::Kolkata 2.15 - DateTime::TimeZone::Asia::Krasnoyarsk 2.15 - DateTime::TimeZone::Asia::Kuala_Lumpur 2.15 - DateTime::TimeZone::Asia::Kuching 2.15 - DateTime::TimeZone::Asia::Macau 2.15 - DateTime::TimeZone::Asia::Magadan 2.15 - DateTime::TimeZone::Asia::Makassar 2.15 - DateTime::TimeZone::Asia::Manila 2.15 - DateTime::TimeZone::Asia::Nicosia 2.15 - DateTime::TimeZone::Asia::Novokuznetsk 2.15 - DateTime::TimeZone::Asia::Novosibirsk 2.15 - DateTime::TimeZone::Asia::Omsk 2.15 - DateTime::TimeZone::Asia::Oral 2.15 - DateTime::TimeZone::Asia::Pontianak 2.15 - DateTime::TimeZone::Asia::Pyongyang 2.15 - DateTime::TimeZone::Asia::Qatar 2.15 - DateTime::TimeZone::Asia::Qyzylorda 2.15 - DateTime::TimeZone::Asia::Riyadh 2.15 - DateTime::TimeZone::Asia::Sakhalin 2.15 - DateTime::TimeZone::Asia::Samarkand 2.15 - DateTime::TimeZone::Asia::Seoul 2.15 - DateTime::TimeZone::Asia::Shanghai 2.15 - DateTime::TimeZone::Asia::Singapore 2.15 - DateTime::TimeZone::Asia::Srednekolymsk 2.15 - DateTime::TimeZone::Asia::Taipei 2.15 - DateTime::TimeZone::Asia::Tashkent 2.15 - DateTime::TimeZone::Asia::Tbilisi 2.15 - DateTime::TimeZone::Asia::Tehran 2.15 - DateTime::TimeZone::Asia::Thimphu 2.15 - DateTime::TimeZone::Asia::Tokyo 2.15 - DateTime::TimeZone::Asia::Tomsk 2.15 - DateTime::TimeZone::Asia::Ulaanbaatar 2.15 - DateTime::TimeZone::Asia::Urumqi 2.15 - DateTime::TimeZone::Asia::Ust_Nera 2.15 - DateTime::TimeZone::Asia::Vladivostok 2.15 - DateTime::TimeZone::Asia::Yakutsk 2.15 - DateTime::TimeZone::Asia::Yangon 2.15 - DateTime::TimeZone::Asia::Yekaterinburg 2.15 - DateTime::TimeZone::Asia::Yerevan 2.15 - DateTime::TimeZone::Atlantic::Azores 2.15 - DateTime::TimeZone::Atlantic::Bermuda 2.15 - DateTime::TimeZone::Atlantic::Canary 2.15 - DateTime::TimeZone::Atlantic::Cape_Verde 2.15 - DateTime::TimeZone::Atlantic::Faroe 2.15 - DateTime::TimeZone::Atlantic::Madeira 2.15 - DateTime::TimeZone::Atlantic::Reykjavik 2.15 - DateTime::TimeZone::Atlantic::South_Georgia 2.15 - DateTime::TimeZone::Atlantic::Stanley 2.15 - DateTime::TimeZone::Australia::Adelaide 2.15 - DateTime::TimeZone::Australia::Brisbane 2.15 - DateTime::TimeZone::Australia::Broken_Hill 2.15 - DateTime::TimeZone::Australia::Currie 2.15 - DateTime::TimeZone::Australia::Darwin 2.15 - DateTime::TimeZone::Australia::Eucla 2.15 - DateTime::TimeZone::Australia::Hobart 2.15 - DateTime::TimeZone::Australia::Lindeman 2.15 - DateTime::TimeZone::Australia::Lord_Howe 2.15 - DateTime::TimeZone::Australia::Melbourne 2.15 - DateTime::TimeZone::Australia::Perth 2.15 - DateTime::TimeZone::Australia::Sydney 2.15 - DateTime::TimeZone::CET 2.15 - DateTime::TimeZone::CST6CDT 2.15 - DateTime::TimeZone::Catalog 2.15 - DateTime::TimeZone::EET 2.15 - DateTime::TimeZone::EST 2.15 - DateTime::TimeZone::EST5EDT 2.15 - DateTime::TimeZone::Europe::Amsterdam 2.15 - DateTime::TimeZone::Europe::Andorra 2.15 - DateTime::TimeZone::Europe::Astrakhan 2.15 - DateTime::TimeZone::Europe::Athens 2.15 - DateTime::TimeZone::Europe::Belgrade 2.15 - DateTime::TimeZone::Europe::Berlin 2.15 - DateTime::TimeZone::Europe::Brussels 2.15 - DateTime::TimeZone::Europe::Bucharest 2.15 - DateTime::TimeZone::Europe::Budapest 2.15 - DateTime::TimeZone::Europe::Chisinau 2.15 - DateTime::TimeZone::Europe::Copenhagen 2.15 - DateTime::TimeZone::Europe::Dublin 2.15 - DateTime::TimeZone::Europe::Gibraltar 2.15 - DateTime::TimeZone::Europe::Helsinki 2.15 - DateTime::TimeZone::Europe::Istanbul 2.15 - DateTime::TimeZone::Europe::Kaliningrad 2.15 - DateTime::TimeZone::Europe::Kiev 2.15 - DateTime::TimeZone::Europe::Kirov 2.15 - DateTime::TimeZone::Europe::Lisbon 2.15 - DateTime::TimeZone::Europe::London 2.15 - DateTime::TimeZone::Europe::Luxembourg 2.15 - DateTime::TimeZone::Europe::Madrid 2.15 - DateTime::TimeZone::Europe::Malta 2.15 - DateTime::TimeZone::Europe::Minsk 2.15 - DateTime::TimeZone::Europe::Monaco 2.15 - DateTime::TimeZone::Europe::Moscow 2.15 - DateTime::TimeZone::Europe::Oslo 2.15 - DateTime::TimeZone::Europe::Paris 2.15 - DateTime::TimeZone::Europe::Prague 2.15 - DateTime::TimeZone::Europe::Riga 2.15 - DateTime::TimeZone::Europe::Rome 2.15 - DateTime::TimeZone::Europe::Samara 2.15 - DateTime::TimeZone::Europe::Saratov 2.15 - DateTime::TimeZone::Europe::Simferopol 2.15 - DateTime::TimeZone::Europe::Sofia 2.15 - DateTime::TimeZone::Europe::Stockholm 2.15 - DateTime::TimeZone::Europe::Tallinn 2.15 - DateTime::TimeZone::Europe::Tirane 2.15 - DateTime::TimeZone::Europe::Ulyanovsk 2.15 - DateTime::TimeZone::Europe::Uzhgorod 2.15 - DateTime::TimeZone::Europe::Vienna 2.15 - DateTime::TimeZone::Europe::Vilnius 2.15 - DateTime::TimeZone::Europe::Volgograd 2.15 - DateTime::TimeZone::Europe::Warsaw 2.15 - DateTime::TimeZone::Europe::Zaporozhye 2.15 - DateTime::TimeZone::Europe::Zurich 2.15 - DateTime::TimeZone::Floating 2.15 - DateTime::TimeZone::HST 2.15 - DateTime::TimeZone::Indian::Chagos 2.15 - DateTime::TimeZone::Indian::Christmas 2.15 - DateTime::TimeZone::Indian::Cocos 2.15 - DateTime::TimeZone::Indian::Kerguelen 2.15 - DateTime::TimeZone::Indian::Mahe 2.15 - DateTime::TimeZone::Indian::Maldives 2.15 - DateTime::TimeZone::Indian::Mauritius 2.15 - DateTime::TimeZone::Indian::Reunion 2.15 - DateTime::TimeZone::Local 2.15 - DateTime::TimeZone::Local::Android 2.15 - DateTime::TimeZone::Local::Unix 2.15 - DateTime::TimeZone::Local::VMS 2.15 - DateTime::TimeZone::MET 2.15 - DateTime::TimeZone::MST 2.15 - DateTime::TimeZone::MST7MDT 2.15 - DateTime::TimeZone::OffsetOnly 2.15 - DateTime::TimeZone::OlsonDB 2.15 - DateTime::TimeZone::OlsonDB::Change 2.15 - DateTime::TimeZone::OlsonDB::Observance 2.15 - DateTime::TimeZone::OlsonDB::Rule 2.15 - DateTime::TimeZone::OlsonDB::Zone 2.15 - DateTime::TimeZone::PST8PDT 2.15 - DateTime::TimeZone::Pacific::Apia 2.15 - DateTime::TimeZone::Pacific::Auckland 2.15 - DateTime::TimeZone::Pacific::Bougainville 2.15 - DateTime::TimeZone::Pacific::Chatham 2.15 - DateTime::TimeZone::Pacific::Chuuk 2.15 - DateTime::TimeZone::Pacific::Easter 2.15 - DateTime::TimeZone::Pacific::Efate 2.15 - DateTime::TimeZone::Pacific::Enderbury 2.15 - DateTime::TimeZone::Pacific::Fakaofo 2.15 - DateTime::TimeZone::Pacific::Fiji 2.15 - DateTime::TimeZone::Pacific::Funafuti 2.15 - DateTime::TimeZone::Pacific::Galapagos 2.15 - DateTime::TimeZone::Pacific::Gambier 2.15 - DateTime::TimeZone::Pacific::Guadalcanal 2.15 - DateTime::TimeZone::Pacific::Guam 2.15 - DateTime::TimeZone::Pacific::Honolulu 2.15 - DateTime::TimeZone::Pacific::Kiritimati 2.15 - DateTime::TimeZone::Pacific::Kosrae 2.15 - DateTime::TimeZone::Pacific::Kwajalein 2.15 - DateTime::TimeZone::Pacific::Majuro 2.15 - DateTime::TimeZone::Pacific::Marquesas 2.15 - DateTime::TimeZone::Pacific::Nauru 2.15 - DateTime::TimeZone::Pacific::Niue 2.15 - DateTime::TimeZone::Pacific::Norfolk 2.15 - DateTime::TimeZone::Pacific::Noumea 2.15 - DateTime::TimeZone::Pacific::Pago_Pago 2.15 - DateTime::TimeZone::Pacific::Palau 2.15 - DateTime::TimeZone::Pacific::Pitcairn 2.15 - DateTime::TimeZone::Pacific::Pohnpei 2.15 - DateTime::TimeZone::Pacific::Port_Moresby 2.15 - DateTime::TimeZone::Pacific::Rarotonga 2.15 - DateTime::TimeZone::Pacific::Tahiti 2.15 - DateTime::TimeZone::Pacific::Tarawa 2.15 - DateTime::TimeZone::Pacific::Tongatapu 2.15 - DateTime::TimeZone::Pacific::Wake 2.15 - DateTime::TimeZone::Pacific::Wallis 2.15 - DateTime::TimeZone::UTC 2.15 - DateTime::TimeZone::WET 2.15 + DateTime-TimeZone-2.47 + pathname: D/DR/DROLSKY/DateTime-TimeZone-2.47.tar.gz + provides: + DateTime::TimeZone 2.47 + DateTime::TimeZone::Africa::Abidjan 2.47 + DateTime::TimeZone::Africa::Accra 2.47 + DateTime::TimeZone::Africa::Algiers 2.47 + DateTime::TimeZone::Africa::Bissau 2.47 + DateTime::TimeZone::Africa::Cairo 2.47 + DateTime::TimeZone::Africa::Casablanca 2.47 + DateTime::TimeZone::Africa::Ceuta 2.47 + DateTime::TimeZone::Africa::El_Aaiun 2.47 + DateTime::TimeZone::Africa::Johannesburg 2.47 + DateTime::TimeZone::Africa::Juba 2.47 + DateTime::TimeZone::Africa::Khartoum 2.47 + DateTime::TimeZone::Africa::Lagos 2.47 + DateTime::TimeZone::Africa::Maputo 2.47 + DateTime::TimeZone::Africa::Monrovia 2.47 + DateTime::TimeZone::Africa::Nairobi 2.47 + DateTime::TimeZone::Africa::Ndjamena 2.47 + DateTime::TimeZone::Africa::Sao_Tome 2.47 + DateTime::TimeZone::Africa::Tripoli 2.47 + DateTime::TimeZone::Africa::Tunis 2.47 + DateTime::TimeZone::Africa::Windhoek 2.47 + DateTime::TimeZone::America::Adak 2.47 + DateTime::TimeZone::America::Anchorage 2.47 + DateTime::TimeZone::America::Araguaina 2.47 + DateTime::TimeZone::America::Argentina::Buenos_Aires 2.47 + DateTime::TimeZone::America::Argentina::Catamarca 2.47 + DateTime::TimeZone::America::Argentina::Cordoba 2.47 + DateTime::TimeZone::America::Argentina::Jujuy 2.47 + DateTime::TimeZone::America::Argentina::La_Rioja 2.47 + DateTime::TimeZone::America::Argentina::Mendoza 2.47 + DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.47 + DateTime::TimeZone::America::Argentina::Salta 2.47 + DateTime::TimeZone::America::Argentina::San_Juan 2.47 + DateTime::TimeZone::America::Argentina::San_Luis 2.47 + DateTime::TimeZone::America::Argentina::Tucuman 2.47 + DateTime::TimeZone::America::Argentina::Ushuaia 2.47 + DateTime::TimeZone::America::Asuncion 2.47 + DateTime::TimeZone::America::Atikokan 2.47 + DateTime::TimeZone::America::Bahia 2.47 + DateTime::TimeZone::America::Bahia_Banderas 2.47 + DateTime::TimeZone::America::Barbados 2.47 + DateTime::TimeZone::America::Belem 2.47 + DateTime::TimeZone::America::Belize 2.47 + DateTime::TimeZone::America::Blanc_Sablon 2.47 + DateTime::TimeZone::America::Boa_Vista 2.47 + DateTime::TimeZone::America::Bogota 2.47 + DateTime::TimeZone::America::Boise 2.47 + DateTime::TimeZone::America::Cambridge_Bay 2.47 + DateTime::TimeZone::America::Campo_Grande 2.47 + DateTime::TimeZone::America::Cancun 2.47 + DateTime::TimeZone::America::Caracas 2.47 + DateTime::TimeZone::America::Cayenne 2.47 + DateTime::TimeZone::America::Chicago 2.47 + DateTime::TimeZone::America::Chihuahua 2.47 + DateTime::TimeZone::America::Costa_Rica 2.47 + DateTime::TimeZone::America::Creston 2.47 + DateTime::TimeZone::America::Cuiaba 2.47 + DateTime::TimeZone::America::Curacao 2.47 + DateTime::TimeZone::America::Danmarkshavn 2.47 + DateTime::TimeZone::America::Dawson 2.47 + DateTime::TimeZone::America::Dawson_Creek 2.47 + DateTime::TimeZone::America::Denver 2.47 + DateTime::TimeZone::America::Detroit 2.47 + DateTime::TimeZone::America::Edmonton 2.47 + DateTime::TimeZone::America::Eirunepe 2.47 + DateTime::TimeZone::America::El_Salvador 2.47 + DateTime::TimeZone::America::Fort_Nelson 2.47 + DateTime::TimeZone::America::Fortaleza 2.47 + DateTime::TimeZone::America::Glace_Bay 2.47 + DateTime::TimeZone::America::Goose_Bay 2.47 + DateTime::TimeZone::America::Grand_Turk 2.47 + DateTime::TimeZone::America::Guatemala 2.47 + DateTime::TimeZone::America::Guayaquil 2.47 + DateTime::TimeZone::America::Guyana 2.47 + DateTime::TimeZone::America::Halifax 2.47 + DateTime::TimeZone::America::Havana 2.47 + DateTime::TimeZone::America::Hermosillo 2.47 + DateTime::TimeZone::America::Indiana::Indianapolis 2.47 + DateTime::TimeZone::America::Indiana::Knox 2.47 + DateTime::TimeZone::America::Indiana::Marengo 2.47 + DateTime::TimeZone::America::Indiana::Petersburg 2.47 + DateTime::TimeZone::America::Indiana::Tell_City 2.47 + DateTime::TimeZone::America::Indiana::Vevay 2.47 + DateTime::TimeZone::America::Indiana::Vincennes 2.47 + DateTime::TimeZone::America::Indiana::Winamac 2.47 + DateTime::TimeZone::America::Inuvik 2.47 + DateTime::TimeZone::America::Iqaluit 2.47 + DateTime::TimeZone::America::Jamaica 2.47 + DateTime::TimeZone::America::Juneau 2.47 + DateTime::TimeZone::America::Kentucky::Louisville 2.47 + DateTime::TimeZone::America::Kentucky::Monticello 2.47 + DateTime::TimeZone::America::La_Paz 2.47 + DateTime::TimeZone::America::Lima 2.47 + DateTime::TimeZone::America::Los_Angeles 2.47 + DateTime::TimeZone::America::Maceio 2.47 + DateTime::TimeZone::America::Managua 2.47 + DateTime::TimeZone::America::Manaus 2.47 + DateTime::TimeZone::America::Martinique 2.47 + DateTime::TimeZone::America::Matamoros 2.47 + DateTime::TimeZone::America::Mazatlan 2.47 + DateTime::TimeZone::America::Menominee 2.47 + DateTime::TimeZone::America::Merida 2.47 + DateTime::TimeZone::America::Metlakatla 2.47 + DateTime::TimeZone::America::Mexico_City 2.47 + DateTime::TimeZone::America::Miquelon 2.47 + DateTime::TimeZone::America::Moncton 2.47 + DateTime::TimeZone::America::Monterrey 2.47 + DateTime::TimeZone::America::Montevideo 2.47 + DateTime::TimeZone::America::Nassau 2.47 + DateTime::TimeZone::America::New_York 2.47 + DateTime::TimeZone::America::Nipigon 2.47 + DateTime::TimeZone::America::Nome 2.47 + DateTime::TimeZone::America::Noronha 2.47 + DateTime::TimeZone::America::North_Dakota::Beulah 2.47 + DateTime::TimeZone::America::North_Dakota::Center 2.47 + DateTime::TimeZone::America::North_Dakota::New_Salem 2.47 + DateTime::TimeZone::America::Nuuk 2.47 + DateTime::TimeZone::America::Ojinaga 2.47 + DateTime::TimeZone::America::Panama 2.47 + DateTime::TimeZone::America::Pangnirtung 2.47 + DateTime::TimeZone::America::Paramaribo 2.47 + DateTime::TimeZone::America::Phoenix 2.47 + DateTime::TimeZone::America::Port_au_Prince 2.47 + DateTime::TimeZone::America::Port_of_Spain 2.47 + DateTime::TimeZone::America::Porto_Velho 2.47 + DateTime::TimeZone::America::Puerto_Rico 2.47 + DateTime::TimeZone::America::Punta_Arenas 2.47 + DateTime::TimeZone::America::Rainy_River 2.47 + DateTime::TimeZone::America::Rankin_Inlet 2.47 + DateTime::TimeZone::America::Recife 2.47 + DateTime::TimeZone::America::Regina 2.47 + DateTime::TimeZone::America::Resolute 2.47 + DateTime::TimeZone::America::Rio_Branco 2.47 + DateTime::TimeZone::America::Santarem 2.47 + DateTime::TimeZone::America::Santiago 2.47 + DateTime::TimeZone::America::Santo_Domingo 2.47 + DateTime::TimeZone::America::Sao_Paulo 2.47 + DateTime::TimeZone::America::Scoresbysund 2.47 + DateTime::TimeZone::America::Sitka 2.47 + DateTime::TimeZone::America::St_Johns 2.47 + DateTime::TimeZone::America::Swift_Current 2.47 + DateTime::TimeZone::America::Tegucigalpa 2.47 + DateTime::TimeZone::America::Thule 2.47 + DateTime::TimeZone::America::Thunder_Bay 2.47 + DateTime::TimeZone::America::Tijuana 2.47 + DateTime::TimeZone::America::Toronto 2.47 + DateTime::TimeZone::America::Vancouver 2.47 + DateTime::TimeZone::America::Whitehorse 2.47 + DateTime::TimeZone::America::Winnipeg 2.47 + DateTime::TimeZone::America::Yakutat 2.47 + DateTime::TimeZone::America::Yellowknife 2.47 + DateTime::TimeZone::Antarctica::Casey 2.47 + DateTime::TimeZone::Antarctica::Davis 2.47 + DateTime::TimeZone::Antarctica::DumontDUrville 2.47 + DateTime::TimeZone::Antarctica::Macquarie 2.47 + DateTime::TimeZone::Antarctica::Mawson 2.47 + DateTime::TimeZone::Antarctica::Palmer 2.47 + DateTime::TimeZone::Antarctica::Rothera 2.47 + DateTime::TimeZone::Antarctica::Syowa 2.47 + DateTime::TimeZone::Antarctica::Troll 2.47 + DateTime::TimeZone::Antarctica::Vostok 2.47 + DateTime::TimeZone::Asia::Almaty 2.47 + DateTime::TimeZone::Asia::Amman 2.47 + DateTime::TimeZone::Asia::Anadyr 2.47 + DateTime::TimeZone::Asia::Aqtau 2.47 + DateTime::TimeZone::Asia::Aqtobe 2.47 + DateTime::TimeZone::Asia::Ashgabat 2.47 + DateTime::TimeZone::Asia::Atyrau 2.47 + DateTime::TimeZone::Asia::Baghdad 2.47 + DateTime::TimeZone::Asia::Baku 2.47 + DateTime::TimeZone::Asia::Bangkok 2.47 + DateTime::TimeZone::Asia::Barnaul 2.47 + DateTime::TimeZone::Asia::Beirut 2.47 + DateTime::TimeZone::Asia::Bishkek 2.47 + DateTime::TimeZone::Asia::Brunei 2.47 + DateTime::TimeZone::Asia::Chita 2.47 + DateTime::TimeZone::Asia::Choibalsan 2.47 + DateTime::TimeZone::Asia::Colombo 2.47 + DateTime::TimeZone::Asia::Damascus 2.47 + DateTime::TimeZone::Asia::Dhaka 2.47 + DateTime::TimeZone::Asia::Dili 2.47 + DateTime::TimeZone::Asia::Dubai 2.47 + DateTime::TimeZone::Asia::Dushanbe 2.47 + DateTime::TimeZone::Asia::Famagusta 2.47 + DateTime::TimeZone::Asia::Gaza 2.47 + DateTime::TimeZone::Asia::Hebron 2.47 + DateTime::TimeZone::Asia::Ho_Chi_Minh 2.47 + DateTime::TimeZone::Asia::Hong_Kong 2.47 + DateTime::TimeZone::Asia::Hovd 2.47 + DateTime::TimeZone::Asia::Irkutsk 2.47 + DateTime::TimeZone::Asia::Jakarta 2.47 + DateTime::TimeZone::Asia::Jayapura 2.47 + DateTime::TimeZone::Asia::Jerusalem 2.47 + DateTime::TimeZone::Asia::Kabul 2.47 + DateTime::TimeZone::Asia::Kamchatka 2.47 + DateTime::TimeZone::Asia::Karachi 2.47 + DateTime::TimeZone::Asia::Kathmandu 2.47 + DateTime::TimeZone::Asia::Khandyga 2.47 + DateTime::TimeZone::Asia::Kolkata 2.47 + DateTime::TimeZone::Asia::Krasnoyarsk 2.47 + DateTime::TimeZone::Asia::Kuala_Lumpur 2.47 + DateTime::TimeZone::Asia::Kuching 2.47 + DateTime::TimeZone::Asia::Macau 2.47 + DateTime::TimeZone::Asia::Magadan 2.47 + DateTime::TimeZone::Asia::Makassar 2.47 + DateTime::TimeZone::Asia::Manila 2.47 + DateTime::TimeZone::Asia::Nicosia 2.47 + DateTime::TimeZone::Asia::Novokuznetsk 2.47 + DateTime::TimeZone::Asia::Novosibirsk 2.47 + DateTime::TimeZone::Asia::Omsk 2.47 + DateTime::TimeZone::Asia::Oral 2.47 + DateTime::TimeZone::Asia::Pontianak 2.47 + DateTime::TimeZone::Asia::Pyongyang 2.47 + DateTime::TimeZone::Asia::Qatar 2.47 + DateTime::TimeZone::Asia::Qostanay 2.47 + DateTime::TimeZone::Asia::Qyzylorda 2.47 + DateTime::TimeZone::Asia::Riyadh 2.47 + DateTime::TimeZone::Asia::Sakhalin 2.47 + DateTime::TimeZone::Asia::Samarkand 2.47 + DateTime::TimeZone::Asia::Seoul 2.47 + DateTime::TimeZone::Asia::Shanghai 2.47 + DateTime::TimeZone::Asia::Singapore 2.47 + DateTime::TimeZone::Asia::Srednekolymsk 2.47 + DateTime::TimeZone::Asia::Taipei 2.47 + DateTime::TimeZone::Asia::Tashkent 2.47 + DateTime::TimeZone::Asia::Tbilisi 2.47 + DateTime::TimeZone::Asia::Tehran 2.47 + DateTime::TimeZone::Asia::Thimphu 2.47 + DateTime::TimeZone::Asia::Tokyo 2.47 + DateTime::TimeZone::Asia::Tomsk 2.47 + DateTime::TimeZone::Asia::Ulaanbaatar 2.47 + DateTime::TimeZone::Asia::Urumqi 2.47 + DateTime::TimeZone::Asia::Ust_Nera 2.47 + DateTime::TimeZone::Asia::Vladivostok 2.47 + DateTime::TimeZone::Asia::Yakutsk 2.47 + DateTime::TimeZone::Asia::Yangon 2.47 + DateTime::TimeZone::Asia::Yekaterinburg 2.47 + DateTime::TimeZone::Asia::Yerevan 2.47 + DateTime::TimeZone::Atlantic::Azores 2.47 + DateTime::TimeZone::Atlantic::Bermuda 2.47 + DateTime::TimeZone::Atlantic::Canary 2.47 + DateTime::TimeZone::Atlantic::Cape_Verde 2.47 + DateTime::TimeZone::Atlantic::Faroe 2.47 + DateTime::TimeZone::Atlantic::Madeira 2.47 + DateTime::TimeZone::Atlantic::Reykjavik 2.47 + DateTime::TimeZone::Atlantic::South_Georgia 2.47 + DateTime::TimeZone::Atlantic::Stanley 2.47 + DateTime::TimeZone::Australia::Adelaide 2.47 + DateTime::TimeZone::Australia::Brisbane 2.47 + DateTime::TimeZone::Australia::Broken_Hill 2.47 + DateTime::TimeZone::Australia::Darwin 2.47 + DateTime::TimeZone::Australia::Eucla 2.47 + DateTime::TimeZone::Australia::Hobart 2.47 + DateTime::TimeZone::Australia::Lindeman 2.47 + DateTime::TimeZone::Australia::Lord_Howe 2.47 + DateTime::TimeZone::Australia::Melbourne 2.47 + DateTime::TimeZone::Australia::Perth 2.47 + DateTime::TimeZone::Australia::Sydney 2.47 + DateTime::TimeZone::CET 2.47 + DateTime::TimeZone::CST6CDT 2.47 + DateTime::TimeZone::Catalog 2.47 + DateTime::TimeZone::EET 2.47 + DateTime::TimeZone::EST 2.47 + DateTime::TimeZone::EST5EDT 2.47 + DateTime::TimeZone::Europe::Amsterdam 2.47 + DateTime::TimeZone::Europe::Andorra 2.47 + DateTime::TimeZone::Europe::Astrakhan 2.47 + DateTime::TimeZone::Europe::Athens 2.47 + DateTime::TimeZone::Europe::Belgrade 2.47 + DateTime::TimeZone::Europe::Berlin 2.47 + DateTime::TimeZone::Europe::Brussels 2.47 + DateTime::TimeZone::Europe::Bucharest 2.47 + DateTime::TimeZone::Europe::Budapest 2.47 + DateTime::TimeZone::Europe::Chisinau 2.47 + DateTime::TimeZone::Europe::Copenhagen 2.47 + DateTime::TimeZone::Europe::Dublin 2.47 + DateTime::TimeZone::Europe::Gibraltar 2.47 + DateTime::TimeZone::Europe::Helsinki 2.47 + DateTime::TimeZone::Europe::Istanbul 2.47 + DateTime::TimeZone::Europe::Kaliningrad 2.47 + DateTime::TimeZone::Europe::Kiev 2.47 + DateTime::TimeZone::Europe::Kirov 2.47 + DateTime::TimeZone::Europe::Lisbon 2.47 + DateTime::TimeZone::Europe::London 2.47 + DateTime::TimeZone::Europe::Luxembourg 2.47 + DateTime::TimeZone::Europe::Madrid 2.47 + DateTime::TimeZone::Europe::Malta 2.47 + DateTime::TimeZone::Europe::Minsk 2.47 + DateTime::TimeZone::Europe::Monaco 2.47 + DateTime::TimeZone::Europe::Moscow 2.47 + DateTime::TimeZone::Europe::Oslo 2.47 + DateTime::TimeZone::Europe::Paris 2.47 + DateTime::TimeZone::Europe::Prague 2.47 + DateTime::TimeZone::Europe::Riga 2.47 + DateTime::TimeZone::Europe::Rome 2.47 + DateTime::TimeZone::Europe::Samara 2.47 + DateTime::TimeZone::Europe::Saratov 2.47 + DateTime::TimeZone::Europe::Simferopol 2.47 + DateTime::TimeZone::Europe::Sofia 2.47 + DateTime::TimeZone::Europe::Stockholm 2.47 + DateTime::TimeZone::Europe::Tallinn 2.47 + DateTime::TimeZone::Europe::Tirane 2.47 + DateTime::TimeZone::Europe::Ulyanovsk 2.47 + DateTime::TimeZone::Europe::Uzhgorod 2.47 + DateTime::TimeZone::Europe::Vienna 2.47 + DateTime::TimeZone::Europe::Vilnius 2.47 + DateTime::TimeZone::Europe::Volgograd 2.47 + DateTime::TimeZone::Europe::Warsaw 2.47 + DateTime::TimeZone::Europe::Zaporozhye 2.47 + DateTime::TimeZone::Europe::Zurich 2.47 + DateTime::TimeZone::Floating 2.47 + DateTime::TimeZone::HST 2.47 + DateTime::TimeZone::Indian::Chagos 2.47 + DateTime::TimeZone::Indian::Christmas 2.47 + DateTime::TimeZone::Indian::Cocos 2.47 + DateTime::TimeZone::Indian::Kerguelen 2.47 + DateTime::TimeZone::Indian::Mahe 2.47 + DateTime::TimeZone::Indian::Maldives 2.47 + DateTime::TimeZone::Indian::Mauritius 2.47 + DateTime::TimeZone::Indian::Reunion 2.47 + DateTime::TimeZone::Local 2.47 + DateTime::TimeZone::Local::Android 2.47 + DateTime::TimeZone::Local::Unix 2.47 + DateTime::TimeZone::Local::VMS 2.47 + DateTime::TimeZone::MET 2.47 + DateTime::TimeZone::MST 2.47 + DateTime::TimeZone::MST7MDT 2.47 + DateTime::TimeZone::OffsetOnly 2.47 + DateTime::TimeZone::OlsonDB 2.47 + DateTime::TimeZone::OlsonDB::Change 2.47 + DateTime::TimeZone::OlsonDB::Observance 2.47 + DateTime::TimeZone::OlsonDB::Rule 2.47 + DateTime::TimeZone::OlsonDB::Zone 2.47 + DateTime::TimeZone::PST8PDT 2.47 + DateTime::TimeZone::Pacific::Apia 2.47 + DateTime::TimeZone::Pacific::Auckland 2.47 + DateTime::TimeZone::Pacific::Bougainville 2.47 + DateTime::TimeZone::Pacific::Chatham 2.47 + DateTime::TimeZone::Pacific::Chuuk 2.47 + DateTime::TimeZone::Pacific::Easter 2.47 + DateTime::TimeZone::Pacific::Efate 2.47 + DateTime::TimeZone::Pacific::Enderbury 2.47 + DateTime::TimeZone::Pacific::Fakaofo 2.47 + DateTime::TimeZone::Pacific::Fiji 2.47 + DateTime::TimeZone::Pacific::Funafuti 2.47 + DateTime::TimeZone::Pacific::Galapagos 2.47 + DateTime::TimeZone::Pacific::Gambier 2.47 + DateTime::TimeZone::Pacific::Guadalcanal 2.47 + DateTime::TimeZone::Pacific::Guam 2.47 + DateTime::TimeZone::Pacific::Honolulu 2.47 + DateTime::TimeZone::Pacific::Kiritimati 2.47 + DateTime::TimeZone::Pacific::Kosrae 2.47 + DateTime::TimeZone::Pacific::Kwajalein 2.47 + DateTime::TimeZone::Pacific::Majuro 2.47 + DateTime::TimeZone::Pacific::Marquesas 2.47 + DateTime::TimeZone::Pacific::Nauru 2.47 + DateTime::TimeZone::Pacific::Niue 2.47 + DateTime::TimeZone::Pacific::Norfolk 2.47 + DateTime::TimeZone::Pacific::Noumea 2.47 + DateTime::TimeZone::Pacific::Pago_Pago 2.47 + DateTime::TimeZone::Pacific::Palau 2.47 + DateTime::TimeZone::Pacific::Pitcairn 2.47 + DateTime::TimeZone::Pacific::Pohnpei 2.47 + DateTime::TimeZone::Pacific::Port_Moresby 2.47 + DateTime::TimeZone::Pacific::Rarotonga 2.47 + DateTime::TimeZone::Pacific::Tahiti 2.47 + DateTime::TimeZone::Pacific::Tarawa 2.47 + DateTime::TimeZone::Pacific::Tongatapu 2.47 + DateTime::TimeZone::Pacific::Wake 2.47 + DateTime::TimeZone::Pacific::Wallis 2.47 + DateTime::TimeZone::UTC 2.47 + DateTime::TimeZone::WET 2.47 requirements: Class::Singleton 1.03 Cwd 3 @@ -2225,19 +2150,6 @@ DISTRIBUTIONS Test::More 0.98 parent 0 perl 5.008001 - Devel-CheckLib-1.11 - pathname: M/MA/MATTN/Devel-CheckLib-1.11.tar.gz - provides: - Devel::CheckLib 1.11 - requirements: - Exporter 0 - ExtUtils::MakeMaker 0 - File::Spec 0 - File::Temp 0.16 - IO::CaptureOutput 1.0801 - Mock::Config 0.02 - Test::More 0.62 - perl 5.00405 Devel-Confess-0.009004 pathname: H/HA/HAARG/Devel-Confess-0.009004.tar.gz provides: @@ -2265,17 +2177,19 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0 - Devel-OverloadInfo-0.004 - pathname: I/IL/ILMARI/Devel-OverloadInfo-0.004.tar.gz + Devel-OverloadInfo-0.007 + pathname: I/IL/ILMARI/Devel-OverloadInfo-0.007.tar.gz provides: - Devel::OverloadInfo 0.004 + Devel::OverloadInfo 0.007 requirements: + B 0 Exporter 5.57 ExtUtils::MakeMaker 0 MRO::Compat 0 Package::Stash 0.14 Scalar::Util 0 - Sub::Identify 0 + Sub::Util 1.40 + Text::ParseWords 0 overload 0 perl 5.006 strict 0 @@ -2294,11 +2208,11 @@ DISTRIBUTIONS perl 5.006001 strict 0 warnings 0 - Devel-StackTrace-2.02 - pathname: D/DR/DROLSKY/Devel-StackTrace-2.02.tar.gz + Devel-StackTrace-2.04 + pathname: D/DR/DROLSKY/Devel-StackTrace-2.04.tar.gz provides: - Devel::StackTrace 2.02 - Devel::StackTrace::Frame 2.02 + Devel::StackTrace 2.04 + Devel::StackTrace::Frame 2.04 requirements: ExtUtils::MakeMaker 0 File::Spec 0 @@ -2595,6 +2509,7 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Mail::Address 0 + Net::DNS 0 Scalar::Util 0 Test::More 0 perl 5.006 @@ -2622,19 +2537,6 @@ DISTRIBUTIONS Encoding::FixLatin 1.03 ExtUtils::MakeMaker 6.30 Test::More 0.90 - Error-0.17025 - pathname: S/SH/SHLOMIF/Error-0.17025.tar.gz - provides: - Error 0.17025 - Error::Simple 0.17025 - Error::WarnDie undef - Error::subs undef - requirements: - Module::Build 0.280801 - Scalar::Util 0 - perl v5.6.0 - strict 0 - warnings 0 Eval-Closure-0.14 pathname: D/DO/DOY/Eval-Closure-0.14.tar.gz provides: @@ -2767,51 +2669,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - ExtUtils-MakeMaker-7.44 - pathname: B/BI/BINGOS/ExtUtils-MakeMaker-7.44.tar.gz - provides: - ExtUtils::Command 7.44 - ExtUtils::Command::MM 7.44 - ExtUtils::Liblist 7.44 - ExtUtils::Liblist::Kid 7.44 - ExtUtils::MM 7.44 - ExtUtils::MM_AIX 7.44 - ExtUtils::MM_Any 7.44 - ExtUtils::MM_BeOS 7.44 - ExtUtils::MM_Cygwin 7.44 - ExtUtils::MM_DOS 7.44 - ExtUtils::MM_Darwin 7.44 - ExtUtils::MM_MacOS 7.44 - ExtUtils::MM_NW5 7.44 - ExtUtils::MM_OS2 7.44 - ExtUtils::MM_QNX 7.44 - ExtUtils::MM_UWIN 7.44 - ExtUtils::MM_Unix 7.44 - ExtUtils::MM_VMS 7.44 - ExtUtils::MM_VOS 7.44 - ExtUtils::MM_Win32 7.44 - ExtUtils::MM_Win95 7.44 - ExtUtils::MY 7.44 - ExtUtils::MakeMaker 7.44 - ExtUtils::MakeMaker::Config 7.44 - ExtUtils::MakeMaker::Locale 7.44 - ExtUtils::MakeMaker::_version 7.44 - ExtUtils::MakeMaker::charstar 7.44 - ExtUtils::MakeMaker::version 7.44 - ExtUtils::MakeMaker::version::regex 7.44 - ExtUtils::MakeMaker::version::vpp 7.44 - ExtUtils::Mkbootstrap 7.44 - ExtUtils::Mksymlists 7.44 - ExtUtils::testlib 7.44 - MM 7.44 - MY 7.44 - requirements: - Data::Dumper 0 - Encode 0 - File::Basename 0 - File::Spec 0.8 - Pod::Man 0 - perl 5.006 ExtUtils-MakeMaker-CPANfile-0.08 pathname: I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.08.tar.gz provides: @@ -3255,23 +3112,21 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - HTTP-Cookies-6.04 - pathname: O/OA/OALDERS/HTTP-Cookies-6.04.tar.gz + HTTP-Cookies-6.10 + pathname: O/OA/OALDERS/HTTP-Cookies-6.10.tar.gz provides: - HTTP::Cookies 6.04 - HTTP::Cookies::Microsoft 6.04 - HTTP::Cookies::Netscape 6.04 + HTTP::Cookies 6.10 + HTTP::Cookies::Microsoft 6.10 + HTTP::Cookies::Netscape 6.10 requirements: Carp 0 ExtUtils::MakeMaker 0 HTTP::Date 6 HTTP::Headers::Util 6 HTTP::Request 0 - Time::Local 0 locale 0 perl 5.008001 strict 0 - vars 0 HTTP-Daemon-6.01 pathname: G/GA/GAAS/HTTP-Daemon-6.01.tar.gz provides: @@ -3295,10 +3150,10 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Time::Local 0 perl 5.006002 - HTTP-Entity-Parser-0.20 - pathname: K/KA/KAZEBURO/HTTP-Entity-Parser-0.20.tar.gz + HTTP-Entity-Parser-0.25 + pathname: K/KA/KAZEBURO/HTTP-Entity-Parser-0.25.tar.gz provides: - HTTP::Entity::Parser 0.20 + HTTP::Entity::Parser 0.25 HTTP::Entity::Parser::JSON undef HTTP::Entity::Parser::MultiPart undef HTTP::Entity::Parser::OctetStream undef @@ -3313,7 +3168,7 @@ DISTRIBUTIONS Module::Load 0 Stream::Buffered 0 WWW::Form::UrlEncoded 0.23 - perl 5.008005 + perl 5.008001 HTTP-Headers-Fast-0.21 pathname: T/TO/TOKUHIROM/HTTP-Headers-Fast-0.21.tar.gz provides: @@ -3411,22 +3266,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.36 Socket 1.94 Test::More 0 - HTTP-Tiny-0.076 - pathname: D/DA/DAGOLDEN/HTTP-Tiny-0.076.tar.gz - provides: - HTTP::Tiny 0.076 - requirements: - Carp 0 - ExtUtils::MakeMaker 6.17 - Fcntl 0 - IO::Socket 0 - MIME::Base64 0 - Socket 0 - Time::Local 0 - bytes 0 - perl 5.006 - strict 0 - warnings 0 Hash-Merge-0.298 pathname: H/HE/HERMES/Hash-Merge-0.298.tar.gz provides: @@ -3490,21 +3329,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Scalar::Util 0 perl 5.008001 - IO-CaptureOutput-1.1104 - pathname: D/DA/DAGOLDEN/IO-CaptureOutput-1.1104.tar.gz - provides: - IO::CaptureOutput 1.1104 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 6.17 - File::Basename 0 - File::Temp 0.16 - Symbol 0 - perl 5.006 - strict 0 - vars 0 - warnings 0 IO-File-AtomicChange-0.05 pathname: H/HI/HIROSE/IO-File-AtomicChange-0.05.tar.gz provides: @@ -4331,14 +4155,6 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - Mock-Config-0.03 - pathname: R/RU/RURBAN/Mock-Config-0.03.tar.gz - provides: - Mock::Config 0.03 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0 - perl 5.006 Module-Build-0.4224 pathname: L/LE/LEONT/Module-Build-0.4224.tar.gz provides: @@ -4505,19 +4321,6 @@ DISTRIBUTIONS Try::Tiny 0 strict 0 warnings 0 - Module-Load-Conditional-0.70 - pathname: B/BI/BINGOS/Module-Load-Conditional-0.70.tar.gz - provides: - Module::Load::Conditional 0.70 - requirements: - ExtUtils::MakeMaker 0 - Locale::Maketext::Simple 0 - Module::CoreList 2.22 - Module::Load 0.28 - Module::Metadata 1.000005 - Params::Check 0 - Test::More 0 - version 0.69 Module-Pluggable-5.2 pathname: S/SI/SIMONW/Module-Pluggable-5.2.tar.gz provides: @@ -4848,368 +4651,458 @@ DISTRIBUTIONS MooX::Types::MooseLike 0.23 Test::Fatal 0.003 Test::More 0.96 - Moose-2.2007 - pathname: E/ET/ETHER/Moose-2.2007.tar.gz - provides: - Class::MOP 2.2007 - Class::MOP::Attribute 2.2007 - Class::MOP::Class 2.2007 - Class::MOP::Instance 2.2007 - Class::MOP::Method 2.2007 - Class::MOP::Method::Accessor 2.2007 - Class::MOP::Method::Constructor 2.2007 - Class::MOP::Method::Generated 2.2007 - Class::MOP::Method::Inlined 2.2007 - Class::MOP::Method::Meta 2.2007 - Class::MOP::Method::Wrapped 2.2007 - Class::MOP::Module 2.2007 - Class::MOP::Object 2.2007 - Class::MOP::Overload 2.2007 - Class::MOP::Package 2.2007 - Moose 2.2007 - Moose::Cookbook 2.2007 - Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing 2.2007 - Moose::Cookbook::Basics::BinaryTree_AttributeFeatures 2.2007 - Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild 2.2007 - Moose::Cookbook::Basics::Company_Subtypes 2.2007 - Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent 2.2007 - Moose::Cookbook::Basics::Document_AugmentAndInner 2.2007 - Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion 2.2007 - Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion 2.2007 - Moose::Cookbook::Basics::Immutable 2.2007 - Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD 2.2007 - Moose::Cookbook::Basics::Point_AttributesAndSubclassing 2.2007 - Moose::Cookbook::Extending::Debugging_BaseClassRole 2.2007 - Moose::Cookbook::Extending::ExtensionOverview 2.2007 - Moose::Cookbook::Extending::Mooseish_MooseSugar 2.2007 - Moose::Cookbook::Legacy::Debugging_BaseClassReplacement 2.2007 - Moose::Cookbook::Legacy::Labeled_AttributeMetaclass 2.2007 - Moose::Cookbook::Legacy::Table_ClassMetaclass 2.2007 - Moose::Cookbook::Meta::GlobRef_InstanceMetaclass 2.2007 - Moose::Cookbook::Meta::Labeled_AttributeTrait 2.2007 - Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass 2.2007 - Moose::Cookbook::Meta::Table_MetaclassTrait 2.2007 - Moose::Cookbook::Meta::WhyMeta 2.2007 - Moose::Cookbook::Roles::ApplicationToInstance 2.2007 - Moose::Cookbook::Roles::Comparable_CodeReuse 2.2007 - Moose::Cookbook::Roles::Restartable_AdvancedComposition 2.2007 - Moose::Cookbook::Snack::Keywords 2.2007 - Moose::Cookbook::Snack::Types 2.2007 - Moose::Cookbook::Style 2.2007 - Moose::Exception 2.2007 - Moose::Exception::AccessorMustReadWrite 2.2007 - Moose::Exception::AddParameterizableTypeTakesParameterizableType 2.2007 - Moose::Exception::AddRoleTakesAMooseMetaRoleInstance 2.2007 - Moose::Exception::AddRoleToARoleTakesAMooseMetaRole 2.2007 - Moose::Exception::ApplyTakesABlessedInstance 2.2007 - Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass 2.2007 - Moose::Exception::AttributeConflictInRoles 2.2007 - Moose::Exception::AttributeConflictInSummation 2.2007 - Moose::Exception::AttributeExtensionIsNotSupportedInRoles 2.2007 - Moose::Exception::AttributeIsRequired 2.2007 - Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass 2.2007 - Moose::Exception::AttributeNamesDoNotMatch 2.2007 - Moose::Exception::AttributeValueIsNotAnObject 2.2007 - Moose::Exception::AttributeValueIsNotDefined 2.2007 - Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef 2.2007 - Moose::Exception::BadOptionFormat 2.2007 - Moose::Exception::BothBuilderAndDefaultAreNotAllowed 2.2007 - Moose::Exception::BuilderDoesNotExist 2.2007 - Moose::Exception::BuilderMethodNotSupportedForAttribute 2.2007 - Moose::Exception::BuilderMethodNotSupportedForInlineAttribute 2.2007 - Moose::Exception::BuilderMustBeAMethodName 2.2007 - Moose::Exception::CallingMethodOnAnImmutableInstance 2.2007 - Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance 2.2007 - Moose::Exception::CanExtendOnlyClasses 2.2007 - Moose::Exception::CanOnlyConsumeRole 2.2007 - Moose::Exception::CanOnlyWrapBlessedCode 2.2007 - Moose::Exception::CanReblessOnlyIntoASubclass 2.2007 - Moose::Exception::CanReblessOnlyIntoASuperclass 2.2007 - Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion 2.2007 - Moose::Exception::CannotAddAsAnAttributeToARole 2.2007 - Moose::Exception::CannotApplyBaseClassRolesToRole 2.2007 - Moose::Exception::CannotAssignValueToReadOnlyAccessor 2.2007 - Moose::Exception::CannotAugmentIfLocalMethodPresent 2.2007 - Moose::Exception::CannotAugmentNoSuperMethod 2.2007 - Moose::Exception::CannotAutoDerefWithoutIsa 2.2007 - Moose::Exception::CannotAutoDereferenceTypeConstraint 2.2007 - Moose::Exception::CannotCalculateNativeType 2.2007 - Moose::Exception::CannotCallAnAbstractBaseMethod 2.2007 - Moose::Exception::CannotCallAnAbstractMethod 2.2007 - Moose::Exception::CannotCoerceAWeakRef 2.2007 - Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion 2.2007 - Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter 2.2007 - Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent 2.2007 - Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass 2.2007 - Moose::Exception::CannotDelegateLocalMethodIsPresent 2.2007 - Moose::Exception::CannotDelegateWithoutIsa 2.2007 - Moose::Exception::CannotFindDelegateMetaclass 2.2007 - Moose::Exception::CannotFindType 2.2007 - Moose::Exception::CannotFindTypeGivenToMatchOnType 2.2007 - Moose::Exception::CannotFixMetaclassCompatibility 2.2007 - Moose::Exception::CannotGenerateInlineConstraint 2.2007 - Moose::Exception::CannotInitializeMooseMetaRoleComposite 2.2007 - Moose::Exception::CannotInlineTypeConstraintCheck 2.2007 - Moose::Exception::CannotLocatePackageInINC 2.2007 - Moose::Exception::CannotMakeMetaclassCompatible 2.2007 - Moose::Exception::CannotOverrideALocalMethod 2.2007 - Moose::Exception::CannotOverrideBodyOfMetaMethods 2.2007 - Moose::Exception::CannotOverrideLocalMethodIsPresent 2.2007 - Moose::Exception::CannotOverrideNoSuperMethod 2.2007 - Moose::Exception::CannotRegisterUnnamedTypeConstraint 2.2007 - Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously 2.2007 - Moose::Exception::CircularReferenceInAlso 2.2007 - Moose::Exception::ClassDoesNotHaveInitMeta 2.2007 - Moose::Exception::ClassDoesTheExcludedRole 2.2007 - Moose::Exception::ClassNamesDoNotMatch 2.2007 - Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass 2.2007 - Moose::Exception::CodeBlockMustBeACodeRef 2.2007 - Moose::Exception::CoercingWithoutCoercions 2.2007 - Moose::Exception::CoercionAlreadyExists 2.2007 - Moose::Exception::CoercionNeedsTypeConstraint 2.2007 - Moose::Exception::ConflictDetectedInCheckRoleExclusions 2.2007 - Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass 2.2007 - Moose::Exception::ConstructClassInstanceTakesPackageName 2.2007 - Moose::Exception::CouldNotCreateMethod 2.2007 - Moose::Exception::CouldNotCreateWriter 2.2007 - Moose::Exception::CouldNotEvalConstructor 2.2007 - Moose::Exception::CouldNotEvalDestructor 2.2007 - Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom 2.2007 - Moose::Exception::CouldNotGenerateInlineAttributeMethod 2.2007 - Moose::Exception::CouldNotLocateTypeConstraintForUnion 2.2007 - Moose::Exception::CouldNotParseType 2.2007 - Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes 2.2007 - Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses 2.2007 - Moose::Exception::CreateMOPClassTakesHashRefOfMethods 2.2007 - Moose::Exception::CreateTakesArrayRefOfRoles 2.2007 - Moose::Exception::CreateTakesHashRefOfAttributes 2.2007 - Moose::Exception::CreateTakesHashRefOfMethods 2.2007 - Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef 2.2007 - Moose::Exception::DelegationToAClassWhichIsNotLoaded 2.2007 - Moose::Exception::DelegationToARoleWhichIsNotLoaded 2.2007 - Moose::Exception::DelegationToATypeWhichIsNotAClass 2.2007 - Moose::Exception::DoesRequiresRoleName 2.2007 - Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs 2.2007 - Moose::Exception::EnumValuesMustBeString 2.2007 - Moose::Exception::ExtendsMissingArgs 2.2007 - Moose::Exception::HandlesMustBeAHashRef 2.2007 - Moose::Exception::IllegalInheritedOptions 2.2007 - Moose::Exception::IllegalMethodTypeToAddMethodModifier 2.2007 - Moose::Exception::IncompatibleMetaclassOfSuperclass 2.2007 - Moose::Exception::InitMetaRequiresClass 2.2007 - Moose::Exception::InitializeTakesUnBlessedPackageName 2.2007 - Moose::Exception::InstanceBlessedIntoWrongClass 2.2007 - Moose::Exception::InstanceMustBeABlessedReference 2.2007 - Moose::Exception::InvalidArgPassedToMooseUtilMetaRole 2.2007 - Moose::Exception::InvalidArgumentToMethod 2.2007 - Moose::Exception::InvalidArgumentsToTraitAliases 2.2007 - Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint 2.2007 - Moose::Exception::InvalidHandleValue 2.2007 - Moose::Exception::InvalidHasProvidedInARole 2.2007 - Moose::Exception::InvalidNameForType 2.2007 - Moose::Exception::InvalidOverloadOperator 2.2007 - Moose::Exception::InvalidRoleApplication 2.2007 - Moose::Exception::InvalidTypeConstraint 2.2007 - Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint 2.2007 - Moose::Exception::InvalidValueForIs 2.2007 - Moose::Exception::IsaDoesNotDoTheRole 2.2007 - Moose::Exception::IsaLacksDoesMethod 2.2007 - Moose::Exception::LazyAttributeNeedsADefault 2.2007 - Moose::Exception::Legacy 2.2007 - Moose::Exception::MOPAttributeNewNeedsAttributeName 2.2007 - Moose::Exception::MatchActionMustBeACodeRef 2.2007 - Moose::Exception::MessageParameterMustBeCodeRef 2.2007 - Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass 2.2007 - Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass 2.2007 - Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass 2.2007 - Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass 2.2007 - Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole 2.2007 - Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass 2.2007 - Moose::Exception::MetaclassNotLoaded 2.2007 - Moose::Exception::MetaclassTypeIncompatible 2.2007 - Moose::Exception::MethodExpectedAMetaclassObject 2.2007 - Moose::Exception::MethodExpectsFewerArgs 2.2007 - Moose::Exception::MethodExpectsMoreArgs 2.2007 - Moose::Exception::MethodModifierNeedsMethodName 2.2007 - Moose::Exception::MethodNameConflictInRoles 2.2007 - Moose::Exception::MethodNameNotFoundInInheritanceHierarchy 2.2007 - Moose::Exception::MethodNameNotGiven 2.2007 - Moose::Exception::MustDefineAMethodName 2.2007 - Moose::Exception::MustDefineAnAttributeName 2.2007 - Moose::Exception::MustDefineAnOverloadOperator 2.2007 - Moose::Exception::MustHaveAtLeastOneValueToEnumerate 2.2007 - Moose::Exception::MustPassAHashOfOptions 2.2007 - Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass 2.2007 - Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance 2.2007 - Moose::Exception::MustPassEvenNumberOfArguments 2.2007 - Moose::Exception::MustPassEvenNumberOfAttributeOptions 2.2007 - Moose::Exception::MustProvideANameForTheAttribute 2.2007 - Moose::Exception::MustSpecifyAtleastOneMethod 2.2007 - Moose::Exception::MustSpecifyAtleastOneRole 2.2007 - Moose::Exception::MustSpecifyAtleastOneRoleToApplicant 2.2007 - Moose::Exception::MustSupplyAClassMOPAttributeInstance 2.2007 - Moose::Exception::MustSupplyADelegateToMethod 2.2007 - Moose::Exception::MustSupplyAMetaclass 2.2007 - Moose::Exception::MustSupplyAMooseMetaAttributeInstance 2.2007 - Moose::Exception::MustSupplyAnAccessorTypeToConstructWith 2.2007 - Moose::Exception::MustSupplyAnAttributeToConstructWith 2.2007 - Moose::Exception::MustSupplyArrayRefAsCurriedArguments 2.2007 - Moose::Exception::MustSupplyPackageNameAndName 2.2007 - Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion 2.2007 - Moose::Exception::NeitherAttributeNorAttributeNameIsGiven 2.2007 - Moose::Exception::NeitherClassNorClassNameIsGiven 2.2007 - Moose::Exception::NeitherRoleNorRoleNameIsGiven 2.2007 - Moose::Exception::NeitherTypeNorTypeNameIsGiven 2.2007 - Moose::Exception::NoAttributeFoundInSuperClass 2.2007 - Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass 2.2007 - Moose::Exception::NoCasesMatched 2.2007 - Moose::Exception::NoConstraintCheckForTypeConstraint 2.2007 - Moose::Exception::NoDestructorClassSpecified 2.2007 - Moose::Exception::NoImmutableTraitSpecifiedForClass 2.2007 - Moose::Exception::NoParentGivenToSubtype 2.2007 - Moose::Exception::OnlyInstancesCanBeCloned 2.2007 - Moose::Exception::OperatorIsRequired 2.2007 - Moose::Exception::OverloadConflictInSummation 2.2007 - Moose::Exception::OverloadRequiresAMetaClass 2.2007 - Moose::Exception::OverloadRequiresAMetaMethod 2.2007 - Moose::Exception::OverloadRequiresAMetaOverload 2.2007 - Moose::Exception::OverloadRequiresAMethodNameOrCoderef 2.2007 - Moose::Exception::OverloadRequiresAnOperator 2.2007 - Moose::Exception::OverloadRequiresNamesForCoderef 2.2007 - Moose::Exception::OverrideConflictInComposition 2.2007 - Moose::Exception::OverrideConflictInSummation 2.2007 - Moose::Exception::PackageDoesNotUseMooseExporter 2.2007 - Moose::Exception::PackageNameAndNameParamsNotGivenToWrap 2.2007 - Moose::Exception::PackagesAndModulesAreNotCachable 2.2007 - Moose::Exception::ParameterIsNotSubtypeOfParent 2.2007 - Moose::Exception::ReferencesAreNotAllowedAsDefault 2.2007 - Moose::Exception::RequiredAttributeLacksInitialization 2.2007 - Moose::Exception::RequiredAttributeNeedsADefault 2.2007 - Moose::Exception::RequiredMethodsImportedByClass 2.2007 - Moose::Exception::RequiredMethodsNotImplementedByClass 2.2007 - Moose::Exception::Role::Attribute 2.2007 - Moose::Exception::Role::AttributeName 2.2007 - Moose::Exception::Role::Class 2.2007 - Moose::Exception::Role::EitherAttributeOrAttributeName 2.2007 - Moose::Exception::Role::Instance 2.2007 - Moose::Exception::Role::InstanceClass 2.2007 - Moose::Exception::Role::InvalidAttributeOptions 2.2007 - Moose::Exception::Role::Method 2.2007 - Moose::Exception::Role::ParamsHash 2.2007 - Moose::Exception::Role::Role 2.2007 - Moose::Exception::Role::RoleForCreate 2.2007 - Moose::Exception::Role::RoleForCreateMOPClass 2.2007 - Moose::Exception::Role::TypeConstraint 2.2007 - Moose::Exception::RoleDoesTheExcludedRole 2.2007 - Moose::Exception::RoleExclusionConflict 2.2007 - Moose::Exception::RoleNameRequired 2.2007 - Moose::Exception::RoleNameRequiredForMooseMetaRole 2.2007 - Moose::Exception::RolesDoNotSupportAugment 2.2007 - Moose::Exception::RolesDoNotSupportExtends 2.2007 - Moose::Exception::RolesDoNotSupportInner 2.2007 - Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers 2.2007 - Moose::Exception::RolesInCreateTakesAnArrayRef 2.2007 - Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole 2.2007 - Moose::Exception::SingleParamsToNewMustBeHashRef 2.2007 - Moose::Exception::TriggerMustBeACodeRef 2.2007 - Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType 2.2007 - Moose::Exception::TypeConstraintIsAlreadyCreated 2.2007 - Moose::Exception::TypeParameterMustBeMooseMetaType 2.2007 - Moose::Exception::UnableToCanonicalizeHandles 2.2007 - Moose::Exception::UnableToCanonicalizeNonRolePackage 2.2007 - Moose::Exception::UnableToRecognizeDelegateMetaclass 2.2007 - Moose::Exception::UndefinedHashKeysPassedToMethod 2.2007 - Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs 2.2007 - Moose::Exception::UnionTakesAtleastTwoTypeNames 2.2007 - Moose::Exception::ValidationFailedForInlineTypeConstraint 2.2007 - Moose::Exception::ValidationFailedForTypeConstraint 2.2007 - Moose::Exception::WrapTakesACodeRefToBless 2.2007 - Moose::Exception::WrongTypeConstraintGiven 2.2007 - Moose::Exporter 2.2007 - Moose::Intro 2.2007 - Moose::Manual 2.2007 - Moose::Manual::Attributes 2.2007 - Moose::Manual::BestPractices 2.2007 - Moose::Manual::Classes 2.2007 - Moose::Manual::Concepts 2.2007 - Moose::Manual::Construction 2.2007 - Moose::Manual::Contributing 2.2007 - Moose::Manual::Delegation 2.2007 - Moose::Manual::Delta 2.2007 - Moose::Manual::Exceptions 2.2007 - Moose::Manual::Exceptions::Manifest 2.2007 - Moose::Manual::FAQ 2.2007 - Moose::Manual::MOP 2.2007 - Moose::Manual::MethodModifiers 2.2007 - Moose::Manual::MooseX 2.2007 - Moose::Manual::Resources 2.2007 - Moose::Manual::Roles 2.2007 - Moose::Manual::Support 2.2007 - Moose::Manual::Types 2.2007 - Moose::Manual::Unsweetened 2.2007 - Moose::Meta::Attribute 2.2007 - Moose::Meta::Attribute::Native 2.2007 - Moose::Meta::Attribute::Native::Trait::Array 2.2007 - Moose::Meta::Attribute::Native::Trait::Bool 2.2007 - Moose::Meta::Attribute::Native::Trait::Code 2.2007 - Moose::Meta::Attribute::Native::Trait::Counter 2.2007 - Moose::Meta::Attribute::Native::Trait::Hash 2.2007 - Moose::Meta::Attribute::Native::Trait::Number 2.2007 - Moose::Meta::Attribute::Native::Trait::String 2.2007 - Moose::Meta::Class 2.2007 - Moose::Meta::Instance 2.2007 - Moose::Meta::Method 2.2007 - Moose::Meta::Method::Accessor 2.2007 - Moose::Meta::Method::Augmented 2.2007 - Moose::Meta::Method::Constructor 2.2007 - Moose::Meta::Method::Delegation 2.2007 - Moose::Meta::Method::Destructor 2.2007 - Moose::Meta::Method::Meta 2.2007 - Moose::Meta::Method::Overridden 2.2007 - Moose::Meta::Role 2.2007 - Moose::Meta::Role::Application 2.2007 - Moose::Meta::Role::Application::RoleSummation 2.2007 - Moose::Meta::Role::Application::ToClass 2.2007 - Moose::Meta::Role::Application::ToInstance 2.2007 - Moose::Meta::Role::Application::ToRole 2.2007 - Moose::Meta::Role::Attribute 2.2007 - Moose::Meta::Role::Composite 2.2007 - Moose::Meta::Role::Method 2.2007 - Moose::Meta::Role::Method::Conflicting 2.2007 - Moose::Meta::Role::Method::Required 2.2007 - Moose::Meta::TypeCoercion 2.2007 - Moose::Meta::TypeCoercion::Union 2.2007 - Moose::Meta::TypeConstraint 2.2007 - Moose::Meta::TypeConstraint::Class 2.2007 - Moose::Meta::TypeConstraint::DuckType 2.2007 - Moose::Meta::TypeConstraint::Enum 2.2007 - Moose::Meta::TypeConstraint::Parameterizable 2.2007 - Moose::Meta::TypeConstraint::Parameterized 2.2007 - Moose::Meta::TypeConstraint::Registry 2.2007 - Moose::Meta::TypeConstraint::Role 2.2007 - Moose::Meta::TypeConstraint::Union 2.2007 - Moose::Object 2.2007 - Moose::Role 2.2007 - Moose::Spec::Role 2.2007 - Moose::Unsweetened 2.2007 - Moose::Util 2.2007 - Moose::Util::MetaRole 2.2007 - Moose::Util::TypeConstraints 2.2007 - Test::Moose 2.2007 - metaclass 2.2007 - oose 2.2007 + Moose-2.2015 + pathname: E/ET/ETHER/Moose-2.2015.tar.gz + provides: + Class::MOP 2.2015 + Class::MOP::Attribute 2.2015 + Class::MOP::Class 2.2015 + Class::MOP::Class::Immutable::Trait 2.2015 + Class::MOP::Deprecated 2.2015 + Class::MOP::Instance 2.2015 + Class::MOP::Method 2.2015 + Class::MOP::Method::Accessor 2.2015 + Class::MOP::Method::Constructor 2.2015 + Class::MOP::Method::Generated 2.2015 + Class::MOP::Method::Inlined 2.2015 + Class::MOP::Method::Meta 2.2015 + Class::MOP::Method::Wrapped 2.2015 + Class::MOP::MiniTrait 2.2015 + Class::MOP::Mixin 2.2015 + Class::MOP::Mixin::AttributeCore 2.2015 + Class::MOP::Mixin::HasAttributes 2.2015 + Class::MOP::Mixin::HasMethods 2.2015 + Class::MOP::Mixin::HasOverloads 2.2015 + Class::MOP::Module 2.2015 + Class::MOP::Object 2.2015 + Class::MOP::Overload 2.2015 + Class::MOP::Package 2.2015 + Moose 2.2015 + Moose::Cookbook 2.2015 + Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing 2.2015 + Moose::Cookbook::Basics::BinaryTree_AttributeFeatures 2.2015 + Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild 2.2015 + Moose::Cookbook::Basics::Company_Subtypes 2.2015 + Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent 2.2015 + Moose::Cookbook::Basics::Document_AugmentAndInner 2.2015 + Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion 2.2015 + Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion 2.2015 + Moose::Cookbook::Basics::Immutable 2.2015 + Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD 2.2015 + Moose::Cookbook::Basics::Point_AttributesAndSubclassing 2.2015 + Moose::Cookbook::Extending::Debugging_BaseClassRole 2.2015 + Moose::Cookbook::Extending::ExtensionOverview 2.2015 + Moose::Cookbook::Extending::Mooseish_MooseSugar 2.2015 + Moose::Cookbook::Legacy::Debugging_BaseClassReplacement 2.2015 + Moose::Cookbook::Legacy::Labeled_AttributeMetaclass 2.2015 + Moose::Cookbook::Legacy::Table_ClassMetaclass 2.2015 + Moose::Cookbook::Meta::GlobRef_InstanceMetaclass 2.2015 + Moose::Cookbook::Meta::Labeled_AttributeTrait 2.2015 + Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass 2.2015 + Moose::Cookbook::Meta::Table_MetaclassTrait 2.2015 + Moose::Cookbook::Meta::WhyMeta 2.2015 + Moose::Cookbook::Roles::ApplicationToInstance 2.2015 + Moose::Cookbook::Roles::Comparable_CodeReuse 2.2015 + Moose::Cookbook::Roles::Restartable_AdvancedComposition 2.2015 + Moose::Cookbook::Snack::Keywords 2.2015 + Moose::Cookbook::Snack::Types 2.2015 + Moose::Cookbook::Style 2.2015 + Moose::Deprecated 2.2015 + Moose::Exception 2.2015 + Moose::Exception::AccessorMustReadWrite 2.2015 + Moose::Exception::AddParameterizableTypeTakesParameterizableType 2.2015 + Moose::Exception::AddRoleTakesAMooseMetaRoleInstance 2.2015 + Moose::Exception::AddRoleToARoleTakesAMooseMetaRole 2.2015 + Moose::Exception::ApplyTakesABlessedInstance 2.2015 + Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass 2.2015 + Moose::Exception::AttributeConflictInRoles 2.2015 + Moose::Exception::AttributeConflictInSummation 2.2015 + Moose::Exception::AttributeExtensionIsNotSupportedInRoles 2.2015 + Moose::Exception::AttributeIsRequired 2.2015 + Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass 2.2015 + Moose::Exception::AttributeNamesDoNotMatch 2.2015 + Moose::Exception::AttributeValueIsNotAnObject 2.2015 + Moose::Exception::AttributeValueIsNotDefined 2.2015 + Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef 2.2015 + Moose::Exception::BadOptionFormat 2.2015 + Moose::Exception::BothBuilderAndDefaultAreNotAllowed 2.2015 + Moose::Exception::BuilderDoesNotExist 2.2015 + Moose::Exception::BuilderMethodNotSupportedForAttribute 2.2015 + Moose::Exception::BuilderMethodNotSupportedForInlineAttribute 2.2015 + Moose::Exception::BuilderMustBeAMethodName 2.2015 + Moose::Exception::CallingMethodOnAnImmutableInstance 2.2015 + Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance 2.2015 + Moose::Exception::CanExtendOnlyClasses 2.2015 + Moose::Exception::CanOnlyConsumeRole 2.2015 + Moose::Exception::CanOnlyWrapBlessedCode 2.2015 + Moose::Exception::CanReblessOnlyIntoASubclass 2.2015 + Moose::Exception::CanReblessOnlyIntoASuperclass 2.2015 + Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion 2.2015 + Moose::Exception::CannotAddAsAnAttributeToARole 2.2015 + Moose::Exception::CannotApplyBaseClassRolesToRole 2.2015 + Moose::Exception::CannotAssignValueToReadOnlyAccessor 2.2015 + Moose::Exception::CannotAugmentIfLocalMethodPresent 2.2015 + Moose::Exception::CannotAugmentNoSuperMethod 2.2015 + Moose::Exception::CannotAutoDerefWithoutIsa 2.2015 + Moose::Exception::CannotAutoDereferenceTypeConstraint 2.2015 + Moose::Exception::CannotCalculateNativeType 2.2015 + Moose::Exception::CannotCallAnAbstractBaseMethod 2.2015 + Moose::Exception::CannotCallAnAbstractMethod 2.2015 + Moose::Exception::CannotCoerceAWeakRef 2.2015 + Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion 2.2015 + Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter 2.2015 + Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent 2.2015 + Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass 2.2015 + Moose::Exception::CannotDelegateLocalMethodIsPresent 2.2015 + Moose::Exception::CannotDelegateWithoutIsa 2.2015 + Moose::Exception::CannotFindDelegateMetaclass 2.2015 + Moose::Exception::CannotFindType 2.2015 + Moose::Exception::CannotFindTypeGivenToMatchOnType 2.2015 + Moose::Exception::CannotFixMetaclassCompatibility 2.2015 + Moose::Exception::CannotGenerateInlineConstraint 2.2015 + Moose::Exception::CannotInitializeMooseMetaRoleComposite 2.2015 + Moose::Exception::CannotInlineTypeConstraintCheck 2.2015 + Moose::Exception::CannotLocatePackageInINC 2.2015 + Moose::Exception::CannotMakeMetaclassCompatible 2.2015 + Moose::Exception::CannotOverrideALocalMethod 2.2015 + Moose::Exception::CannotOverrideBodyOfMetaMethods 2.2015 + Moose::Exception::CannotOverrideLocalMethodIsPresent 2.2015 + Moose::Exception::CannotOverrideNoSuperMethod 2.2015 + Moose::Exception::CannotRegisterUnnamedTypeConstraint 2.2015 + Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously 2.2015 + Moose::Exception::CircularReferenceInAlso 2.2015 + Moose::Exception::ClassDoesNotHaveInitMeta 2.2015 + Moose::Exception::ClassDoesTheExcludedRole 2.2015 + Moose::Exception::ClassNamesDoNotMatch 2.2015 + Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass 2.2015 + Moose::Exception::CodeBlockMustBeACodeRef 2.2015 + Moose::Exception::CoercingWithoutCoercions 2.2015 + Moose::Exception::CoercionAlreadyExists 2.2015 + Moose::Exception::CoercionNeedsTypeConstraint 2.2015 + Moose::Exception::ConflictDetectedInCheckRoleExclusions 2.2015 + Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass 2.2015 + Moose::Exception::ConstructClassInstanceTakesPackageName 2.2015 + Moose::Exception::CouldNotCreateMethod 2.2015 + Moose::Exception::CouldNotCreateWriter 2.2015 + Moose::Exception::CouldNotEvalConstructor 2.2015 + Moose::Exception::CouldNotEvalDestructor 2.2015 + Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom 2.2015 + Moose::Exception::CouldNotGenerateInlineAttributeMethod 2.2015 + Moose::Exception::CouldNotLocateTypeConstraintForUnion 2.2015 + Moose::Exception::CouldNotParseType 2.2015 + Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes 2.2015 + Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses 2.2015 + Moose::Exception::CreateMOPClassTakesHashRefOfMethods 2.2015 + Moose::Exception::CreateTakesArrayRefOfRoles 2.2015 + Moose::Exception::CreateTakesHashRefOfAttributes 2.2015 + Moose::Exception::CreateTakesHashRefOfMethods 2.2015 + Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef 2.2015 + Moose::Exception::DelegationToAClassWhichIsNotLoaded 2.2015 + Moose::Exception::DelegationToARoleWhichIsNotLoaded 2.2015 + Moose::Exception::DelegationToATypeWhichIsNotAClass 2.2015 + Moose::Exception::DoesRequiresRoleName 2.2015 + Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs 2.2015 + Moose::Exception::EnumValuesMustBeString 2.2015 + Moose::Exception::ExtendsMissingArgs 2.2015 + Moose::Exception::HandlesMustBeAHashRef 2.2015 + Moose::Exception::IllegalInheritedOptions 2.2015 + Moose::Exception::IllegalMethodTypeToAddMethodModifier 2.2015 + Moose::Exception::IncompatibleMetaclassOfSuperclass 2.2015 + Moose::Exception::InitMetaRequiresClass 2.2015 + Moose::Exception::InitializeTakesUnBlessedPackageName 2.2015 + Moose::Exception::InstanceBlessedIntoWrongClass 2.2015 + Moose::Exception::InstanceMustBeABlessedReference 2.2015 + Moose::Exception::InvalidArgPassedToMooseUtilMetaRole 2.2015 + Moose::Exception::InvalidArgumentToMethod 2.2015 + Moose::Exception::InvalidArgumentsToTraitAliases 2.2015 + Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint 2.2015 + Moose::Exception::InvalidHandleValue 2.2015 + Moose::Exception::InvalidHasProvidedInARole 2.2015 + Moose::Exception::InvalidNameForType 2.2015 + Moose::Exception::InvalidOverloadOperator 2.2015 + Moose::Exception::InvalidRoleApplication 2.2015 + Moose::Exception::InvalidTypeConstraint 2.2015 + Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint 2.2015 + Moose::Exception::InvalidValueForIs 2.2015 + Moose::Exception::IsaDoesNotDoTheRole 2.2015 + Moose::Exception::IsaLacksDoesMethod 2.2015 + Moose::Exception::LazyAttributeNeedsADefault 2.2015 + Moose::Exception::Legacy 2.2015 + Moose::Exception::MOPAttributeNewNeedsAttributeName 2.2015 + Moose::Exception::MatchActionMustBeACodeRef 2.2015 + Moose::Exception::MessageParameterMustBeCodeRef 2.2015 + Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass 2.2015 + Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass 2.2015 + Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass 2.2015 + Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass 2.2015 + Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole 2.2015 + Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass 2.2015 + Moose::Exception::MetaclassNotLoaded 2.2015 + Moose::Exception::MetaclassTypeIncompatible 2.2015 + Moose::Exception::MethodExpectedAMetaclassObject 2.2015 + Moose::Exception::MethodExpectsFewerArgs 2.2015 + Moose::Exception::MethodExpectsMoreArgs 2.2015 + Moose::Exception::MethodModifierNeedsMethodName 2.2015 + Moose::Exception::MethodNameConflictInRoles 2.2015 + Moose::Exception::MethodNameNotFoundInInheritanceHierarchy 2.2015 + Moose::Exception::MethodNameNotGiven 2.2015 + Moose::Exception::MustDefineAMethodName 2.2015 + Moose::Exception::MustDefineAnAttributeName 2.2015 + Moose::Exception::MustDefineAnOverloadOperator 2.2015 + Moose::Exception::MustHaveAtLeastOneValueToEnumerate 2.2015 + Moose::Exception::MustPassAHashOfOptions 2.2015 + Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass 2.2015 + Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance 2.2015 + Moose::Exception::MustPassEvenNumberOfArguments 2.2015 + Moose::Exception::MustPassEvenNumberOfAttributeOptions 2.2015 + Moose::Exception::MustProvideANameForTheAttribute 2.2015 + Moose::Exception::MustSpecifyAtleastOneMethod 2.2015 + Moose::Exception::MustSpecifyAtleastOneRole 2.2015 + Moose::Exception::MustSpecifyAtleastOneRoleToApplicant 2.2015 + Moose::Exception::MustSupplyAClassMOPAttributeInstance 2.2015 + Moose::Exception::MustSupplyADelegateToMethod 2.2015 + Moose::Exception::MustSupplyAMetaclass 2.2015 + Moose::Exception::MustSupplyAMooseMetaAttributeInstance 2.2015 + Moose::Exception::MustSupplyAnAccessorTypeToConstructWith 2.2015 + Moose::Exception::MustSupplyAnAttributeToConstructWith 2.2015 + Moose::Exception::MustSupplyArrayRefAsCurriedArguments 2.2015 + Moose::Exception::MustSupplyPackageNameAndName 2.2015 + Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion 2.2015 + Moose::Exception::NeitherAttributeNorAttributeNameIsGiven 2.2015 + Moose::Exception::NeitherClassNorClassNameIsGiven 2.2015 + Moose::Exception::NeitherRoleNorRoleNameIsGiven 2.2015 + Moose::Exception::NeitherTypeNorTypeNameIsGiven 2.2015 + Moose::Exception::NoAttributeFoundInSuperClass 2.2015 + Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass 2.2015 + Moose::Exception::NoCasesMatched 2.2015 + Moose::Exception::NoConstraintCheckForTypeConstraint 2.2015 + Moose::Exception::NoDestructorClassSpecified 2.2015 + Moose::Exception::NoImmutableTraitSpecifiedForClass 2.2015 + Moose::Exception::NoParentGivenToSubtype 2.2015 + Moose::Exception::OnlyInstancesCanBeCloned 2.2015 + Moose::Exception::OperatorIsRequired 2.2015 + Moose::Exception::OverloadConflictInSummation 2.2015 + Moose::Exception::OverloadRequiresAMetaClass 2.2015 + Moose::Exception::OverloadRequiresAMetaMethod 2.2015 + Moose::Exception::OverloadRequiresAMetaOverload 2.2015 + Moose::Exception::OverloadRequiresAMethodNameOrCoderef 2.2015 + Moose::Exception::OverloadRequiresAnOperator 2.2015 + Moose::Exception::OverloadRequiresNamesForCoderef 2.2015 + Moose::Exception::OverrideConflictInComposition 2.2015 + Moose::Exception::OverrideConflictInSummation 2.2015 + Moose::Exception::PackageDoesNotUseMooseExporter 2.2015 + Moose::Exception::PackageNameAndNameParamsNotGivenToWrap 2.2015 + Moose::Exception::PackagesAndModulesAreNotCachable 2.2015 + Moose::Exception::ParameterIsNotSubtypeOfParent 2.2015 + Moose::Exception::ReferencesAreNotAllowedAsDefault 2.2015 + Moose::Exception::RequiredAttributeLacksInitialization 2.2015 + Moose::Exception::RequiredAttributeNeedsADefault 2.2015 + Moose::Exception::RequiredMethodsImportedByClass 2.2015 + Moose::Exception::RequiredMethodsNotImplementedByClass 2.2015 + Moose::Exception::Role::Attribute 2.2015 + Moose::Exception::Role::AttributeName 2.2015 + Moose::Exception::Role::Class 2.2015 + Moose::Exception::Role::EitherAttributeOrAttributeName 2.2015 + Moose::Exception::Role::Instance 2.2015 + Moose::Exception::Role::InstanceClass 2.2015 + Moose::Exception::Role::InvalidAttributeOptions 2.2015 + Moose::Exception::Role::Method 2.2015 + Moose::Exception::Role::ParamsHash 2.2015 + Moose::Exception::Role::Role 2.2015 + Moose::Exception::Role::RoleForCreate 2.2015 + Moose::Exception::Role::RoleForCreateMOPClass 2.2015 + Moose::Exception::Role::TypeConstraint 2.2015 + Moose::Exception::RoleDoesTheExcludedRole 2.2015 + Moose::Exception::RoleExclusionConflict 2.2015 + Moose::Exception::RoleNameRequired 2.2015 + Moose::Exception::RoleNameRequiredForMooseMetaRole 2.2015 + Moose::Exception::RolesDoNotSupportAugment 2.2015 + Moose::Exception::RolesDoNotSupportExtends 2.2015 + Moose::Exception::RolesDoNotSupportInner 2.2015 + Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers 2.2015 + Moose::Exception::RolesInCreateTakesAnArrayRef 2.2015 + Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole 2.2015 + Moose::Exception::SingleParamsToNewMustBeHashRef 2.2015 + Moose::Exception::TriggerMustBeACodeRef 2.2015 + Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType 2.2015 + Moose::Exception::TypeConstraintIsAlreadyCreated 2.2015 + Moose::Exception::TypeParameterMustBeMooseMetaType 2.2015 + Moose::Exception::UnableToCanonicalizeHandles 2.2015 + Moose::Exception::UnableToCanonicalizeNonRolePackage 2.2015 + Moose::Exception::UnableToRecognizeDelegateMetaclass 2.2015 + Moose::Exception::UndefinedHashKeysPassedToMethod 2.2015 + Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs 2.2015 + Moose::Exception::UnionTakesAtleastTwoTypeNames 2.2015 + Moose::Exception::ValidationFailedForInlineTypeConstraint 2.2015 + Moose::Exception::ValidationFailedForTypeConstraint 2.2015 + Moose::Exception::WrapTakesACodeRefToBless 2.2015 + Moose::Exception::WrongTypeConstraintGiven 2.2015 + Moose::Exporter 2.2015 + Moose::Intro 2.2015 + Moose::Manual 2.2015 + Moose::Manual::Attributes 2.2015 + Moose::Manual::BestPractices 2.2015 + Moose::Manual::Classes 2.2015 + Moose::Manual::Concepts 2.2015 + Moose::Manual::Construction 2.2015 + Moose::Manual::Contributing 2.2015 + Moose::Manual::Delegation 2.2015 + Moose::Manual::Delta 2.2015 + Moose::Manual::Exceptions 2.2015 + Moose::Manual::Exceptions::Manifest 2.2015 + Moose::Manual::FAQ 2.2015 + Moose::Manual::MOP 2.2015 + Moose::Manual::MethodModifiers 2.2015 + Moose::Manual::MooseX 2.2015 + Moose::Manual::Resources 2.2015 + Moose::Manual::Roles 2.2015 + Moose::Manual::Support 2.2015 + Moose::Manual::Types 2.2015 + Moose::Manual::Unsweetened 2.2015 + Moose::Meta::Attribute 2.2015 + Moose::Meta::Attribute::Native 2.2015 + Moose::Meta::Attribute::Native::Trait 2.2015 + Moose::Meta::Attribute::Native::Trait::Array 2.2015 + Moose::Meta::Attribute::Native::Trait::Bool 2.2015 + Moose::Meta::Attribute::Native::Trait::Code 2.2015 + Moose::Meta::Attribute::Native::Trait::Counter 2.2015 + Moose::Meta::Attribute::Native::Trait::Hash 2.2015 + Moose::Meta::Attribute::Native::Trait::Number 2.2015 + Moose::Meta::Attribute::Native::Trait::String 2.2015 + Moose::Meta::Class 2.2015 + Moose::Meta::Class::Immutable::Trait 2.2015 + Moose::Meta::Instance 2.2015 + Moose::Meta::Method 2.2015 + Moose::Meta::Method::Accessor 2.2015 + Moose::Meta::Method::Accessor::Native 2.2015 + Moose::Meta::Method::Accessor::Native::Array 2.2015 + Moose::Meta::Method::Accessor::Native::Array::Writer 2.2015 + Moose::Meta::Method::Accessor::Native::Array::accessor 2.2015 + Moose::Meta::Method::Accessor::Native::Array::clear 2.2015 + Moose::Meta::Method::Accessor::Native::Array::count 2.2015 + Moose::Meta::Method::Accessor::Native::Array::delete 2.2015 + Moose::Meta::Method::Accessor::Native::Array::elements 2.2015 + Moose::Meta::Method::Accessor::Native::Array::first 2.2015 + Moose::Meta::Method::Accessor::Native::Array::first_index 2.2015 + Moose::Meta::Method::Accessor::Native::Array::get 2.2015 + Moose::Meta::Method::Accessor::Native::Array::grep 2.2015 + Moose::Meta::Method::Accessor::Native::Array::insert 2.2015 + Moose::Meta::Method::Accessor::Native::Array::is_empty 2.2015 + Moose::Meta::Method::Accessor::Native::Array::join 2.2015 + Moose::Meta::Method::Accessor::Native::Array::map 2.2015 + Moose::Meta::Method::Accessor::Native::Array::natatime 2.2015 + Moose::Meta::Method::Accessor::Native::Array::pop 2.2015 + Moose::Meta::Method::Accessor::Native::Array::push 2.2015 + Moose::Meta::Method::Accessor::Native::Array::reduce 2.2015 + Moose::Meta::Method::Accessor::Native::Array::set 2.2015 + Moose::Meta::Method::Accessor::Native::Array::shallow_clone 2.2015 + Moose::Meta::Method::Accessor::Native::Array::shift 2.2015 + Moose::Meta::Method::Accessor::Native::Array::shuffle 2.2015 + Moose::Meta::Method::Accessor::Native::Array::sort 2.2015 + Moose::Meta::Method::Accessor::Native::Array::sort_in_place 2.2015 + Moose::Meta::Method::Accessor::Native::Array::splice 2.2015 + Moose::Meta::Method::Accessor::Native::Array::uniq 2.2015 + Moose::Meta::Method::Accessor::Native::Array::unshift 2.2015 + Moose::Meta::Method::Accessor::Native::Bool::not 2.2015 + Moose::Meta::Method::Accessor::Native::Bool::set 2.2015 + Moose::Meta::Method::Accessor::Native::Bool::toggle 2.2015 + Moose::Meta::Method::Accessor::Native::Bool::unset 2.2015 + Moose::Meta::Method::Accessor::Native::Code::execute 2.2015 + Moose::Meta::Method::Accessor::Native::Code::execute_method 2.2015 + Moose::Meta::Method::Accessor::Native::Collection 2.2015 + Moose::Meta::Method::Accessor::Native::Counter::Writer 2.2015 + Moose::Meta::Method::Accessor::Native::Counter::dec 2.2015 + Moose::Meta::Method::Accessor::Native::Counter::inc 2.2015 + Moose::Meta::Method::Accessor::Native::Counter::reset 2.2015 + Moose::Meta::Method::Accessor::Native::Counter::set 2.2015 + Moose::Meta::Method::Accessor::Native::Hash 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::Writer 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::accessor 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::clear 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::count 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::defined 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::delete 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::elements 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::exists 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::get 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::is_empty 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::keys 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::kv 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::set 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::shallow_clone 2.2015 + Moose::Meta::Method::Accessor::Native::Hash::values 2.2015 + Moose::Meta::Method::Accessor::Native::Number::abs 2.2015 + Moose::Meta::Method::Accessor::Native::Number::add 2.2015 + Moose::Meta::Method::Accessor::Native::Number::div 2.2015 + Moose::Meta::Method::Accessor::Native::Number::mod 2.2015 + Moose::Meta::Method::Accessor::Native::Number::mul 2.2015 + Moose::Meta::Method::Accessor::Native::Number::set 2.2015 + Moose::Meta::Method::Accessor::Native::Number::sub 2.2015 + Moose::Meta::Method::Accessor::Native::Reader 2.2015 + Moose::Meta::Method::Accessor::Native::String::append 2.2015 + Moose::Meta::Method::Accessor::Native::String::chomp 2.2015 + Moose::Meta::Method::Accessor::Native::String::chop 2.2015 + Moose::Meta::Method::Accessor::Native::String::clear 2.2015 + Moose::Meta::Method::Accessor::Native::String::inc 2.2015 + Moose::Meta::Method::Accessor::Native::String::length 2.2015 + Moose::Meta::Method::Accessor::Native::String::match 2.2015 + Moose::Meta::Method::Accessor::Native::String::prepend 2.2015 + Moose::Meta::Method::Accessor::Native::String::replace 2.2015 + Moose::Meta::Method::Accessor::Native::String::substr 2.2015 + Moose::Meta::Method::Accessor::Native::Writer 2.2015 + Moose::Meta::Method::Augmented 2.2015 + Moose::Meta::Method::Constructor 2.2015 + Moose::Meta::Method::Delegation 2.2015 + Moose::Meta::Method::Destructor 2.2015 + Moose::Meta::Method::Meta 2.2015 + Moose::Meta::Method::Overridden 2.2015 + Moose::Meta::Mixin::AttributeCore 2.2015 + Moose::Meta::Object::Trait 2.2015 + Moose::Meta::Role 2.2015 + Moose::Meta::Role::Application 2.2015 + Moose::Meta::Role::Application::RoleSummation 2.2015 + Moose::Meta::Role::Application::ToClass 2.2015 + Moose::Meta::Role::Application::ToInstance 2.2015 + Moose::Meta::Role::Application::ToRole 2.2015 + Moose::Meta::Role::Attribute 2.2015 + Moose::Meta::Role::Composite 2.2015 + Moose::Meta::Role::Method 2.2015 + Moose::Meta::Role::Method::Conflicting 2.2015 + Moose::Meta::Role::Method::Required 2.2015 + Moose::Meta::TypeCoercion 2.2015 + Moose::Meta::TypeCoercion::Union 2.2015 + Moose::Meta::TypeConstraint 2.2015 + Moose::Meta::TypeConstraint::Class 2.2015 + Moose::Meta::TypeConstraint::DuckType 2.2015 + Moose::Meta::TypeConstraint::Enum 2.2015 + Moose::Meta::TypeConstraint::Parameterizable 2.2015 + Moose::Meta::TypeConstraint::Parameterized 2.2015 + Moose::Meta::TypeConstraint::Registry 2.2015 + Moose::Meta::TypeConstraint::Role 2.2015 + Moose::Meta::TypeConstraint::Union 2.2015 + Moose::Object 2.2015 + Moose::Role 2.2015 + Moose::Spec::Role 2.2015 + Moose::Unsweetened 2.2015 + Moose::Util 2.2015 + Moose::Util::MetaRole 2.2015 + Moose::Util::TypeConstraints 2.2015 + Moose::Util::TypeConstraints::Builtins 2.2015 + Test::Moose 2.2015 + metaclass 2.2015 + oose 2.2015 requirements: Carp 1.22 Class::Load 0.09 Class::Load::XS 0.01 Data::OptList 0.107 Devel::GlobalDestruction 0 - Devel::OverloadInfo 0.004 - Devel::StackTrace 1.33 + Devel::OverloadInfo 0.005 + Devel::StackTrace 2.03 Dist::CheckConflicts 0.02 Eval::Closure 0.04 ExtUtils::MakeMaker 0 - List::Util 1.45 + List::Util 1.56 MRO::Compat 0.05 Module::Runtime 0.014 Module::Runtime::Conflicts 0.002 @@ -5219,7 +5112,6 @@ DISTRIBUTIONS Params::Util 1.00 Scalar::Util 1.19 Sub::Exporter 0.980 - Sub::Identify 0 Sub::Name 0.20 Try::Tiny 0.17 parent 0.223 @@ -5552,10 +5444,10 @@ DISTRIBUTIONS Scalar::Util 1.14 XSLoader 0.02 perl 5.008005 - Mozilla-CA-20160104 - pathname: A/AB/ABH/Mozilla-CA-20160104.tar.gz + Mozilla-CA-20200520 + pathname: A/AB/ABH/Mozilla-CA-20200520.tar.gz provides: - Mozilla::CA 20160104 + Mozilla::CA 20200520 requirements: ExtUtils::MakeMaker 0 Test 0 @@ -5690,10 +5582,10 @@ DISTRIBUTIONS Test::More 0.98 parent 0 perl 5.008008 - Net-Fastly-1.09 - pathname: F/FA/FASTLY/Net-Fastly-1.09.tar.gz + Net-Fastly-1.12 + pathname: F/FA/FASTLY/Net-Fastly-1.12.tar.gz provides: - Net::Fastly 1.09 + Net::Fastly 1.12 Net::Fastly::Backend undef Net::Fastly::BelongsToServiceAndVersion undef Net::Fastly::Client undef @@ -5729,13 +5621,13 @@ DISTRIBUTIONS URI 0 URI::Escape 0 YAML 0 - Net-HTTP-6.17 - pathname: O/OA/OALDERS/Net-HTTP-6.17.tar.gz + Net-HTTP-6.21 + pathname: O/OA/OALDERS/Net-HTTP-6.21.tar.gz provides: - Net::HTTP 6.17 - Net::HTTP::Methods 6.17 - Net::HTTP::NB 6.17 - Net::HTTPS 6.17 + Net::HTTP 6.21 + Net::HTTP::Methods 6.21 + Net::HTTP::NB 6.21 + Net::HTTPS 6.21 requirements: Carp 0 Compress::Raw::Zlib 0 @@ -5746,7 +5638,6 @@ DISTRIBUTIONS base 0 perl 5.006002 strict 0 - vars 0 warnings 0 Net-OAuth-0.28 pathname: K/KG/KGRENNAN/Net-OAuth-0.28.tar.gz @@ -5786,63 +5677,6 @@ DISTRIBUTIONS Test::More 0.66 Test::Warn 0.21 URI::Escape 3.28 - Net-OpenID-Common-1.20 - pathname: W/WR/WROG/Net-OpenID-Common-1.20.tar.gz - provides: - Net::OpenID::Common 1.20 - Net::OpenID::Extension 1.20 - Net::OpenID::Extension::SimpleRegistration 1.20 - Net::OpenID::Extension::SimpleRegistration::Request 1.20 - Net::OpenID::Extension::SimpleRegistration::Response 1.20 - Net::OpenID::ExtensionMessage 1.20 - Net::OpenID::IndirectMessage 1.20 - Net::OpenID::URIFetch 1.20 - Net::OpenID::URIFetch::Response 1.20 - Net::OpenID::Yadis 1.20 - Net::OpenID::Yadis::Service 1.20 - OpenID::util 1.20 - requirements: - Crypt::DH::GMP 0.00011 - Encode 0 - ExtUtils::MakeMaker 0 - HTML::Parser 3.40 - HTTP::Headers::Util 0 - HTTP::Message 5.814 - HTTP::Request 0 - HTTP::Status 0 - MIME::Base64 0 - Math::BigInt 0 - Time::Local 0 - XML::Simple 0 - Net-OpenID-Consumer-1.18 - pathname: W/WR/WROG/Net-OpenID-Consumer-1.18.tar.gz - provides: - Net::OpenID::Association 1.18 - Net::OpenID::ClaimedIdentity 1.18 - Net::OpenID::Consumer 1.18 - Net::OpenID::VerifiedIdentity 1.18 - requirements: - Digest::SHA 0 - ExtUtils::MakeMaker 0 - HTTP::Request 0 - JSON 0 - LWP::UserAgent 0 - MIME::Base64 0 - Net::OpenID::Common 1.19 - Storable 0 - Time::Local 0 - URI 0 - Net-OpenID-Server-1.09 - pathname: R/RO/ROBN/Net-OpenID-Server-1.09.tar.gz - provides: - Net::OpenID::Server 1.09 - requirements: - Digest::SHA 0 - ExtUtils::MakeMaker 6.31 - MIME::Base64 0 - Net::OpenID::Common 1.11 - Test::More 0 - URI 0 Net-SSLeay-1.82 pathname: M/MI/MIKEM/Net-SSLeay-1.82.tar.gz provides: @@ -5887,37 +5721,37 @@ DISTRIBUTIONS POSIX 0 Socket 0 Time::HiRes 0 - Net-Twitter-4.01042 - pathname: M/MM/MMIMS/Net-Twitter-4.01042.tar.gz - provides: - Net::Identica 4.01042 - Net::Twitter 4.01042 - Net::Twitter::API 4.01042 - Net::Twitter::Core 4.01042 - Net::Twitter::Error 4.01042 - Net::Twitter::Meta::Method 4.01042 - Net::Twitter::OAuth 4.01042 - Net::Twitter::Role::API::Lists 4.01042 - Net::Twitter::Role::API::REST 4.01042 - Net::Twitter::Role::API::RESTv1_1 4.01042 - Net::Twitter::Role::API::Search 4.01042 - Net::Twitter::Role::API::Search::Trends 4.01042 - Net::Twitter::Role::API::TwitterVision 4.01042 - Net::Twitter::Role::API::Upload 4.01042 - Net::Twitter::Role::API::UploadMedia 4.01042 - Net::Twitter::Role::AppAuth 4.01042 - Net::Twitter::Role::AutoCursor 4.01042 - Net::Twitter::Role::InflateObjects 4.01042 - Net::Twitter::Role::Legacy 4.01042 - Net::Twitter::Role::OAuth 4.01042 - Net::Twitter::Role::RateLimit 4.01042 - Net::Twitter::Role::RetryOnError 4.01042 - Net::Twitter::Role::SimulateCursors 4.01042 - Net::Twitter::Role::WrapError 4.01042 - Net::Twitter::Role::WrapResult 4.01042 - Net::Twitter::Search 4.01042 - Net::Twitter::Types 4.01042 - Net::Twitter::WrappedResult 4.01042 + Net-Twitter-4.01043 + pathname: M/MM/MMIMS/Net-Twitter-4.01043.tar.gz + provides: + Net::Identica 4.01043 + Net::Twitter 4.01043 + Net::Twitter::API 4.01043 + Net::Twitter::Core 4.01043 + Net::Twitter::Error 4.01043 + Net::Twitter::Meta::Method 4.01043 + Net::Twitter::OAuth 4.01043 + Net::Twitter::Role::API::Lists 4.01043 + Net::Twitter::Role::API::REST 4.01043 + Net::Twitter::Role::API::RESTv1_1 4.01043 + Net::Twitter::Role::API::Search 4.01043 + Net::Twitter::Role::API::Search::Trends 4.01043 + Net::Twitter::Role::API::TwitterVision 4.01043 + Net::Twitter::Role::API::Upload 4.01043 + Net::Twitter::Role::API::UploadMedia 4.01043 + Net::Twitter::Role::AppAuth 4.01043 + Net::Twitter::Role::AutoCursor 4.01043 + Net::Twitter::Role::InflateObjects 4.01043 + Net::Twitter::Role::Legacy 4.01043 + Net::Twitter::Role::OAuth 4.01043 + Net::Twitter::Role::RateLimit 4.01043 + Net::Twitter::Role::RetryOnError 4.01043 + Net::Twitter::Role::SimulateCursors 4.01043 + Net::Twitter::Role::WrapError 4.01043 + Net::Twitter::Role::WrapResult 4.01043 + Net::Twitter::Search 4.01043 + Net::Twitter::Types 4.01043 + Net::Twitter::WrappedResult 4.01043 requirements: Carp::Clan 0 Class::Load 0 @@ -5969,10 +5803,10 @@ DISTRIBUTIONS Storable 2.11 Test::More 0.47 perl 5.005 - OrePAN2-0.46 - pathname: O/OA/OALDERS/OrePAN2-0.46.tar.gz + OrePAN2-0.48 + pathname: O/OA/OALDERS/OrePAN2-0.48.tar.gz provides: - OrePAN2 0.46 + OrePAN2 0.48 OrePAN2::Auditor undef OrePAN2::CLI::Indexer undef OrePAN2::CLI::Inject undef @@ -5983,10 +5817,11 @@ DISTRIBUTIONS OrePAN2::Repository::Cache undef requirements: Archive::Extract 0.72 - Archive::Tar 0 + Archive::Tar 1.46 CPAN::Meta 2.13156 Class::Accessor::Lite 0.05 Digest::MD5 0 + ExtUtils::MakeMaker 7.06 File::Path 0 File::Temp 0 File::pushd 0 @@ -6004,7 +5839,7 @@ DISTRIBUTIONS Moo 1.007000 MooX::Options 0 Parse::CPAN::Meta 1.4414 - Parse::CPAN::Packages 2.39 + Parse::CPAN::Packages::Fast 0.09 Parse::LocalDistribution 0.14 Parse::PMFile 0.29 Path::Tiny 0 @@ -6014,6 +5849,7 @@ DISTRIBUTIONS Type::Params 0 Types::URI 0 autodie 0 + feature 0 parent 0 perl 5.008005 version 0.9912 @@ -6363,12 +6199,12 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Params-ValidationCompiler-0.24 - pathname: D/DR/DROLSKY/Params-ValidationCompiler-0.24.tar.gz + Params-ValidationCompiler-0.30 + pathname: D/DR/DROLSKY/Params-ValidationCompiler-0.30.tar.gz provides: - Params::ValidationCompiler 0.24 - Params::ValidationCompiler::Compiler 0.24 - Params::ValidationCompiler::Exceptions 0.24 + Params::ValidationCompiler 0.30 + Params::ValidationCompiler::Compiler 0.30 + Params::ValidationCompiler::Exceptions 0.30 requirements: B 0 Carp 0 @@ -6821,68 +6657,75 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Pithub-0.01033 - pathname: O/OA/OALDERS/Pithub-0.01033.tar.gz - provides: - Pithub 0.01033 - Pithub::Base 0.01033 - Pithub::Events 0.01033 - Pithub::Gists 0.01033 - Pithub::Gists::Comments 0.01033 - Pithub::GitData 0.01033 - Pithub::GitData::Blobs 0.01033 - Pithub::GitData::Commits 0.01033 - Pithub::GitData::References 0.01033 - Pithub::GitData::Tags 0.01033 - Pithub::GitData::Trees 0.01033 - Pithub::Issues 0.01033 - Pithub::Issues::Assignees 0.01033 - Pithub::Issues::Comments 0.01033 - Pithub::Issues::Events 0.01033 - Pithub::Issues::Labels 0.01033 - Pithub::Issues::Milestones 0.01033 - Pithub::Orgs 0.01033 - Pithub::Orgs::Members 0.01033 - Pithub::Orgs::Teams 0.01033 - Pithub::PullRequests 0.01033 - Pithub::PullRequests::Comments 0.01033 - Pithub::Repos 0.01033 - Pithub::Repos::Collaborators 0.01033 - Pithub::Repos::Commits 0.01033 - Pithub::Repos::Contents 0.01033 - Pithub::Repos::Downloads 0.01033 - Pithub::Repos::Forks 0.01033 - Pithub::Repos::Hooks 0.01033 - Pithub::Repos::Keys 0.01033 - Pithub::Repos::Releases 0.01033 - Pithub::Repos::Releases::Assets 0.01033 - Pithub::Repos::Starring 0.01033 - Pithub::Repos::Stats 0.01033 - Pithub::Repos::Statuses 0.01033 - Pithub::Repos::Watching 0.01033 - Pithub::Result 0.01033 - Pithub::Result::SharedCache 0.01033 - Pithub::Search 0.01033 - Pithub::SearchV3 0.01033 - Pithub::Users 0.01033 - Pithub::Users::Emails 0.01033 - Pithub::Users::Followers 0.01033 - Pithub::Users::Keys 0.01033 + Pithub-0.01036 + pathname: O/OA/OALDERS/Pithub-0.01036.tar.gz + provides: + Pithub 0.01036 + Pithub::Base 0.01036 + Pithub::Events 0.01036 + Pithub::Gists 0.01036 + Pithub::Gists::Comments 0.01036 + Pithub::GitData 0.01036 + Pithub::GitData::Blobs 0.01036 + Pithub::GitData::Commits 0.01036 + Pithub::GitData::References 0.01036 + Pithub::GitData::Tags 0.01036 + Pithub::GitData::Trees 0.01036 + Pithub::Issues 0.01036 + Pithub::Issues::Assignees 0.01036 + Pithub::Issues::Comments 0.01036 + Pithub::Issues::Events 0.01036 + Pithub::Issues::Labels 0.01036 + Pithub::Issues::Milestones 0.01036 + Pithub::Markdown 0.01036 + Pithub::Orgs 0.01036 + Pithub::Orgs::Members 0.01036 + Pithub::Orgs::Teams 0.01036 + Pithub::PullRequests 0.01036 + Pithub::PullRequests::Comments 0.01036 + Pithub::PullRequests::Reviewers 0.01036 + Pithub::Repos 0.01036 + Pithub::Repos::Collaborators 0.01036 + Pithub::Repos::Commits 0.01036 + Pithub::Repos::Contents 0.01036 + Pithub::Repos::Downloads 0.01036 + Pithub::Repos::Forks 0.01036 + Pithub::Repos::Hooks 0.01036 + Pithub::Repos::Keys 0.01036 + Pithub::Repos::Releases 0.01036 + Pithub::Repos::Releases::Assets 0.01036 + Pithub::Repos::Starring 0.01036 + Pithub::Repos::Stats 0.01036 + Pithub::Repos::Statuses 0.01036 + Pithub::Repos::Watching 0.01036 + Pithub::Result 0.01036 + Pithub::Result::SharedCache 0.01036 + Pithub::Search 0.01036 + Pithub::SearchV3 0.01036 + Pithub::Users 0.01036 + Pithub::Users::Emails 0.01036 + Pithub::Users::Followers 0.01036 + Pithub::Users::Keys 0.01036 requirements: Array::Iterator 0 - Cache::LRU 0.04 + Cache::LRU 0 + Carp 0 ExtUtils::MakeMaker 0 - HTTP::Message 0 - JSON::MaybeXS 1.003003 - LWP::Protocol::https 0 + HTTP::Headers 0 + HTTP::Request 0 + HTTP::Request::Common 0 + JSON::MaybeXS 0 LWP::UserAgent 0 - Moo 1.001000 - Plack-1.0044 - pathname: M/MI/MIYAGAWA/Plack-1.0044.tar.gz + Moo 0 + Moo::Role 0 + URI 0 + perl 5.010 + Plack-1.0048 + pathname: M/MI/MIYAGAWA/Plack-1.0048.tar.gz provides: HTTP::Message::PSGI undef HTTP::Server::PSGI undef - Plack 1.0044 + Plack 1.0048 Plack::App::CGIBin undef Plack::App::Cascade undef Plack::App::Directory undef @@ -6941,9 +6784,9 @@ DISTRIBUTIONS Plack::Middleware::XFramework undef Plack::Middleware::XSendfile undef Plack::Recursive::ForwardRequest undef - Plack::Request 1.0044 + Plack::Request 1.0048 Plack::Request::Upload undef - Plack::Response 1.0044 + Plack::Response 1.0048 Plack::Runner undef Plack::TempBuffer undef Plack::Test undef @@ -6963,7 +6806,7 @@ DISTRIBUTIONS File::ShareDir 1.00 File::ShareDir::Install 0.06 Filesys::Notify::Simple 0 - HTTP::Entity::Parser 0.17 + HTTP::Entity::Parser 0.25 HTTP::Headers::Fast 0.18 HTTP::Message 5.814 HTTP::Tiny 0.034 @@ -7340,13 +7183,13 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Scalar::Util 0 perl 5.006 - Scalar-List-Utils-1.55 - pathname: P/PE/PEVANS/Scalar-List-Utils-1.55.tar.gz + Scalar-List-Utils-1.56 + pathname: P/PE/PEVANS/Scalar-List-Utils-1.56.tar.gz provides: - List::Util 1.55 - List::Util::XS 1.55 - Scalar::Util 1.55 - Sub::Util 1.55 + List::Util 1.56 + List::Util::XS 1.56 + Scalar::Util 1.56 + Sub::Util 1.56 requirements: ExtUtils::MakeMaker 0 perl 5.006 @@ -7879,17 +7722,6 @@ DISTRIBUTIONS Try::Tiny 0.07 strict 0 warnings 0 - Test-HTTP-Server-Simple-0.11 - pathname: A/AL/ALEXMV/Test-HTTP-Server-Simple-0.11.tar.gz - provides: - Test::HTTP::Server::Simple 0.11 - requirements: - ExtUtils::MakeMaker 0 - HTTP::Server::Simple 0 - NEXT 0 - Test::Builder 0 - Test::Builder::Tester 1.04 - Test::More 0 Test-InDistDir-1.112071 pathname: M/MI/MITHALDU/Test-InDistDir-1.112071.tar.gz provides: @@ -7946,30 +7778,6 @@ DISTRIBUTIONS Test::Builder::Tester 1.02 Test::More 0.42 overload 0 - Test-OpenID-Consumer-0.03 - pathname: T/TS/TSIBLEY/Test-OpenID-Consumer-0.03.tar.gz - provides: - Test::OpenID::Consumer 0.03 - requirements: - Cache::FileCache 0 - ExtUtils::MakeMaker 6.36 - HTTP::Server::Simple 0 - LWP::UserAgent::Paranoid 0.97 - Net::OpenID::Consumer 0 - Test::Builder 0 - Test::HTTP::Server::Simple 0 - Test-OpenID-Server-0.03 - pathname: T/TS/TSIBLEY/Test-OpenID-Server-0.03.tar.gz - provides: - Test::OpenID::Server 0.03 - requirements: - ExtUtils::MakeMaker 6.36 - HTTP::Server::Simple 0 - Net::OpenID::Server 0 - Test::HTTP::Server::Simple 0 - Test::OpenID::Consumer 0 - Test::WWW::Mechanize 0 - Test::Warnings 0.009 Test-Perl-Critic-1.03 pathname: T/TH/THALJEF/Test-Perl-Critic-1.03.tar.gz provides: @@ -8052,84 +7860,6 @@ DISTRIBUTIONS Test::Builder::Module 0 Test::More 0.88 perl 5.008_001 - Test-Simple-1.302175 - pathname: E/EX/EXODIST/Test-Simple-1.302175.tar.gz - provides: - Test2 1.302175 - Test2::API 1.302175 - Test2::API::Breakage 1.302175 - Test2::API::Context 1.302175 - Test2::API::Instance 1.302175 - Test2::API::Stack 1.302175 - Test2::Event 1.302175 - Test2::Event::Bail 1.302175 - Test2::Event::Diag 1.302175 - Test2::Event::Encoding 1.302175 - Test2::Event::Exception 1.302175 - Test2::Event::Fail 1.302175 - Test2::Event::Generic 1.302175 - Test2::Event::Note 1.302175 - Test2::Event::Ok 1.302175 - Test2::Event::Pass 1.302175 - Test2::Event::Plan 1.302175 - Test2::Event::Skip 1.302175 - Test2::Event::Subtest 1.302175 - Test2::Event::TAP::Version 1.302175 - Test2::Event::V2 1.302175 - Test2::Event::Waiting 1.302175 - Test2::EventFacet 1.302175 - Test2::EventFacet::About 1.302175 - Test2::EventFacet::Amnesty 1.302175 - Test2::EventFacet::Assert 1.302175 - Test2::EventFacet::Control 1.302175 - Test2::EventFacet::Error 1.302175 - Test2::EventFacet::Hub 1.302175 - Test2::EventFacet::Info 1.302175 - Test2::EventFacet::Info::Table 1.302175 - Test2::EventFacet::Meta 1.302175 - Test2::EventFacet::Parent 1.302175 - Test2::EventFacet::Plan 1.302175 - Test2::EventFacet::Render 1.302175 - Test2::EventFacet::Trace 1.302175 - Test2::Formatter 1.302175 - Test2::Formatter::TAP 1.302175 - Test2::Hub 1.302175 - Test2::Hub::Interceptor 1.302175 - Test2::Hub::Interceptor::Terminator 1.302175 - Test2::Hub::Subtest 1.302175 - Test2::IPC 1.302175 - Test2::IPC::Driver 1.302175 - Test2::IPC::Driver::Files 1.302175 - Test2::Tools::Tiny 1.302175 - Test2::Util 1.302175 - Test2::Util::ExternalMeta 1.302175 - Test2::Util::Facets2Legacy 1.302175 - Test2::Util::HashBase 1.302175 - Test2::Util::Trace 1.302175 - Test::Builder 1.302175 - Test::Builder::Formatter 1.302175 - Test::Builder::IO::Scalar 2.114 - Test::Builder::Module 1.302175 - Test::Builder::Tester 1.302175 - Test::Builder::Tester::Color 1.302175 - Test::Builder::Tester::Tie 1.302175 - Test::Builder::TodoDiag 1.302175 - Test::More 1.302175 - Test::Simple 1.302175 - Test::Tester 1.302175 - Test::Tester::Capture 1.302175 - Test::Tester::CaptureRunner 1.302175 - Test::Tester::Delegate 1.302175 - Test::use::ok 1.302175 - ok 1.302175 - requirements: - ExtUtils::MakeMaker 0 - File::Spec 0 - File::Temp 0 - Scalar::Util 1.13 - Storable 0 - perl 5.006002 - utf8 0 Test-SubCalls-1.09 pathname: A/AD/ADAMK/Test-SubCalls-1.09.tar.gz provides: @@ -8154,16 +7884,15 @@ DISTRIBUTIONS Test::SharedFork 0.29 Time::HiRes 0 perl 5.008001 - Test-Vars-0.014 - pathname: D/DR/DROLSKY/Test-Vars-0.014.tar.gz + Test-Vars-0.015 + pathname: G/GF/GFUJI/Test-Vars-0.015.tar.gz provides: - Test::Vars 0.014 + Test::Vars 0.015 requirements: B 0 ExtUtils::MakeMaker 6.59 List::Util 1.33 Module::Build::Tiny 0.035 - Test::More 0.88 parent 0 perl 5.010000 Test-WWW-Mechanize-1.48 @@ -8211,19 +7940,6 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Test-Warnings-0.026 - pathname: E/ET/ETHER/Test-Warnings-0.026.tar.gz - provides: - Test::Warnings 0.026 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - Test::Builder 0 - parent 0 - perl 5.006 - strict 0 - warnings 0 Text-CSV_XS-1.34 pathname: H/HM/HMBRAND/Text-CSV_XS-1.34.tgz provides: @@ -8528,52 +8244,53 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-1.72 - pathname: E/ET/ETHER/URI-1.72.tar.gz - provides: - URI 1.72 - URI::Escape 3.31 - URI::Heuristic 4.20 - URI::IRI 1.72 - URI::QueryParam 1.72 - URI::Split 1.72 - URI::URL 5.04 - URI::WithBase 2.20 - URI::data 1.72 - URI::file 4.21 - URI::file::Base 1.72 - URI::file::FAT 1.72 - URI::file::Mac 1.72 - URI::file::OS2 1.72 - URI::file::QNX 1.72 - URI::file::Unix 1.72 - URI::file::Win32 1.72 - URI::ftp 1.72 - URI::gopher 1.72 - URI::http 1.72 - URI::https 1.72 - URI::ldap 1.72 - URI::ldapi 1.72 - URI::ldaps 1.72 - URI::mailto 1.72 - URI::mms 1.72 - URI::news 1.72 - URI::nntp 1.72 - URI::pop 1.72 - URI::rlogin 1.72 - URI::rsync 1.72 - URI::rtsp 1.72 - URI::rtspu 1.72 - URI::sftp 1.72 - URI::sip 1.72 - URI::sips 1.72 - URI::snews 1.72 - URI::ssh 1.72 - URI::telnet 1.72 - URI::tn3270 1.72 - URI::urn 1.72 - URI::urn::isbn 1.72 - URI::urn::oid 1.72 + URI-5.09 + pathname: O/OA/OALDERS/URI-5.09.tar.gz + provides: + URI 5.09 + URI::Escape 5.09 + URI::Heuristic 5.09 + URI::IRI 5.09 + URI::QueryParam 5.09 + URI::Split 5.09 + URI::URL 5.09 + URI::WithBase 5.09 + URI::data 5.09 + URI::file 5.09 + URI::file::Base 5.09 + URI::file::FAT 5.09 + URI::file::Mac 5.09 + URI::file::OS2 5.09 + URI::file::QNX 5.09 + URI::file::Unix 5.09 + URI::file::Win32 5.09 + URI::ftp 5.09 + URI::gopher 5.09 + URI::http 5.09 + URI::https 5.09 + URI::ldap 5.09 + URI::ldapi 5.09 + URI::ldaps 5.09 + URI::mailto 5.09 + URI::mms 5.09 + URI::news 5.09 + URI::nntp 5.09 + URI::nntps 5.09 + URI::pop 5.09 + URI::rlogin 5.09 + URI::rsync 5.09 + URI::rtsp 5.09 + URI::rtspu 5.09 + URI::sftp 5.09 + URI::sip 5.09 + URI::sips 5.09 + URI::snews 5.09 + URI::ssh 5.09 + URI::telnet 5.09 + URI::tn3270 5.09 + URI::urn 5.09 + URI::urn::isbn 5.09 + URI::urn::oid 5.09 requirements: Carp 0 Cwd 0 @@ -8875,13 +8592,6 @@ DISTRIBUTIONS XML::SAX 0.15 XML::SAX::Expat 0 perl 5.008 - XSLoader-0.24 - pathname: S/SA/SAPER/XSLoader-0.24.tar.gz - provides: - XSLoader 0.24 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0.47 YAML-1.24 pathname: T/TI/TINITA/YAML-1.24.tar.gz provides: @@ -8910,11 +8620,11 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - YAML-LibYAML-0.75 - pathname: T/TI/TINITA/YAML-LibYAML-0.75.tar.gz + YAML-LibYAML-0.83 + pathname: T/TI/TINITA/YAML-LibYAML-0.83.tar.gz provides: - YAML::LibYAML 0.75 - YAML::XS 0.75 + YAML::LibYAML 0.83 + YAML::XS 0.83 YAML::XS::LibYAML undef requirements: ExtUtils::MakeMaker 0 @@ -8968,79 +8678,35 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libnet-3.11 - pathname: S/SH/SHAY/libnet-3.11.tar.gz - provides: - Net undef - Net::Cmd 3.11 - Net::Config 3.11 - Net::Domain 3.11 - Net::FTP 3.11 - Net::FTP::A 3.11 - Net::FTP::E 3.11 - Net::FTP::I 3.11 - Net::FTP::L 3.11 - Net::FTP::_SSL_SingleSessionCache 3.11 - Net::FTP::dataconn 3.11 - Net::NNTP 3.11 - Net::NNTP::_SSL 3.11 - Net::Netrc 3.11 - Net::POP3 3.11 - Net::POP3::_SSL 3.11 - Net::SMTP 3.11 - Net::SMTP::_SSL 3.11 - Net::Time 3.11 - requirements: - Carp 0 - Errno 0 - Exporter 0 - ExtUtils::MakeMaker 6.64 - Fcntl 0 - File::Basename 0 - FileHandle 0 - Getopt::Std 0 - IO::File 0 - IO::Select 0 - IO::Socket 1.05 - POSIX 0 - Socket 2.016 - Symbol 0 - Time::Local 0 - constant 0 - perl 5.008001 - strict 0 - utf8 0 - vars 0 - warnings 0 - libwww-perl-6.29 - pathname: O/OA/OALDERS/libwww-perl-6.29.tar.gz - provides: - LWP 6.29 - LWP::Authen::Basic 6.29 - LWP::Authen::Digest 6.29 - LWP::Authen::Ntlm 6.29 - LWP::ConnCache 6.29 - LWP::Debug 6.29 - LWP::Debug::TraceHTTP 6.29 - LWP::DebugFile 6.29 - LWP::MemberMixin 6.29 - LWP::Protocol 6.29 - LWP::Protocol::MyFTP 6.29 - LWP::Protocol::cpan 6.29 - LWP::Protocol::data 6.29 - LWP::Protocol::file 6.29 - LWP::Protocol::ftp 6.29 - LWP::Protocol::gopher 6.29 - LWP::Protocol::http 6.29 - LWP::Protocol::loopback 6.29 - LWP::Protocol::mailto 6.29 - LWP::Protocol::nntp 6.29 - LWP::Protocol::nogo 6.29 - LWP::RobotUA 6.29 - LWP::Simple 6.29 - LWP::UserAgent 6.29 + libwww-perl-6.55 + pathname: O/OA/OALDERS/libwww-perl-6.55.tar.gz + provides: + LWP 6.55 + LWP::Authen::Basic 6.55 + LWP::Authen::Digest 6.55 + LWP::Authen::Ntlm 6.55 + LWP::ConnCache 6.55 + LWP::Debug 6.55 + LWP::Debug::TraceHTTP 6.55 + LWP::DebugFile 6.55 + LWP::MemberMixin 6.55 + LWP::Protocol 6.55 + LWP::Protocol::cpan 6.55 + LWP::Protocol::data 6.55 + LWP::Protocol::file 6.55 + LWP::Protocol::ftp 6.55 + LWP::Protocol::gopher 6.55 + LWP::Protocol::http 6.55 + LWP::Protocol::loopback 6.55 + LWP::Protocol::mailto 6.55 + LWP::Protocol::nntp 6.55 + LWP::Protocol::nogo 6.55 + LWP::RobotUA 6.55 + LWP::Simple 6.55 + LWP::UserAgent 6.55 libwww::perl undef requirements: + CPAN::Meta::Requirements 2.120620 Digest::MD5 0 Encode 2.12 Encode::Locale 0 @@ -9051,19 +8717,19 @@ DISTRIBUTIONS HTML::Entities 0 HTML::HeadParser 0 HTTP::Cookies 6 - HTTP::Daemon 6 HTTP::Date 6 HTTP::Negotiate 6 HTTP::Request 6 HTTP::Request::Common 6 HTTP::Response 6 - HTTP::Status 6 + HTTP::Status 6.07 IO::Select 0 IO::Socket 0 LWP::MediaTypes 6 MIME::Base64 2.1 + Module::Metadata 0 Net::FTP 2.58 - Net::HTTP 6.07 + Net::HTTP 6.18 Scalar::Util 0 Try::Tiny 0 URI 1.10 @@ -9120,13 +8786,3 @@ DISTRIBUTIONS indirect 0 multidimensional 0 perl 5.006 - version-0.9924 - pathname: J/JP/JPEACOCK/version-0.9924.tar.gz - provides: - version 0.9924 - version::regex 0.9924 - version::vpp 0.9924 - version::vxs 0.9924 - requirements: - ExtUtils::MakeMaker 0 - perl 5.006002 From 0f5c14d72543a5286912b0ee8686c2c17d210079 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 9 Jul 2021 15:48:10 -0400 Subject: [PATCH 146/725] Fix exception thrown when we try to find reverse deps on an unauthorized module In this case a search for /v1/reverse_dependencies/dist/Math-Calc-Units returned a 500 The reason is that this module is marked as latest, but also not marked as authorized, presumably because it includes Parse::Yapp::Driver. So, it does not meet the conditions of the query as set in MetaCPAN::Query::Release::_get_latest_release(). _get_latest_release() was assuming success and returning a hashref with no name and author rather than returning false. Because we did not short-circuit here, a later query failed with "No value specified for term query". This will now return a 404: { "code" : 404, "message" : "The requested info could not be found" } --- lib/MetaCPAN/Query/Release.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 7e612af39..563da8f11 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -758,10 +758,12 @@ sub _get_latest_release { my ($release_info) = map { $_->{fields} } @{ $release->{hits}{hits} }; single_valued_arrayref_to_scalar($release_info); - return +{ + return $release_info->{name} && $release_info->{author} + ? +{ name => $release_info->{name}, author => $release_info->{author}, - }; + } + : undef; } sub _get_provided_modules { From 5df07cfa4c40d66a17f0099ef0010e17d6f52c20 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 9 Jul 2021 16:54:17 -0400 Subject: [PATCH 147/725] Add more reverse dependency tests --- t/model/release/reverse_dependencies.t | 11 +++++++++-- t/query/release.t | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 t/query/release.t diff --git a/t/model/release/reverse_dependencies.t b/t/model/release/reverse_dependencies.t index 170663d47..ffcd118ad 100644 --- a/t/model/release/reverse_dependencies.t +++ b/t/model/release/reverse_dependencies.t @@ -7,7 +7,7 @@ use Test::More; my $c = 'MetaCPAN::Server'; -subtest 'reverse_dependencies' => sub { +subtest 'distribution reverse_dependencies' => sub { my $data = [ sort { $a->[1] cmp $b->[1] } map +[ @{$_}{qw(author name)} ], @@ -27,7 +27,7 @@ subtest 'reverse_dependencies' => sub { ); }; -subtest 'reverse_dependencies' => sub { +subtest 'module reverse_dependencies' => sub { my $data = [ map +[ @{$_}{qw(author name)} ], @{ @@ -43,4 +43,11 @@ subtest 'reverse_dependencies' => sub { ); }; +subtest 'no reverse_dependencies' => sub { + my $data + = $c->model('CPAN::Release')->raw->requires('DoesNotExist')->{data}; + + is_deeply( $data, [], 'Found no reverse dependencies for module.' ); +}; + done_testing; diff --git a/t/query/release.t b/t/query/release.t new file mode 100644 index 000000000..584684982 --- /dev/null +++ b/t/query/release.t @@ -0,0 +1,20 @@ +use strict; +use warnings; + +use lib 't/lib'; + +use MetaCPAN::Query::Release (); +use MetaCPAN::Server::Test (); +use Test::More; + +my $query + = MetaCPAN::Query::Release->new( + es => MetaCPAN::Server::Test::model->es() ); + +is( $query->_get_latest_release('DoesNotExist'), + undef, '_get_latest_release returns undef when release does not exist' ); + +is( $query->reverse_dependencies('DoesNotExist'), + undef, 'reverse_dependencies returns undef when release does not exist' ); + +done_testing(); From 1499ff5ef37097a78038ea7e52b83364811ba974 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 9 Jul 2021 17:08:30 -0400 Subject: [PATCH 148/725] Ensure that _get_provided_modules() returns undef on failure --- lib/MetaCPAN/Query/Release.pm | 12 ++++++------ t/query/release.t | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 563da8f11..6fb6673d4 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -787,12 +787,12 @@ sub _get_provided_modules { } ); - return [ - map { $_->{name} } - grep { $_->{indexed} && $_->{authorized} } - map { @{ $_->{_source}{module} } } - @{ $provided_modules->{hits}{hits} } - ]; + my @modules = map { $_->{name} } + grep { $_->{indexed} && $_->{authorized} } + map { @{ $_->{_source}{module} } } + @{ $provided_modules->{hits}{hits} }; + + return @modules ? \@modules : undef; } sub _fix_sort_value { diff --git a/t/query/release.t b/t/query/release.t index 584684982..acc114005 100644 --- a/t/query/release.t +++ b/t/query/release.t @@ -17,4 +17,20 @@ is( $query->_get_latest_release('DoesNotExist'), is( $query->reverse_dependencies('DoesNotExist'), undef, 'reverse_dependencies returns undef when release does not exist' ); +is( + $query->_get_provided_modules( + { author => 'OALDERS', name => 'DOESNOTEXIST', } + ), + undef, + '_get_provided_modules returns undef when modules cannot be found' +); + +is_deeply( + $query->_get_provided_modules( + { author => 'DOY', name => 'Try-Tiny-0.21', } + ), + ['Try::Tiny'], + '_get_provided_modules returns undef when modules cannot be found' +); + done_testing(); From 8399420b0d9d3abbb13a50d93eb9696bff5667d2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 16 Jul 2021 12:20:42 +0200 Subject: [PATCH 149/725] respond to deserialization errors with json If there is an error while deserializing, it is nicer to respond with a JSON response, rather than plain text. Use a custom Deserialize action class, which puts the error into the stash where either the Serialize action class or the JSON view expects. And then skip the rest of the request. --- lib/MetaCPAN/Server/Action/Deserialize.pm | 28 +++++++++++++++ lib/MetaCPAN/Server/Controller.pm | 6 ++-- t/server/controller/bad_content.t | 42 +++++++++++++++++++++++ 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 lib/MetaCPAN/Server/Action/Deserialize.pm create mode 100644 t/server/controller/bad_content.t diff --git a/lib/MetaCPAN/Server/Action/Deserialize.pm b/lib/MetaCPAN/Server/Action/Deserialize.pm new file mode 100644 index 000000000..54a3469d9 --- /dev/null +++ b/lib/MetaCPAN/Server/Action/Deserialize.pm @@ -0,0 +1,28 @@ +package MetaCPAN::Server::Action::Deserialize; +use Moose; +extends 'Catalyst::Action::Deserialize'; +use Cpanel::JSON::XS qw(encode_json); + +around serialize_bad_request => sub { + my $orig = shift; + my $self = shift; + my ( $c, $content_type, $error ) = @_; + + $c->res->status(400); + + my $full_error + = "Content-Type $content_type had a problem with your request.\n$error"; + $full_error =~ s{ at .*? line \d+\.\n\z}{}; + + $c->stash( + { + rest => { + error => $full_error, + }, + } + ); + + return undef; +}; + +1; diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 7a3985d97..1c6ab8fa6 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -93,13 +93,13 @@ sub get : Path('') : Args(1) { ['The requested field(s) could not be found'] ); } -sub all : Path('') : Args(0) : ActionClass('Deserialize') { +sub all : Path('') : Args(0) : ActionClass('~Deserialize') { my ( $self, $c ) = @_; $c->req->params->{q} ||= '*' unless ( $c->req->data ); $c->forward('search'); } -sub search : Path('_search') : ActionClass('Deserialize') { +sub search : Path('_search') : ActionClass('~Deserialize') { my ( $self, $c ) = @_; my $req = $c->req; @@ -129,7 +129,7 @@ sub search : Path('_search') : ActionClass('Deserialize') { } or do { $self->internal_error( $c, $@ ) }; } -sub join : ActionClass('Deserialize') { +sub join : ActionClass('~Deserialize') { my ( $self, $c ) = @_; my $joins = $self->relationships; my @req_joins = $c->req->param('join'); diff --git a/t/server/controller/bad_content.t b/t/server/controller/bad_content.t new file mode 100644 index 000000000..a06a0b800 --- /dev/null +++ b/t/server/controller/bad_content.t @@ -0,0 +1,42 @@ +use strict; +use warnings; +use lib 't/lib'; + +use Cpanel::JSON::XS (); +use MetaCPAN::Server (); +use MetaCPAN::TestHelpers; +use Plack::Test; +use Test::More; +use Ref::Util qw( is_arrayref is_hashref ); + +my $app = MetaCPAN::Server->new->to_app(); +my $test = Plack::Test->create($app); + +subtest "broken body content" => sub { + my $source = q[ + { "query : { } } + ]; + + for my $type (qw( release file )) { + my $url = "/$type/_search"; + my $request = HTTP::Request->new( 'POST', $url, [], $source ); + + subtest "check with '$type' controller" => sub { + my $res = $test->request($request); + + ok( $res, "GET $url" ); + is( $res->code, 400, "code 400" ); + is( + $res->header('content-type'), + 'application/json; charset=utf-8', + 'Content-type' + ); + my $content + = eval { Cpanel::JSON::XS::decode_json( $res->content ) }; + ok( is_hashref($content), 'content is a JSON object' ); + ok $content->{error}, 'content includes includes error'; + }; + } +}; + +done_testing; From febff290f509db740c20fbaf8cb8714138eb141b Mon Sep 17 00:00:00 2001 From: "Hugo (domibay-hugo)" Date: Thu, 19 Aug 2021 23:25:40 +0100 Subject: [PATCH 150/725] merge Bad Request tests --- t/server/controller/bad_content.t | 42 ---------------- t/server/controller/bad_request.t | 79 +++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 42 deletions(-) delete mode 100644 t/server/controller/bad_content.t create mode 100644 t/server/controller/bad_request.t diff --git a/t/server/controller/bad_content.t b/t/server/controller/bad_content.t deleted file mode 100644 index a06a0b800..000000000 --- a/t/server/controller/bad_content.t +++ /dev/null @@ -1,42 +0,0 @@ -use strict; -use warnings; -use lib 't/lib'; - -use Cpanel::JSON::XS (); -use MetaCPAN::Server (); -use MetaCPAN::TestHelpers; -use Plack::Test; -use Test::More; -use Ref::Util qw( is_arrayref is_hashref ); - -my $app = MetaCPAN::Server->new->to_app(); -my $test = Plack::Test->create($app); - -subtest "broken body content" => sub { - my $source = q[ - { "query : { } } - ]; - - for my $type (qw( release file )) { - my $url = "/$type/_search"; - my $request = HTTP::Request->new( 'POST', $url, [], $source ); - - subtest "check with '$type' controller" => sub { - my $res = $test->request($request); - - ok( $res, "GET $url" ); - is( $res->code, 400, "code 400" ); - is( - $res->header('content-type'), - 'application/json; charset=utf-8', - 'Content-type' - ); - my $content - = eval { Cpanel::JSON::XS::decode_json( $res->content ) }; - ok( is_hashref($content), 'content is a JSON object' ); - ok $content->{error}, 'content includes includes error'; - }; - } -}; - -done_testing; diff --git a/t/server/controller/bad_request.t b/t/server/controller/bad_request.t new file mode 100644 index 000000000..5f2d1b710 --- /dev/null +++ b/t/server/controller/bad_request.t @@ -0,0 +1,79 @@ +use strict; +use warnings; +use lib 't/lib'; + +use Cpanel::JSON::XS qw( decode_json ); +use MetaCPAN::Server (); +use Plack::Test qw(); +use Test::More; +use Ref::Util qw( is_hashref ); + +my $app = MetaCPAN::Server->new->to_app(); +my $test = Plack::Test->create($app); + +my $sbigqueryjson = q({ + "query": { + "query_string": { + "query": "cpanfile" + } + }, + "filter": { + "and": [ + { + "term": { + "status": "latest" + } + } + ] + }, + "fields": ["distribution", "release", "module.name", "name", "path", "download_url"], + "size": "5001" +}); + +my @tests = ( + [ + 'broken body content', + 400, + q[ { "query : { } } ], + 'error', + 'unexpected end of string', + ], + [ + 'plain text query', + 400, 'some content as invalid JSON', + 'error', 'malformed JSON string', + ], + [ + 'big result query', 416, $sbigqueryjson, 'message', 'exceeds maximum', + ], +); + +for (@tests) { + my ( $title, $code, $query, $field, $check ) = @$_; + + subtest $title => sub { + for my $type (qw( release file )) { + my $url = "/$type/_search"; + my $request = HTTP::Request->new( 'POST', $url, [], $query ); + + subtest "check with '$type' controller" => sub { + my $res = $test->request($request); + + ok( $res, "GET $url" ); + is( $res->code, $code, "code [$code] as expected" ); + is( + $res->header('content-type'), + 'application/json; charset=utf-8', + 'Content-type' + ); + my $content = eval { decode_json( $res->content ) }; + ok( is_hashref($content), 'response is a JSON object' ); + ok $content->{$field}, "response includes field '$field'"; + ok $content->{$field} =~ /$check/i, + 'response error message as expected'; + }; + } + }; +} + +done_testing; From a8d7de3e6a49214a238cd95747ea50afa80fba6f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 29 Aug 2021 09:36:43 +0200 Subject: [PATCH 151/725] tidy --- t/server/controller/bad_request.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/server/controller/bad_request.t b/t/server/controller/bad_request.t index 5f2d1b710..7af2ce5eb 100644 --- a/t/server/controller/bad_request.t +++ b/t/server/controller/bad_request.t @@ -40,7 +40,7 @@ my @tests = ( ], [ 'plain text query', - 400, 'some content as invalid JSON', + 400, 'some content as invalid JSON', 'error', 'malformed JSON string', ], [ @@ -53,7 +53,7 @@ for (@tests) { subtest $title => sub { for my $type (qw( release file )) { - my $url = "/$type/_search"; + my $url = "/$type/_search"; my $request = HTTP::Request->new( 'POST', $url, [], $query ); subtest "check with '$type' controller" => sub { From c23ed16a79d66190fceb1b45825687114b06749e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 29 Aug 2021 08:28:29 +0200 Subject: [PATCH 152/725] fix filters in download_url end point Releases on backpan should not be allowed unless an explicit version is given. This appears to have been a mistake when converting the query from cpanminus. --- lib/MetaCPAN/Document/File/Set.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index d17c3f798..1cd503b08 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -257,12 +257,13 @@ sub find_download_url { my $version = $args->{version}; my $explicit_version = $version && $version =~ /==/; - # exclude backpan if dev, and - # require released modules if neither dev nor explicit version - my @filters - = $dev ? { not => { term => { status => 'backpan' } } } - : !$explicit_version ? { term => { maturity => 'released' } } - : (); + my @filters; + if ( !$explicit_version ) { + push @filters, { not => { term => { status => 'backpan' } } }; + if ( !$dev ) { + push @filters, { term => { maturity => 'released' } }; + } + } my $version_filters = $self->_version_filters($version); From a7dafa4a7a9622e4fe40282a945fd2bbea4b5ee0 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 25 Oct 2021 17:38:07 -0400 Subject: [PATCH 153/725] Update Mozilla::CA from 20200520 to 20211001 --- cpanfile | 2 +- cpanfile.snapshot | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cpanfile b/cpanfile index a91f0a342..dd6d3ec3b 100644 --- a/cpanfile +++ b/cpanfile @@ -129,7 +129,7 @@ requires 'MooseX::StrictConstructor'; requires 'MooseX::Types'; requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; requires 'MooseX::Types::Moose'; -requires 'Mozilla::CA', '20200520'; +requires 'Mozilla::CA', '20211001'; requires 'namespace::autoclean'; requires 'Net::DNS::Paranoid'; requires 'Net::Fastly', '1.12'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 8843140cc..2fa3972e1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5444,13 +5444,12 @@ DISTRIBUTIONS Scalar::Util 1.14 XSLoader 0.02 perl 5.008005 - Mozilla-CA-20200520 - pathname: A/AB/ABH/Mozilla-CA-20200520.tar.gz + Mozilla-CA-20211001 + pathname: A/AB/ABH/Mozilla-CA-20211001.tar.gz provides: - Mozilla::CA 20200520 + Mozilla::CA 20211001 requirements: ExtUtils::MakeMaker 0 - Test 0 perl 5.006 Net-CIDR-Lite-0.21 pathname: D/DO/DOUGW/Net-CIDR-Lite-0.21.tar.gz From 00ebffba877a9062d5ff89a4241681d52f260b6d Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Tue, 26 Oct 2021 09:19:32 -0400 Subject: [PATCH 154/725] Update URI from 5.09 to 5.10 --- cpanfile | 2 +- cpanfile.snapshot | 195 +++++++++++----------------------------------- 2 files changed, 48 insertions(+), 149 deletions(-) diff --git a/cpanfile b/cpanfile index dd6d3ec3b..143a5b15d 100644 --- a/cpanfile +++ b/cpanfile @@ -172,7 +172,7 @@ requires 'Try::Tiny', '0.24'; requires 'Type::Tiny', '1.002001'; requires 'Types::Path::Tiny'; requires 'Types::URI'; -requires 'URI', '5.09'; +requires 'URI', '5.10'; requires 'URI::Escape'; requires 'version', '0.9901'; requires 'XML::Simple'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 2fa3972e1..b318f17ad 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -98,19 +98,6 @@ DISTRIBUTIONS Params::Check 0.07 Test::More 0 if 0 - Archive-Peek-0.35 - pathname: L/LB/LBROCARD/Archive-Peek-0.35.tar.gz - provides: - Archive::Peek 0.35 - Archive::Peek::Tar undef - Archive::Peek::Zip undef - requirements: - Archive::Tar 0 - Archive::Zip 0 - ExtUtils::MakeMaker 0 - Moose 0 - MooseX::Types::Path::Class 0 - Test::More 0 Archive-Zip-1.59 pathname: P/PH/PHRED/Archive-Zip-1.59.tar.gz provides: @@ -953,17 +940,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Storable 0 perl 5.008001 - Clone-PP-1.07 - pathname: N/NE/NEILB/Clone-PP-1.07.tar.gz - provides: - Clone::PP 1.07 - requirements: - Exporter 0 - ExtUtils::MakeMaker 0 - perl 5.006 - strict 0 - vars 0 - warnings 0 Code-TidyAll-0.78 pathname: D/DR/DROLSKY/Code-TidyAll-0.78.tar.gz provides: @@ -2827,18 +2803,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - File-Slurp-9999.19 - pathname: U/UR/URI/File-Slurp-9999.19.tar.gz - provides: - File::Slurp 9999.19 - FileSlurp_12 9999.13 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - Fcntl 0 - POSIX 0 - perl 5.004 File-Spec-Native-1.004 pathname: R/RW/RWSTAUNER/File-Spec-Native-1.004.tar.gz provides: @@ -3127,21 +3091,6 @@ DISTRIBUTIONS locale 0 perl 5.008001 strict 0 - HTTP-Daemon-6.01 - pathname: G/GA/GAAS/HTTP-Daemon-6.01.tar.gz - provides: - HTTP::Daemon 6.01 - HTTP::Daemon::ClientConn 6.01 - requirements: - ExtUtils::MakeMaker 0 - HTTP::Date 6 - HTTP::Request 6 - HTTP::Response 6 - HTTP::Status 6 - IO::Socket 0 - LWP::MediaTypes 6 - Sys::Hostname 0 - perl 5.008001 HTTP-Date-6.02 pathname: G/GA/GAAS/HTTP-Date-6.02.tar.gz provides: @@ -5374,19 +5323,6 @@ DISTRIBUTIONS Module::Build 0.3601 MooseX::Types 0 Search::Elasticsearch 0 - MooseX-Types-Path-Class-0.09 - pathname: E/ET/ETHER/MooseX-Types-Path-Class-0.09.tar.gz - provides: - MooseX::Types::Path::Class 0.09 - requirements: - Module::Build::Tiny 0.034 - MooseX::Types 0 - MooseX::Types::Moose 0 - Path::Class 0.16 - if 0 - perl 5.006 - strict 0 - warnings 0 MooseX-Types-Structured-0.36 pathname: E/ET/ETHER/MooseX-Types-Structured-0.36.tar.gz provides: @@ -6216,26 +6152,6 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 - Parse-CPAN-Packages-2.40 - pathname: M/MI/MITHALDU/Parse-CPAN-Packages-2.40.tar.gz - provides: - Parse::CPAN::Packages 2.40 - Parse::CPAN::Packages::Distribution undef - Parse::CPAN::Packages::Package undef - requirements: - Archive::Peek 0 - CPAN::DistnameInfo 0 - Compress::Zlib 0 - ExtUtils::MakeMaker 0 - File::Slurp 0 - Moo 0 - PPI 0 - Path::Class 0 - Test::InDistDir 0 - Test::More 0 - Type::Utils 0 - Types::Standard 0 - version 0 Parse-CPAN-Packages-Fast-0.09 pathname: S/SR/SREZIC/Parse-CPAN-Packages-Fast-0.09.tar.gz provides: @@ -7293,13 +7209,6 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 - Sort-Naturally-1.03 - pathname: B/BI/BINGOS/Sort-Naturally-1.03.tar.gz - provides: - Sort::Naturally 1.03 - requirements: - ExtUtils::MakeMaker 0 - perl 5 Sort-Versions-1.62 pathname: N/NE/NEILB/Sort-Versions-1.62.tar.gz provides: @@ -7721,16 +7630,6 @@ DISTRIBUTIONS Try::Tiny 0.07 strict 0 warnings 0 - Test-InDistDir-1.112071 - pathname: M/MI/MITHALDU/Test-InDistDir-1.112071.tar.gz - provides: - Test::InDistDir 1.112071 - requirements: - ExtUtils::MakeMaker 6.30 - File::Find 0 - File::Spec 0 - File::Temp 0 - Test::More 0 Test-LongString-0.17 pathname: R/RG/RGARCIA/Test-LongString-0.17.tar.gz provides: @@ -8243,53 +8142,53 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.09 - pathname: O/OA/OALDERS/URI-5.09.tar.gz - provides: - URI 5.09 - URI::Escape 5.09 - URI::Heuristic 5.09 - URI::IRI 5.09 - URI::QueryParam 5.09 - URI::Split 5.09 - URI::URL 5.09 - URI::WithBase 5.09 - URI::data 5.09 - URI::file 5.09 - URI::file::Base 5.09 - URI::file::FAT 5.09 - URI::file::Mac 5.09 - URI::file::OS2 5.09 - URI::file::QNX 5.09 - URI::file::Unix 5.09 - URI::file::Win32 5.09 - URI::ftp 5.09 - URI::gopher 5.09 - URI::http 5.09 - URI::https 5.09 - URI::ldap 5.09 - URI::ldapi 5.09 - URI::ldaps 5.09 - URI::mailto 5.09 - URI::mms 5.09 - URI::news 5.09 - URI::nntp 5.09 - URI::nntps 5.09 - URI::pop 5.09 - URI::rlogin 5.09 - URI::rsync 5.09 - URI::rtsp 5.09 - URI::rtspu 5.09 - URI::sftp 5.09 - URI::sip 5.09 - URI::sips 5.09 - URI::snews 5.09 - URI::ssh 5.09 - URI::telnet 5.09 - URI::tn3270 5.09 - URI::urn 5.09 - URI::urn::isbn 5.09 - URI::urn::oid 5.09 + URI-5.10 + pathname: O/OA/OALDERS/URI-5.10.tar.gz + provides: + URI 5.10 + URI::Escape 5.10 + URI::Heuristic 5.10 + URI::IRI 5.10 + URI::QueryParam 5.10 + URI::Split 5.10 + URI::URL 5.10 + URI::WithBase 5.10 + URI::data 5.10 + URI::file 5.10 + URI::file::Base 5.10 + URI::file::FAT 5.10 + URI::file::Mac 5.10 + URI::file::OS2 5.10 + URI::file::QNX 5.10 + URI::file::Unix 5.10 + URI::file::Win32 5.10 + URI::ftp 5.10 + URI::gopher 5.10 + URI::http 5.10 + URI::https 5.10 + URI::ldap 5.10 + URI::ldapi 5.10 + URI::ldaps 5.10 + URI::mailto 5.10 + URI::mms 5.10 + URI::news 5.10 + URI::nntp 5.10 + URI::nntps 5.10 + URI::pop 5.10 + URI::rlogin 5.10 + URI::rsync 5.10 + URI::rtsp 5.10 + URI::rtspu 5.10 + URI::sftp 5.10 + URI::sip 5.10 + URI::sips 5.10 + URI::snews 5.10 + URI::ssh 5.10 + URI::telnet 5.10 + URI::tn3270 5.10 + URI::urn 5.10 + URI::urn::isbn 5.10 + URI::urn::oid 5.10 requirements: Carp 0 Cwd 0 From 529f8ee461b4c4e495ebcbc1846878373a75fb88 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Tue, 26 Oct 2021 12:58:25 -0400 Subject: [PATCH 155/725] Update LWP::UserAgent 6.55 to 6.58 --- cpanfile | 2 +- cpanfile.snapshot | 54 +++++++++++++++++++++++------------------------ 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cpanfile b/cpanfile index 143a5b15d..c41caaf0a 100644 --- a/cpanfile +++ b/cpanfile @@ -98,7 +98,7 @@ requires 'Log::Log4perl::Appender::ScreenColoredLevels'; requires 'Log::Log4perl::Catalyst'; requires 'Log::Log4perl::Layout::JSON'; requires 'LWP::Protocol::https'; -requires 'LWP::UserAgent', '6.55'; +requires 'LWP::UserAgent', '6.58'; requires 'LWP::UserAgent::Paranoid'; requires 'MetaCPAN::Moose'; requires 'MetaCPAN::Pod::XHTML'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b318f17ad..46b3e7c8d 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -8576,32 +8576,32 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libwww-perl-6.55 - pathname: O/OA/OALDERS/libwww-perl-6.55.tar.gz - provides: - LWP 6.55 - LWP::Authen::Basic 6.55 - LWP::Authen::Digest 6.55 - LWP::Authen::Ntlm 6.55 - LWP::ConnCache 6.55 - LWP::Debug 6.55 - LWP::Debug::TraceHTTP 6.55 - LWP::DebugFile 6.55 - LWP::MemberMixin 6.55 - LWP::Protocol 6.55 - LWP::Protocol::cpan 6.55 - LWP::Protocol::data 6.55 - LWP::Protocol::file 6.55 - LWP::Protocol::ftp 6.55 - LWP::Protocol::gopher 6.55 - LWP::Protocol::http 6.55 - LWP::Protocol::loopback 6.55 - LWP::Protocol::mailto 6.55 - LWP::Protocol::nntp 6.55 - LWP::Protocol::nogo 6.55 - LWP::RobotUA 6.55 - LWP::Simple 6.55 - LWP::UserAgent 6.55 + libwww-perl-6.58 + pathname: O/OA/OALDERS/libwww-perl-6.58.tar.gz + provides: + LWP 6.58 + LWP::Authen::Basic 6.58 + LWP::Authen::Digest 6.58 + LWP::Authen::Ntlm 6.58 + LWP::ConnCache 6.58 + LWP::Debug 6.58 + LWP::Debug::TraceHTTP 6.58 + LWP::DebugFile 6.58 + LWP::MemberMixin 6.58 + LWP::Protocol 6.58 + LWP::Protocol::cpan 6.58 + LWP::Protocol::data 6.58 + LWP::Protocol::file 6.58 + LWP::Protocol::ftp 6.58 + LWP::Protocol::gopher 6.58 + LWP::Protocol::http 6.58 + LWP::Protocol::loopback 6.58 + LWP::Protocol::mailto 6.58 + LWP::Protocol::nntp 6.58 + LWP::Protocol::nogo 6.58 + LWP::RobotUA 6.58 + LWP::Simple 6.58 + LWP::UserAgent 6.58 libwww::perl undef requirements: CPAN::Meta::Requirements 2.120620 @@ -8633,7 +8633,7 @@ DISTRIBUTIONS URI 1.10 URI::Escape 0 WWW::RobotRules 6 - base 0 + parent 0.217 perl 5.008001 strict 0 warnings 0 From 1098c716a19a080bcb1cd5dc0c14c3aad09b1973 Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Tue, 26 Oct 2021 17:14:36 -0400 Subject: [PATCH 156/725] Update Try::Tiny 0.24 to 0.30 --- cpanfile | 2 +- cpanfile.snapshot | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpanfile b/cpanfile index c41caaf0a..476e14db9 100644 --- a/cpanfile +++ b/cpanfile @@ -168,7 +168,7 @@ requires 'Starman'; requires 'strictures', '1'; requires 'Throwable::Error'; requires 'Time::Local'; -requires 'Try::Tiny', '0.24'; +requires 'Try::Tiny', '0.30'; requires 'Type::Tiny', '1.002001'; requires 'Types::Path::Tiny'; requires 'Types::URI'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 46b3e7c8d..3902e6935 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -8032,10 +8032,10 @@ DISTRIBUTIONS base 0 strict 0 warnings 0 - Try-Tiny-0.28 - pathname: E/ET/ETHER/Try-Tiny-0.28.tar.gz + Try-Tiny-0.30 + pathname: E/ET/ETHER/Try-Tiny-0.30.tar.gz provides: - Try::Tiny 0.28 + Try::Tiny 0.30 requirements: Carp 0 Exporter 5.57 From d3766cd574b5752c206b7de247a173ef387c93bb Mon Sep 17 00:00:00 2001 From: Shawn Sorichetti Date: Wed, 27 Oct 2021 09:57:10 -0400 Subject: [PATCH 157/725] Update MetaCPAN::Client 2.017000 to 2.029000 --- cpanfile | 2 +- cpanfile.snapshot | 45 +++++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/cpanfile b/cpanfile index 476e14db9..6f509c8ad 100644 --- a/cpanfile +++ b/cpanfile @@ -187,7 +187,7 @@ requires 'Devel::Confess'; requires 'File::Copy'; requires 'HTTP::Cookies', '6.10'; requires 'LWP::ConsoleLogger::Easy'; -requires 'MetaCPAN::Client', '2.017000'; +requires 'MetaCPAN::Client', '2.029000'; requires 'Module::Faker', '0.015'; requires 'Module::Faker::Dist', '0.010'; requires 'Perl::Tidy' => '20210402'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 3902e6935..ebf2c55ab 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3983,28 +3983,29 @@ DISTRIBUTIONS Fennec::Lite 0 Test::Exception 0 Test::More 0 - MetaCPAN-Client-2.019000 - pathname: M/MI/MICKEY/MetaCPAN-Client-2.019000.tar.gz - provides: - MetaCPAN::Client 2.019000 - MetaCPAN::Client::Author 2.019000 - MetaCPAN::Client::Distribution 2.019000 - MetaCPAN::Client::DownloadURL 2.019000 - MetaCPAN::Client::Favorite 2.019000 - MetaCPAN::Client::File 2.019000 - MetaCPAN::Client::Mirror 2.019000 - MetaCPAN::Client::Module 2.019000 - MetaCPAN::Client::Package 2.019000 - MetaCPAN::Client::Permission 2.019000 - MetaCPAN::Client::Pod 2.019000 - MetaCPAN::Client::Rating 2.019000 - MetaCPAN::Client::Release 2.019000 - MetaCPAN::Client::Request 2.019000 - MetaCPAN::Client::ResultSet 2.019000 - MetaCPAN::Client::Role::Entity 2.019000 - MetaCPAN::Client::Role::HasUA 2.019000 - MetaCPAN::Client::Scroll 2.019000 - MetaCPAN::Client::Types 2.019000 + MetaCPAN-Client-2.029000 + pathname: M/MI/MICKEY/MetaCPAN-Client-2.029000.tar.gz + provides: + MetaCPAN::Client 2.029000 + MetaCPAN::Client::Author 2.029000 + MetaCPAN::Client::Cover 2.029000 + MetaCPAN::Client::Distribution 2.029000 + MetaCPAN::Client::DownloadURL 2.029000 + MetaCPAN::Client::Favorite 2.029000 + MetaCPAN::Client::File 2.029000 + MetaCPAN::Client::Mirror 2.029000 + MetaCPAN::Client::Module 2.029000 + MetaCPAN::Client::Package 2.029000 + MetaCPAN::Client::Permission 2.029000 + MetaCPAN::Client::Pod 2.029000 + MetaCPAN::Client::Rating 2.029000 + MetaCPAN::Client::Release 2.029000 + MetaCPAN::Client::Request 2.029000 + MetaCPAN::Client::ResultSet 2.029000 + MetaCPAN::Client::Role::Entity 2.029000 + MetaCPAN::Client::Role::HasUA 2.029000 + MetaCPAN::Client::Scroll 2.029000 + MetaCPAN::Client::Types 2.029000 requirements: Carp 0 ExtUtils::MakeMaker 7.1101 From dace831340ed4793df1e64b40a746266ff4bd9e9 Mon Sep 17 00:00:00 2001 From: Bodo Hugo Barwich Date: Sat, 18 Dec 2021 20:31:29 +0000 Subject: [PATCH 158/725] Methods await() and check_health() --- lib/MetaCPAN/Role/Script.pm | 241 +++++++++++++++++++++++++++++++++++- 1 file changed, 237 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index da11e0890..ba27bec00 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -6,7 +6,7 @@ use ElasticSearchX::Model::Document::Types qw(:all); use Git::Helpers qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); -use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str ); +use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); use Mojo::Server (); use Term::ANSIColor qw( colored ); use IO::Interactive qw( is_interactive ); @@ -35,6 +35,22 @@ has die_on_error => ( documentation => 'Die on errors instead of simply logging', ); +has exit_code => ( + isa => Int, + is => 'rw', + default => 0, + documentation => 'Exit Code to be returned on termination', +); + +has arg_await_timeout => ( + init_arg => 'await', + is => 'ro', + isa => Int, + default => 15, + documentation => + 'seconds before connection is considered failed with timeout', +); + has ua => ( is => 'ro', lazy => 1, @@ -71,6 +87,27 @@ has index => ( 'Index to use, defaults to "cpan" (when used: also export ES_SCRIPT_INDEX)', ); +has cluster_info => ( + isa => HashRef, + traits => ['Hash'], + is => 'rw', + default => sub { {} }, +); + +has indices_info => ( + isa => HashRef, + traits => ['Hash'], + is => 'rw', + default => sub { {} }, +); + +has aliases_info => ( + isa => HashRef, + traits => ['Hash'], + is => 'rw', + default => sub { {} }, +); + has port => ( isa => Int, is => 'ro', @@ -123,13 +160,27 @@ sub BUILDARGS { } sub handle_error { - my ( $self, $error ) = @_; + my ( $self, $error, $die_always ) = @_; + + # Die if configured (for the test suite). + $die_always = $self->die_on_error unless defined $die_always; # Always log. log_fatal {$error}; - # Die if configured (for the test suite). - Carp::croak $error if $self->die_on_error; + $! = $self->exit_code if ( $self->exit_code != 0 ); + + Carp::croak $error if $die_always; +} + +sub print_error { + my ( $self, $error ) = @_; + + # Always log. + log_error {$error}; + + # Display Error in red + print colored( ['bold red'], "*** ERROR ***: $error" ), "\n"; } sub index { @@ -195,6 +246,114 @@ before run => sub { #Dlog_debug {"Connected to $_"} $self->remote; }; +sub check_health { + my ( $self, $irefresh ) = @_; + my $ihealth = 0; + + $irefresh = 0 unless ( defined $irefresh ); + + $ihealth = $self->await; + + if ($ihealth) { + if ( $irefresh || scalar( keys %{ $self->indices_info } ) == 0 ) { + my $sinfo_rs + = $self->es->cat->indices( h => [ 'index', 'health' ] ); + + $self->indices_info( {} ); + + while ( $sinfo_rs =~ /^([^[:space:]]+) +([^[:space:]]+)/gm ) { + $self->indices_info->{$1} + = { 'index_name' => $1, 'health' => $2 }; + + $ihealth = 0 if ( $2 eq 'red' ); + } + } + else { + foreach ( keys %{ $self->indices_info } ) { + $ihealth = 0 + if ( $self->indices_info->{$_}->{'health'} eq 'red' ); + } + } + } + + if ($ihealth) { + if ( $irefresh || scalar( keys %{ $self->aliases_info } ) == 0 ) { + my $sinfo_rs + = $self->es->cat->aliases( h => [ 'alias', 'index' ] ); + + $self->aliases_info( {} ); + + while ( $sinfo_rs =~ /^([^[:space:]]+) +([^[:space:]]+)/gm ) { + $self->aliases_info->{$1} + = { 'alias_name' => $1, 'index' => $2 }; + } + } + + $ihealth = 0 if ( scalar( keys %{ $self->aliases_info } ) == 0 ); + } + + return $ihealth; +} + +sub await { + my $self = $_[0]; + my $iready = 0; + + if ( scalar( keys %{ $self->cluster_info } ) == 0 ) { + my $es = $self->es; + my $iseconds = 0; + + log_info {"Awaiting Elasticsearch ..."}; + + do { + eval { + $iready = $es->ping; + + if ($iready) { + log_info { + "Awaiting $iseconds / " + . $self->arg_await_timeout + . " : ready" + }; + + $self->cluster_info( \%{ $es->info } ); + } + }; + + if ($@) { + if ( $iseconds < $self->arg_await_timeout ) { + log_info { + "Awaiting $iseconds / " + . $self->arg_await_timeout + . " : unavailable - sleeping ..." + }; + + sleep(1); + + $iseconds++; + } + else { + log_error { + "Awaiting $iseconds / " + . $self->arg_await_timeout + . " : unavailable - timeout!" + }; + + #Set System Error: 112 - EHOSTDOWN - Host is down + $self->exit_code(112); + $self->handle_error( $@, 1 ); + } + } + } while ( !$iready && $iseconds <= $self->arg_await_timeout ); + } + else { + #ElasticSearch Service is available + $iready = 1; + } + + return $iready; +} + sub are_you_sure { my ( $self, $msg ) = @_; @@ -216,8 +375,82 @@ __END__ =pod +=head1 NAME + +MetaCPAN::Role::Script - Base Role which is used by many command line applications + =head1 SYNOPSIS Roles which should be available to all modules. +=head1 OPTIONS + +This Role makes the command line application accept the following options + +=over 4 + +=item Option C<--await 15> + +This option will set the I. +After C seconds the Application will fail with an Exception and the Exit Code [112] +(C<112 - EHOSTDOWN - Host is down>) will be returned + + bin/metacpan --await 15 + +See L> + +=back + +=head1 METHODS + +This Role provides the following methods + +=over 4 + +=item C + +This method uses the +L|https://metacpan.org/pod/Search::Elasticsearch::Client::2_0::Direct#ping()> +method to verify the service availabilty and wait for C seconds. +When the service does not become available within C seconds it re-throws the +Exception from the C and sets C< $! > to C< 112 >. +The C generates a C<"Search::Elasticsearch::Error::NoNodes"> Exception. +When the service is available it will populate the C C structure with the basic information +about the cluster. +See L