Prefer our built-in any() function.

The List::Util any() requires a _very_ new List::Util, which is why
there is a kdesrc-build-specific one in the first place.
wilder
Michael Pyne 11 years ago
parent e2b5dc2b2f
commit 517c5b8ce0
  1. 4
      modules/ksb/Updater/Git.pm

@ -15,7 +15,7 @@ our @ISA = qw(ksb::Updater);
use File::Basename; # basename
use File::Spec; # tmpdir
use POSIX qw(strftime);
use List::Util qw(first any);
use List::Util qw(first);
use ksb::IPC::Null;
@ -137,7 +137,7 @@ sub _isDirectoryEmpty
# whatever context the function is called in.
opendir (my $dh, $dir) or return;
if (any { $_ ne '.' && $_ ne '..' } readdir($dh)) {
if (any { $_ ne '.' && $_ ne '..' } [readdir($dh)]) {
close $dh;
return;
}

Loading…
Cancel
Save