Skip to content

Commit

Permalink
eliminate some uses of List::MoreUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
karenetheridge authored and wchristian committed Aug 19, 2015
1 parent 407f2a1 commit e326821
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ requires 'Clone' => '0.30';
requires 'File::Spec' => win32() ? '3.2701' : '0.84';
requires 'IO::String' => '1.07';
requires 'List::MoreUtils' => '0.16';
requires 'List::Util' => '1.20';
requires 'List::Util' => '1.33';
requires 'Params::Util' => '1.00';

# Modules needed for PPI::Cache
Expand Down
6 changes: 3 additions & 3 deletions lib/PPI/Document.pm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Document-specific.

use strict;
use Carp ();
use List::MoreUtils ();
use List::Util 1.33 ();
use Params::Util qw{_SCALAR0 _ARRAY0 _INSTANCE};
use Digest::MD5 ();
use PPI::Util ();
Expand Down Expand Up @@ -484,7 +484,7 @@ sub serialize {
# This is a two part test.
# First, are we on the last line of the
# content part of the file
my $last_line = List::MoreUtils::none {
my $last_line = List::Util::none {
$tokens[$_] and $tokens[$_]->{content} =~ /\n/
} (($i + 1) .. $last_index);
if ( ! defined $last_line ) {
Expand All @@ -494,7 +494,7 @@ sub serialize {

# Secondly, are their any more here-docs after us,
# (with content or a terminator)
my $any_after = List::MoreUtils::any {
my $any_after = List::Util::any {
$tokens[$_]->isa('PPI::Token::HereDoc')
and (
scalar(@{$tokens[$_]->{_heredoc}})
Expand Down
4 changes: 2 additions & 2 deletions lib/PPI/Normal.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ process to be.

use strict;
use Carp ();
use List::MoreUtils ();
use List::Util 1.33 ();
use PPI::Util '_Document';
use PPI::Document::Normalized ();

Expand Down Expand Up @@ -86,7 +86,7 @@ sub register {
}

# Has it already been added?
if ( List::MoreUtils::any { $_ eq $function } ) {
if ( List::Util::any { $_ eq $function } ) {
return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/PPI/Tokenizer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ in private methods.
# we don't have to go and load all of PPI.
use strict;
use Params::Util qw{_INSTANCE _SCALAR0 _ARRAY0};
use List::MoreUtils ();
use List::Util 1.33 ();
use PPI::Util ();
use PPI::Element ();
use PPI::Token ();
Expand Down Expand Up @@ -209,7 +209,7 @@ sub new {
# once the tokenizer hits end of file, it examines the last token to
# manually either remove the ' ' token, or chop it off the end of
# a longer one in which the space would be valid.
if ( List::MoreUtils::any { /^__(?:DATA|END)__\s*$/ } @{$self->{source}} ) {
if ( List::Util::any { /^__(?:DATA|END)__\s*$/ } @{$self->{source}} ) {
$self->{source_eof_chop} = '';
} elsif ( ! defined $self->{source}->[0] ) {
$self->{source_eof_chop} = '';
Expand Down
2 changes: 1 addition & 1 deletion t/lib/PPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use File::Spec::Functions ':ALL';
use Test::More;
use Test::Object;
use Params::Util qw{_STRING _INSTANCE};
use List::MoreUtils 'any';
use List::Util 1.33 'any';
use PPI::Dumper;

use vars qw{$VERSION};
Expand Down

0 comments on commit e326821

Please sign in to comment.