diff --git a/cpanfile b/cpanfile index 96e78967b41..4baf9bf70ff 100644 --- a/cpanfile +++ b/cpanfile @@ -91,6 +91,6 @@ on test => sub { on develop => sub { requires 'App::perlimports'; requires 'Perl::Critic', '1.136'; - requires 'Perl::Tidy' => '20240511'; + requires 'Perl::Tidy' => '== 20250214'; requires 'Test::Vars'; }; diff --git a/lib/MetaCPAN/Web/API/RequestInfo/Orchestrator.pm b/lib/MetaCPAN/Web/API/RequestInfo/Orchestrator.pm index 04e08f53db3..d04625083f6 100644 --- a/lib/MetaCPAN/Web/API/RequestInfo/Orchestrator.pm +++ b/lib/MetaCPAN/Web/API/RequestInfo/Orchestrator.pm @@ -113,7 +113,8 @@ sub _via_release { my $model = $self->model; Future->wait_all( - $model->get( $author, $release )->then( \&_fail_without_release ) + $model->get( $author, $release ) + ->then( \&_fail_without_release ) ->then( sub { my $data = shift; my $release_data = $data->{release}; diff --git a/lib/MetaCPAN/Web/Controller/Author.pm b/lib/MetaCPAN/Web/Controller/Author.pm index c5b5f9d367c..480d6c2d06e 100644 --- a/lib/MetaCPAN/Web/Controller/Author.pm +++ b/lib/MetaCPAN/Web/Controller/Author.pm @@ -87,7 +87,8 @@ sub releases : Chained('root') PathPart Args(0) { my $page = $req->page; my $author_cv = $c->model('API::Author')->get($id); my $releases - = $c->model('API::Release')->all_by_author( $id, $page, $page_size ) + = $c->model('API::Release') + ->all_by_author( $id, $page, $page_size ) ->get; my $author_info = $author_cv->get; diff --git a/lib/MetaCPAN/Web/Controller/ContributingDoc.pm b/lib/MetaCPAN/Web/Controller/ContributingDoc.pm index e112d932832..aed05d54cd4 100644 --- a/lib/MetaCPAN/Web/Controller/ContributingDoc.pm +++ b/lib/MetaCPAN/Web/Controller/ContributingDoc.pm @@ -32,7 +32,8 @@ sub get : Private { my $contributing_re = qr/CONTRIBUTING|HACKING/i; my $files - = $c->model('API::Release')->interesting_files( $author, $release ) + = $c->model('API::Release') + ->interesting_files( $author, $release ) ->get->{files}; my $file = List::Util::first { $_->{name} =~ /$contributing_re/ } @$files; diff --git a/lib/MetaCPAN/Web/Controller/Feed.pm b/lib/MetaCPAN/Web/Controller/Feed.pm index 3b32f6b795b..cb3abd22b95 100644 --- a/lib/MetaCPAN/Web/Controller/Feed.pm +++ b/lib/MetaCPAN/Web/Controller/Feed.pm @@ -39,7 +39,8 @@ sub recent : Private { my $changes = $c->model('API::Changes') ->by_releases( - [ map "$_->{author}/$_->{name}", @{ $c->stash->{recent} } ] )->get; + [ map "$_->{author}/$_->{name}", @{ $c->stash->{recent} } ] ) + ->get; for ( @{ $c->stash->{recent} } ) { diff --git a/lib/MetaCPAN/Web/Controller/Lab.pm b/lib/MetaCPAN/Web/Controller/Lab.pm index bae320a9f9b..6d86a370ed5 100644 --- a/lib/MetaCPAN/Web/Controller/Lab.pm +++ b/lib/MetaCPAN/Web/Controller/Lab.pm @@ -61,7 +61,9 @@ sub dashboard : Local : Args(1) { my $report; if ($pauseid) { - $report = $c->model('API::Lab')->fetch_latest_distros( 300, $pauseid ) + $report + = $c->model('API::Lab') + ->fetch_latest_distros( 300, $pauseid ) ->get; } diff --git a/lib/MetaCPAN/Web/Controller/Recent.pm b/lib/MetaCPAN/Web/Controller/Recent.pm index 187c60e0d56..d2f9e125bd8 100644 --- a/lib/MetaCPAN/Web/Controller/Recent.pm +++ b/lib/MetaCPAN/Web/Controller/Recent.pm @@ -12,7 +12,8 @@ sub index : Path : Args(0) { my $filter = $req->params->{f} || 'l'; my ($data) - = $c->model('API::Release')->recent( $page, $page_size, $filter ) + = $c->model('API::Release') + ->recent( $page, $page_size, $filter ) ->get; $c->add_surrogate_key( 'RECENT', 'DIST_UPDATES' ); diff --git a/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm b/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm index 1d645fd1225..efacf498c59 100644 --- a/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm +++ b/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm @@ -28,7 +28,8 @@ sub topuploaders : Private { my $data = $c->model('API::Release')->topuploaders($range)->get; my $authors - = $c->model('API::Author')->get_multiple( keys %{ $data->{counts} } ) + = $c->model('API::Author') + ->get_multiple( keys %{ $data->{counts} } ) ->get; $c->stash( { diff --git a/lib/MetaCPAN/Web/Controller/Requires.pm b/lib/MetaCPAN/Web/Controller/Requires.pm index 30a592ccb42..62436920c36 100644 --- a/lib/MetaCPAN/Web/Controller/Requires.pm +++ b/lib/MetaCPAN/Web/Controller/Requires.pm @@ -30,7 +30,8 @@ sub distribution : Chained('/dist/root') PathPart('requires') Args(0) my $data = $c->model('API::Release') - ->reverse_dependencies( $dist, $page, $page_size, $sort )->get; + ->reverse_dependencies( $dist, $page, $page_size, $sort ) + ->get; my $pageset = Data::Pageset->new( { current_page => $page, @@ -59,7 +60,8 @@ sub module : Chained('/module/root') PathPart('requires') Args(0) my $data = $c->model('API::Module') - ->requires( $module, $page, $page_size, $sort )->get; + ->requires( $module, $page, $page_size, $sort ) + ->get; my $pageset = Data::Pageset->new( { current_page => $page, diff --git a/lib/MetaCPAN/Web/Model/API/Author.pm b/lib/MetaCPAN/Web/Model/API/Author.pm index 172f15f9c2d..cdafae4e1cd 100644 --- a/lib/MetaCPAN/Web/Model/API/Author.pm +++ b/lib/MetaCPAN/Web/Model/API/Author.pm @@ -77,7 +77,7 @@ sub get_multiple { $data->{authors} = [ @authors{@authors} ]; $data; } - )->then( \&_filter_authors ); + )->then( \&_filter_authors ); } sub search { diff --git a/lib/MetaCPAN/Web/Model/API/Permission.pm b/lib/MetaCPAN/Web/Model/API/Permission.pm index d51c68f22b4..fdf714b2e69 100644 --- a/lib/MetaCPAN/Web/Model/API/Permission.pm +++ b/lib/MetaCPAN/Web/Model/API/Permission.pm @@ -120,8 +120,10 @@ sub _add_email_to_notification { sub get_notification_info { my ( $self, $module ) = @_; - $self->by_module($module)->then( $self->_permissions_to_notification ) - ->then( $self->_add_email_to_notification )->then( sub { + $self->by_module($module) + ->then( $self->_permissions_to_notification ) + ->then( $self->_add_email_to_notification ) + ->then( sub { my $data = shift; Future->done( { took => $data->{took}, diff --git a/lib/MetaCPAN/Web/Model/API/Release.pm b/lib/MetaCPAN/Web/Model/API/Release.pm index df8a538ae2a..fdac4cdb0e3 100644 --- a/lib/MetaCPAN/Web/Model/API/Release.pm +++ b/lib/MetaCPAN/Web/Model/API/Release.pm @@ -42,21 +42,24 @@ sub coverage { sub get { my ( $self, $author, $release ) = @_; - $self->request("/release/$author/$release")->then( \&_with_distnameinfo ) + $self->request("/release/$author/$release") + ->then( \&_with_distnameinfo ) ->then( \&_fix_dependency ); } sub latest_by_author { my ( $self, $pauseid ) = @_; $self->request("/release/latest_by_author/$pauseid") - ->then( \&_with_distnameinfo )->then( $self->add_river ); + ->then( \&_with_distnameinfo ) + ->then( $self->add_river ); } sub all_by_author { my ( $self, $pauseid, $page, $page_size ) = @_; $self->request( "/release/all_by_author/$pauseid", undef, { page => $page, page_size => $page_size } ) - ->then( \&_with_distnameinfo )->then( $self->add_river ); + ->then( \&_with_distnameinfo ) + ->then( $self->add_river ); } sub recent { @@ -86,7 +89,8 @@ sub modules { sub find { my ( $self, $distribution ) = @_; $self->request("/release/latest_by_distribution/$distribution") - ->then( \&_with_distnameinfo )->then( \&_fix_dependency ); + ->then( \&_with_distnameinfo ) + ->then( \&_fix_dependency ); } # stolen from Module/requires @@ -123,7 +127,8 @@ sub interesting_files { sub versions { my ( $self, $dist ) = @_; - $self->request("/release/versions/$dist")->then( \&_with_distnameinfo ) + $self->request("/release/versions/$dist") + ->then( \&_with_distnameinfo ) ->then( sub { my ($data) = @_; $data->{versions} = delete $data->{releases}; diff --git a/t/model/release.t b/t/model/release.t index 06c86a6d2b9..66f11fdd240 100644 --- a/t/model/release.t +++ b/t/model/release.t @@ -21,8 +21,8 @@ sub is_bool { subtest modules => sub { my @files = @{ MetaCPAN::Web->model('API::Release') - ->modules( 'OALDERS', 'HTTP-CookieMonster-0.09' )->get->{modules} - }; + ->modules( 'OALDERS', 'HTTP-CookieMonster-0.09' ) + ->get->{modules} }; ok( scalar @files, 'found files with modules' ); @@ -52,7 +52,8 @@ subtest versions => sub { # Something with not too many versions. my @versions = @{ MetaCPAN::Web->model('API::Release') - ->versions('Mojolicious-Plugin-HamlRenderer')->get->{versions} }; + ->versions('Mojolicious-Plugin-HamlRenderer') + ->get->{versions} }; ok( scalar @versions, 'found release versions' );