Skip to content

Commit

Permalink
drop List::MoreUtils and List::AllUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jun 12, 2017
1 parent 0c149c9 commit ac687e0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
4 changes: 1 addition & 3 deletions cpanfile
Expand Up @@ -45,9 +45,7 @@ requires 'Hash::AsObject';
requires 'Hash::Merge';
requires 'Importer';
requires 'JavaScript::Minifier::XS';
requires 'List::AllUtils';
requires 'List::MoreUtils';
requires 'List::Util';
requires 'List::Util', '1.45';
requires 'Locale::Country','3.28';
requires 'Log::Log4perl::Catalyst';
requires 'MetaCPAN::Moose';
Expand Down
34 changes: 21 additions & 13 deletions lib/MetaCPAN/Web/Controller/Account.pm
@@ -1,7 +1,6 @@
package MetaCPAN::Web::Controller::Account;

use Moose;
use List::MoreUtils qw(pairwise);
use DateTime ();

BEGIN { extends 'MetaCPAN::Web::Controller' }
Expand Down Expand Up @@ -50,25 +49,34 @@ sub profile : Local : Args(0) {
return unless ( $req->method eq 'POST' );

my $data = $author;
$data->{blog} = $req->param('blog.url')

my @blog_url = $req->param('blog.url');
my @blog_feed = $req->param('blog.feed');
$data->{blog}
= $req->param('blog.url')
? [
pairwise { { url => $a, feed => $b } }
@{ [ $req->param('blog.url') ] },
@{ [ $req->param('blog.feed') ] }
map +{ url => $blog_url[$_], feed => $blog_feed[$_] },
( 0 .. $#blog_url )
]
: undef;
$data->{donation} = $req->param('donation.name')

my @donation_name = $req->param('donation.name');
my @donation_id = $req->param('donation.id');
$data->{donation}
= $req->param('donation.name')
? [
pairwise { { name => $a, id => $b } }
@{ [ $req->param('donation.name') ] },
@{ [ $req->param('donation.id') ] }
map +{ name => $donation_name[$_], id => $donation_id[$_] },
( 0 .. $#donation_name )
]
: undef;
$data->{profile} = $req->param('profile.name')

my @profile_name = $req->param('profile.name');
my @profile_id = $req->param('profile.id');
$data->{profile}
= $req->param('profile.name')
? [
pairwise { { name => $a, id => $b } }
@{ [ $req->param('profile.name') ] },
@{ [ $req->param('profile.id') ] }
map +{ name => $profile_name[$_], id => $profile_id[$_] },
( 0 .. $#profile_name )
]
: undef;

Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Web/Model/API/Favorite.pm
Expand Up @@ -4,7 +4,7 @@ use namespace::autoclean;

extends 'MetaCPAN::Web::Model::API';

use List::MoreUtils qw(uniq);
use List::Util qw(uniq);

use Importer 'MetaCPAN::Web::Elasticsearch::Adapter' =>
qw/ single_valued_arrayref_to_scalar /;
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Web/Model/API/Rating.pm
Expand Up @@ -23,7 +23,7 @@ it under the same terms as Perl itself.
=cut

use List::MoreUtils qw(uniq);
use List::Util qw(uniq);

sub get {
my ( $self, @distributions ) = @_;
Expand Down
3 changes: 1 addition & 2 deletions lib/MetaCPAN/Web/Model/API/Release.pm
Expand Up @@ -4,8 +4,7 @@ use namespace::autoclean;

extends 'MetaCPAN::Web::Model::API';

use List::Util qw(first);
use List::MoreUtils qw(uniq);
use List::Util qw(first uniq);

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Web/Model/ReleaseInfo.pm
Expand Up @@ -6,7 +6,7 @@ use MetaCPAN::Moose;

extends 'Catalyst::Model';

use List::AllUtils qw( all );
use List::Util qw( all );
use MetaCPAN::Web::Types qw( HashRef Object );
use URI;
use URI::Escape qw(uri_escape uri_unescape);
Expand Down
5 changes: 2 additions & 3 deletions t/encoding.t
Expand Up @@ -3,7 +3,6 @@ use strict;
use warnings;
use utf8;
use Test::More;
use List::MoreUtils qw(natatime);
use MetaCPAN::Web::Test;
use Encode qw( is_utf8 decode encode );

Expand Down Expand Up @@ -52,8 +51,8 @@ sub test_raw_response {
}

if ( my $w = $opts{warnings} ) {
my $iter = natatime 2, @$w;
while ( my ( $re, $desc ) = $iter->() ) {
for my $i ( map $_ * 2, 0 .. @$w / 2 - 1 ) {
my ( $re, $desc ) = @{$w}[ $i, $i + 1 ];
like pop(@warnings), $re, $desc;
}
}
Expand Down

0 comments on commit ac687e0

Please sign in to comment.