From a1f8ac289ac95b6179c0e77b26a20fa154c40444 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 1 Jun 2017 11:42:22 -0400 Subject: [PATCH 1/8] Add Code::TidyAll::Plugin::Test::Vars to tidyall config --- .tidyallrc | 3 + cpanfile | 3 +- cpanfile.snapshot | 218 ++++++++++++++---- lib/MetaCPAN/Sitemap.pm | 2 +- .../Web/Controller/Account/Favorite.pm | 2 - lib/MetaCPAN/Web/Controller/Pod.pm | 4 +- lib/MetaCPAN/Web/Model/API.pm | 2 +- lib/MetaCPAN/Web/Model/API/Lab.pm | 8 +- lib/MetaCPAN/Web/Model/API/Module.pm | 2 +- lib/MetaCPAN/Web/Model/API/Permission.pm | 4 - lib/MetaCPAN/Web/Model/API/Release.pm | 5 + lib/Plack/Middleware/Assets/FileCached.pm | 1 - t/tidyall.t | 8 + 13 files changed, 204 insertions(+), 58 deletions(-) diff --git a/.tidyallrc b/.tidyallrc index 1367909a63..a259152da3 100644 --- a/.tidyallrc +++ b/.tidyallrc @@ -9,3 +9,6 @@ select = .gitignore [JSBeautify] select = root/static/js/cpan.js argv = --indent-size 4 --end_with_newline + +[Test::Vars] +select = {lib,t}/**/*.pm diff --git a/cpanfile b/cpanfile index b15474325a..5fe4340ef5 100644 --- a/cpanfile +++ b/cpanfile @@ -101,12 +101,13 @@ requires 'XML::Simple'; test_requires 'App::Prove'; test_requires 'Code::TidyAll', '>= 0.47'; +test_requires 'Code::TidyAll::Plugin::Test::Vars', '0.04'; test_requires 'Path::Iterator::Rule', '1.008'; +test_requires 'Perl::Critic', '1.124'; test_requires 'Perl::Tidy'; test_requires 'Test::Code::TidyAll'; test_requires 'Test::MockObject','1.09'; test_requires 'Test::More', '0.96'; -test_requires 'Perl::Critic', '1.124'; test_requires 'Test::Perl::Critic'; test_requires 'Test::XPath', '0.15'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 45939d020d..240fccf80b 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -264,6 +264,13 @@ DISTRIBUTIONS perl 5.006 strict 0 warnings 0 + Carp-Always-0.13 + pathname: F/FE/FERREIRA/Carp-Always-0.13.tar.gz + provides: + Carp::Always 0.13 + requirements: + Carp 0 + ExtUtils::MakeMaker 0 Carp-Assert-0.21 pathname: N/NE/NEILB/Carp-Assert-0.21.tar.gz provides: @@ -758,38 +765,39 @@ DISTRIBUTIONS strict 0 vars 0 warnings 0 - Code-TidyAll-0.47 - pathname: D/DR/DROLSKY/Code-TidyAll-0.47.tar.gz - provides: - Code::TidyAll 0.47 - Code::TidyAll::Cache 0.47 - Code::TidyAll::CacheModel 0.47 - Code::TidyAll::CacheModel::Shared 0.47 - Code::TidyAll::Config::INI::Reader 0.47 - Code::TidyAll::Git::Precommit 0.47 - Code::TidyAll::Git::Prereceive 0.47 - Code::TidyAll::Git::Util 0.47 - Code::TidyAll::Plugin 0.47 - Code::TidyAll::Plugin::CSSUnminifier 0.47 - Code::TidyAll::Plugin::JSBeautify 0.47 - Code::TidyAll::Plugin::JSHint 0.47 - Code::TidyAll::Plugin::JSLint 0.47 - Code::TidyAll::Plugin::JSON 0.47 - Code::TidyAll::Plugin::MasonTidy 0.47 - Code::TidyAll::Plugin::PHPCodeSniffer 0.47 - Code::TidyAll::Plugin::PerlCritic 0.47 - Code::TidyAll::Plugin::PerlTidy 0.47 - Code::TidyAll::Plugin::PerlTidySweet 0.47 - Code::TidyAll::Plugin::PodChecker 0.47 - Code::TidyAll::Plugin::PodSpell 0.47 - Code::TidyAll::Plugin::PodTidy 0.47 - Code::TidyAll::Plugin::SortLines 0.47 - Code::TidyAll::Result 0.47 - Code::TidyAll::Role::Tempdir 0.47 - Code::TidyAll::SVN::Precommit 0.47 - Code::TidyAll::SVN::Util 0.47 - Code::TidyAll::Util::Zglob 0.47 - Test::Code::TidyAll 0.47 + Code-TidyAll-0.59 + pathname: D/DR/DROLSKY/Code-TidyAll-0.59.tar.gz + provides: + Code::TidyAll 0.59 + Code::TidyAll::Cache 0.59 + Code::TidyAll::CacheModel 0.59 + Code::TidyAll::CacheModel::Shared 0.59 + Code::TidyAll::Config::INI::Reader 0.59 + Code::TidyAll::Git::Precommit 0.59 + Code::TidyAll::Git::Prereceive 0.59 + Code::TidyAll::Git::Util 0.59 + Code::TidyAll::Plugin 0.59 + Code::TidyAll::Plugin::CSSUnminifier 0.59 + Code::TidyAll::Plugin::JSBeautify 0.59 + Code::TidyAll::Plugin::JSHint 0.59 + Code::TidyAll::Plugin::JSLint 0.59 + Code::TidyAll::Plugin::JSON 0.59 + Code::TidyAll::Plugin::MasonTidy 0.59 + Code::TidyAll::Plugin::PHPCodeSniffer 0.59 + Code::TidyAll::Plugin::PerlCritic 0.59 + Code::TidyAll::Plugin::PerlTidy 0.59 + Code::TidyAll::Plugin::PerlTidySweet 0.59 + Code::TidyAll::Plugin::PodChecker 0.59 + Code::TidyAll::Plugin::PodSpell 0.59 + Code::TidyAll::Plugin::PodTidy 0.59 + Code::TidyAll::Plugin::SortLines 0.59 + Code::TidyAll::Result 0.59 + Code::TidyAll::Role::HasIgnore 0.59 + Code::TidyAll::Role::Tempdir 0.59 + Code::TidyAll::SVN::Precommit 0.59 + Code::TidyAll::SVN::Util 0.59 + Code::TidyAll::Util::Zglob 0.59 + Test::Code::TidyAll 0.59 requirements: Capture::Tiny 0 Config::INI::Reader 0 @@ -803,8 +811,7 @@ DISTRIBUTIONS File::Find 0 File::Path 0 File::Slurp::Tiny 0 - File::Spec::Functions 0 - File::Temp 0 + File::Spec 0 File::Which 0 File::Zglob 0 Getopt::Long 0 @@ -814,9 +821,16 @@ DISTRIBUTIONS List::Compare 0 List::SomeUtils 0 Log::Any 0 - Moo 0 + Moo 2.000000 Moo::Role 0 + Path::Tiny 0.098 Scalar::Util 0 + Specio 0.30 + Specio::Declare 0 + Specio::Library::Builtins 0 + Specio::Library::Numeric 0 + Specio::Library::Path::Tiny 0.04 + Specio::Library::String 0 Test::Builder 0 Text::Diff 1.44 Text::Diff::Table 0 @@ -826,7 +840,22 @@ DISTRIBUTIONS base 0 constant 0 strict 0 - vars 0 + warnings 0 + Code-TidyAll-Plugin-Test-Vars-0.04 + pathname: M/MA/MAXMIND/Code-TidyAll-Plugin-Test-Vars-0.04.tar.gz + provides: + Code::TidyAll::Plugin::Test::Vars 0.04 + requirements: + Code::TidyAll 0.50 + Code::TidyAll::Plugin 0 + ExtUtils::MakeMaker 0 + Moo 0 + PPI::Document 0 + Path::Tiny 0 + Test::Vars 0.008 + autodie 0 + perl 5.006 + strict 0 warnings 0 Config-Any-0.27 pathname: B/BR/BRICAS/Config-Any-0.27.tar.gz @@ -902,6 +931,19 @@ DISTRIBUTIONS perl v5.8.1 strict 0 utf8 0 + Const-Fast-0.014 + pathname: L/LE/LEONT/Const-Fast-0.014.tar.gz + provides: + Const::Fast 0.014 + requirements: + Carp 0 + Module::Build::Tiny 0.021 + Scalar::Util 0 + Storable 0 + Sub::Exporter::Progressive 0.001007 + perl 5.008 + strict 0 + warnings 0 Cookie-Baker-0.06 pathname: K/KA/KAZEBURO/Cookie-Baker-0.06.tar.gz provides: @@ -4158,11 +4200,11 @@ DISTRIBUTIONS strict 0 warnings 0 warnings::register 0 - Path-Tiny-0.094 - pathname: D/DA/DAGOLDEN/Path-Tiny-0.094.tar.gz + Path-Tiny-0.104 + pathname: D/DA/DAGOLDEN/Path-Tiny-0.104.tar.gz provides: - Path::Tiny 0.094 - Path::Tiny::Error 0.094 + Path::Tiny 0.104 + Path::Tiny::Error 0.104 requirements: Carp 0 Cwd 0 @@ -4890,6 +4932,90 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 perl 5 + Specio-0.37 + pathname: D/DR/DROLSKY/Specio-0.37.tar.gz + provides: + Specio 0.37 + Specio::Coercion 0.37 + Specio::Constraint::AnyCan 0.37 + Specio::Constraint::AnyDoes 0.37 + Specio::Constraint::AnyIsa 0.37 + Specio::Constraint::Enum 0.37 + Specio::Constraint::Intersection 0.37 + Specio::Constraint::ObjectCan 0.37 + Specio::Constraint::ObjectDoes 0.37 + Specio::Constraint::ObjectIsa 0.37 + Specio::Constraint::Parameterizable 0.37 + Specio::Constraint::Parameterized 0.37 + Specio::Constraint::Role::CanType 0.37 + Specio::Constraint::Role::DoesType 0.37 + Specio::Constraint::Role::Interface 0.37 + Specio::Constraint::Role::IsaType 0.37 + Specio::Constraint::Simple 0.37 + Specio::Constraint::Structurable 0.37 + Specio::Constraint::Structured 0.37 + Specio::Constraint::Union 0.37 + Specio::Declare 0.37 + Specio::DeclaredAt 0.37 + Specio::Exception 0.37 + Specio::Exporter 0.37 + Specio::Helpers 0.37 + Specio::Library::Builtins 0.37 + Specio::Library::Numeric 0.37 + Specio::Library::Perl 0.37 + Specio::Library::String 0.37 + Specio::Library::Structured 0.37 + Specio::Library::Structured::Dict 0.37 + Specio::Library::Structured::Map 0.37 + Specio::Library::Structured::Tuple 0.37 + Specio::OO 0.37 + Specio::PartialDump 0.37 + Specio::Registry 0.37 + Specio::Role::Inlinable 0.37 + Specio::Subs 0.37 + Specio::TypeChecks 0.37 + Test::Specio 0.37 + requirements: + B 0 + Carp 0 + Devel::StackTrace 0 + Eval::Closure 0 + Exporter 0 + ExtUtils::MakeMaker 0 + IO::File 0 + List::Util 1.33 + MRO::Compat 0 + Module::Runtime 0 + Role::Tiny 1.003003 + Role::Tiny::With 0 + Scalar::Util 0 + Storable 0 + Test::Fatal 0 + Test::More 0.96 + overload 0 + parent 0 + perl 5.008 + re 0 + strict 0 + version 0.83 + warnings 0 + Specio-Library-Path-Tiny-0.04 + pathname: D/DR/DROLSKY/Specio-Library-Path-Tiny-0.04.tar.gz + provides: + Specio::Library::Path::Tiny 0.04 + requirements: + ExtUtils::MakeMaker 0 + Path::Tiny 0.087 + Scalar::Util 0 + Specio 0.29 + Specio::Declare 0 + Specio::Exporter 0 + Specio::Library::Builtins 0 + Specio::PartialDump 0 + overload 0 + parent 0 + strict 0 + warnings 0 Spiffy-0.46 pathname: I/IN/INGY/Spiffy-0.46.tar.gz provides: @@ -5423,6 +5549,18 @@ DISTRIBUTIONS Test::SharedFork 0.29 Time::HiRes 0 perl 5.008001 + Test-Vars-0.014 + pathname: D/DR/DROLSKY/Test-Vars-0.014.tar.gz + provides: + Test::Vars 0.014 + requirements: + B 0 + ExtUtils::MakeMaker 6.59 + List::Util 1.33 + Module::Build::Tiny 0.035 + Test::More 0.88 + parent 0 + perl 5.010000 Test-WWW-Mechanize-1.44 pathname: P/PE/PETDANCE/Test-WWW-Mechanize-1.44.tar.gz provides: diff --git a/lib/MetaCPAN/Sitemap.pm b/lib/MetaCPAN/Sitemap.pm index f63f83e39d..7fe589f798 100644 --- a/lib/MetaCPAN/Sitemap.pm +++ b/lib/MetaCPAN/Sitemap.pm @@ -106,7 +106,7 @@ sub process { $_ = $_ . q{ } for @urls; $self->{size} = @urls; - my $xml = XMLout( + XMLout( { 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', diff --git a/lib/MetaCPAN/Web/Controller/Account/Favorite.pm b/lib/MetaCPAN/Web/Controller/Account/Favorite.pm index 7701e43bac..f54ff9768f 100644 --- a/lib/MetaCPAN/Web/Controller/Account/Favorite.pm +++ b/lib/MetaCPAN/Web/Controller/Account/Favorite.pm @@ -59,8 +59,6 @@ sub list_as_json : Local : Args(0) { $self->_add_fav_list_to_stash( $c, 1_000 ); - my $user = $c->stash->{user}; - $c->add_surrogate_key( $self->_cache_key_for_user($c) ); $c->cdn_max_age('30d'); diff --git a/lib/MetaCPAN/Web/Controller/Pod.pm b/lib/MetaCPAN/Web/Controller/Pod.pm index 31ccecfec9..bf23d05cfd 100644 --- a/lib/MetaCPAN/Web/Controller/Pod.pm +++ b/lib/MetaCPAN/Web/Controller/Pod.pm @@ -167,7 +167,9 @@ sub view : Private { ul => [ { id => qr/^index$/ } ], }, replace_img => sub { - my ( $tagname, $attrs, $text ) = @_; + + # last arg is $text, which we don't need + my ( $tagname, $attrs, undef ) = @_; my $tag = 'recv; + my ($response) = $cv->recv; if ( !$response ) { $req->croak( "bad response when requesting " . $request->uri ); diff --git a/lib/MetaCPAN/Web/Model/API/Lab.pm b/lib/MetaCPAN/Web/Model/API/Lab.pm index 70967d5b2e..05756e272e 100644 --- a/lib/MetaCPAN/Web/Model/API/Lab.pm +++ b/lib/MetaCPAN/Web/Model/API/Lab.pm @@ -55,15 +55,13 @@ sub _handle_module { } # get the distribution that provides this module - my $cv = $self->cv; my $rm = $self->request("/module/$module")->recv; my %dep = ( dist => $rm->{distribution}, date => $rm->{date}, ); - my $cv2 = $self->cv; - my $rd = $self->request("/release/$rm->{distribution}")->recv; + my $rd = $self->request("/release/$rm->{distribution}")->recv; $dep{license} = $rd->{license}; @@ -75,8 +73,7 @@ sub _handle_module { sub fetch_latest_distros { my ( $self, $size, $pauseid ) = @_; - my $cv = $self->cv; - my $r = $self->request( + my $r = $self->request( '/release/_search', { query => { @@ -104,7 +101,6 @@ sub fetch_latest_distros { foreach my $d ( @{ $r->{hits}{hits} } ) { my $license = $d->{_source}{license}[0]; my $distro = $d->{_source}{distribution}; - my $author = $d->{_source}{author}; my $repo = $d->{_source}{'resources.repository'}; next if $distros{$distro}; # show the first one diff --git a/lib/MetaCPAN/Web/Model/API/Module.pm b/lib/MetaCPAN/Web/Model/API/Module.pm index 537ce54d8f..d9750f2da1 100644 --- a/lib/MetaCPAN/Web/Model/API/Module.pm +++ b/lib/MetaCPAN/Web/Model/API/Module.pm @@ -78,7 +78,7 @@ sub first { } sub requires { - my ( $self, $module, $page, $page_size, $sort ) = @_; + my ( $self, $module, $page, $page_size ) = @_; my $data = $self->request( "/release/requires/$module", diff --git a/lib/MetaCPAN/Web/Model/API/Permission.pm b/lib/MetaCPAN/Web/Model/API/Permission.pm index 6d5699fd83..3acbc67188 100644 --- a/lib/MetaCPAN/Web/Model/API/Permission.pm +++ b/lib/MetaCPAN/Web/Model/API/Permission.pm @@ -53,10 +53,6 @@ sub _get_modules_in_distribution { my $name = shift; return undef unless $name; - # ugh. Can't see a better way to get a model. - my $model = MetaCPAN::Web::Model::API::Release->new( - api_secure => $self->{api_secure} ); - my $res = $self->request("/package/modules/$name")->recv; my @modules = $res->{modules} ? @{ $res->{modules} } : undef; diff --git a/lib/MetaCPAN/Web/Model/API/Release.pm b/lib/MetaCPAN/Web/Model/API/Release.pm index 2d252d9eb4..4a21e36ded 100644 --- a/lib/MetaCPAN/Web/Model/API/Release.pm +++ b/lib/MetaCPAN/Web/Model/API/Release.pm @@ -345,6 +345,11 @@ sub versions { return ( $data->{releases} || [] ); } +sub favorites { + my ( $self, $dist ) = @_; + $self->request( '/favorite/_search', {} ); +} + sub topuploaders { my ( $self, $range ) = @_; my $range_filter = { diff --git a/lib/Plack/Middleware/Assets/FileCached.pm b/lib/Plack/Middleware/Assets/FileCached.pm index c5d2227d72..2df1af94f9 100644 --- a/lib/Plack/Middleware/Assets/FileCached.pm +++ b/lib/Plack/Middleware/Assets/FileCached.pm @@ -79,7 +79,6 @@ sub _build_wrapped { my $file_app = Plack::App::File->new( root => "$cache_dir" )->to_app; my $static_app = sub { - my ($env) = @_; my $res = &$file_app; push @{ $res->[1] }, 'Cache-Control', 'max-age=31556926'; return $res; diff --git a/t/tidyall.t b/t/tidyall.t index 6357b39952..8e6e526795 100644 --- a/t/tidyall.t +++ b/t/tidyall.t @@ -3,5 +3,13 @@ use strict; use warnings; +# This test is _really_ slow on Travis with Devel::Cover running. Also, +# there's really no reason to run this when coverage tests are running, since +# it's not bringing anything to the table. + use Test::Code::TidyAll; +use Test::More + do { $ENV{COVERAGE} ? ( skip_all => 'skip under Devel::Cover' ) : () }; tidyall_ok( verbose => $ENV{TEST_VERBOSE} ); + +done_testing(); From a0556481858c54acf3f7882a30e629646d03f242 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Thu, 1 Jun 2017 18:17:14 -0400 Subject: [PATCH 2/8] Add another build combo to the Travis matrix. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0f46fc6c47..8b6e614e4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,11 @@ env: # that the snapshot was built from. - DEPLOYMENT_PERL_VERSION=5.22 matrix: + + # Get one passing run with coverage and one passing run with Test::Vars + # checks. If run together they more than double the build time. - COVERAGE=1 USE_CPANFILE_SNAPSHOT=true + - USE_CPANFILE_SNAPSHOT=true - USE_CPANFILE_SNAPSHOT=false before_install: From 1f5f4e74e465c58540e575553f1896a386a5cfa9 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 2 Jun 2017 11:54:07 -0400 Subject: [PATCH 3/8] Tests not using snapshot tend to fail, so make test output verbose. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8b6e614e4b..4c2915aa36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ env: # checks. If run together they more than double the build time. - COVERAGE=1 USE_CPANFILE_SNAPSHOT=true - USE_CPANFILE_SNAPSHOT=true - - USE_CPANFILE_SNAPSHOT=false + - USE_CPANFILE_SNAPSHOT=false HARNESS_VERBOSE=1 before_install: - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers From eb7f5c3624713761a9a16db29adcc47a5715f9a6 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 2 Jun 2017 11:58:26 -0400 Subject: [PATCH 4/8] Allow coverage run to fail so that fast_finish will kick in --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c2915aa36..40fe2f0352 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,10 @@ perl: - "5.22" matrix: + fast_finish: true allow_failures: - - perl: "5.22" - env: USE_CPANFILE_SNAPSHOT=false - + - env: COVERAGE=1 USE_CPANFILE_SNAPSHOT=true + - env: USE_CPANFILE_SNAPSHOT=false HARNESS_VERBOSE=1 env: global: # Carton --deployment only works on the same version of perl @@ -17,8 +17,8 @@ env: # Get one passing run with coverage and one passing run with Test::Vars # checks. If run together they more than double the build time. - COVERAGE=1 USE_CPANFILE_SNAPSHOT=true - - USE_CPANFILE_SNAPSHOT=true - USE_CPANFILE_SNAPSHOT=false HARNESS_VERBOSE=1 + - USE_CPANFILE_SNAPSHOT=true before_install: - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers From 6583f12d646a98e17cd64bbcac9afb8c9d9b7289 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 2 Jun 2017 14:12:53 -0400 Subject: [PATCH 5/8] Test whether running Tidy tests sequentially fix Storable errors. --- t/testrules.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 t/testrules.yml diff --git a/t/testrules.yml b/t/testrules.yml new file mode 100644 index 0000000000..346e3d549c --- /dev/null +++ b/t/testrules.yml @@ -0,0 +1,5 @@ +--- +seq: + - seq: t/tidyall.t + - par: + - t/**.t From d5f4cba67191b566d31b00334cb5770effd54065 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Fri, 2 Jun 2017 15:36:23 -0400 Subject: [PATCH 6/8] Have Devel::Cover skip local dir See https://stackoverflow.com/questions/44376501/how-to-force-develcover-to-ignore-a-folder-when-using-perl-helpers-via-travis/44376821#44376821 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 40fe2f0352..d96508dcf2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ env: # Carton --deployment only works on the same version of perl # that the snapshot was built from. - DEPLOYMENT_PERL_VERSION=5.22 + - DEVEL_COVER_OPTIONS="-ignore,^local/" matrix: # Get one passing run with coverage and one passing run with Test::Vars From 1d234631562fd30438b54b027be712f20a52b5c3 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 6 Jun 2017 09:27:16 -0400 Subject: [PATCH 7/8] Remove unused var. --- lib/MetaCPAN/Web/Model/API/Release.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MetaCPAN/Web/Model/API/Release.pm b/lib/MetaCPAN/Web/Model/API/Release.pm index 4a21e36ded..b932274102 100644 --- a/lib/MetaCPAN/Web/Model/API/Release.pm +++ b/lib/MetaCPAN/Web/Model/API/Release.pm @@ -346,7 +346,7 @@ sub versions { } sub favorites { - my ( $self, $dist ) = @_; + my $self = shift; $self->request( '/favorite/_search', {} ); } From 1107b1af666b5b818813a5ffa252d7ad4eb21684 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Tue, 6 Jun 2017 09:42:52 -0400 Subject: [PATCH 8/8] Include . in @INC under 5.26 --- lib/MetaCPAN/Web/Test.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/MetaCPAN/Web/Test.pm b/lib/MetaCPAN/Web/Test.pm index a2723d49b6..0d48514f31 100644 --- a/lib/MetaCPAN/Web/Test.pm +++ b/lib/MetaCPAN/Web/Test.pm @@ -4,6 +4,9 @@ package MetaCPAN::Web::Test; use strict; use warnings; + +use lib '.'; # require app.psgi under 5.26 + use Plack::Test; use HTTP::Request::Common; use HTTP::Message::PSGI;