From 8c6188513a60f6f1bfaa5367a7a99f035deed877 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Wed, 1 May 2024 19:58:11 +0100 Subject: [PATCH] Get rid of unnecessary dependency --- .github/workflows/linux.yml | 1 - Makefile.PL | 1 - lib/Devel/CheckOS.pm | 5 ++--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 367ef42..67ebb52 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,7 +39,6 @@ jobs: perl -v cpanm Expect ExtUtils::MakeMaker Test::Pod Test::Pod::Coverage || cat /home/runner/.cpanm/work/*/build.log perl -Mparent -e0 || cpanm parent - cpanm List::Util rm -rf /home/runner/.cpanm/work/* cpanm --installdeps . || cat /home/runner/.cpanm/work/*/build.log perl makefile-expect-driver.pl Linux::Debian Linux::Ubuntu Linux Unix OSFeatures::Systemd OSFeatures::POSIXShellRedirection HWCapabilities::Int64 diff --git a/Makefile.PL b/Makefile.PL index 2a28a89..a378591 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -76,7 +76,6 @@ WriteMakefile( PREREQ_PM => { 'File::Find::Rule' => 0.28, 'File::Temp' => 0.19, - 'List::Util' => 1.45, 'Test::More' => 0.88, # done_testing 'Test::Warnings' => 0, # listed here as well as in TEST_REQUIRES in case we've got a Ye Olde Toolchaine # and not even the CONFIGURE_REQUIRES above is understood diff --git a/lib/Devel/CheckOS.pm b/lib/Devel/CheckOS.pm index 3ecc770..68ab8dc 100644 --- a/lib/Devel/CheckOS.pm +++ b/lib/Devel/CheckOS.pm @@ -7,7 +7,6 @@ use Exporter; # if we're loading this from Makefile.PL, FFR might not yet be installed eval 'use File::Find::Rule'; use File::Spec; -use List::Util qw(uniq); use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS %OS_ALIASES); @@ -217,7 +216,7 @@ my $re_AssertOS = qr/$case_flag ^AssertOS$/x; my $re_Alias = qr/$case_flag ^Alias\b/x; sub list_platforms { - my @modules = uniq sort grep { + my @modules = sort keys %{ {map { $_ => 1 } grep { $_ !~ $re_Alias } map { my (undef, $dir_part, $file_part) = File::Spec->splitpath($_); @@ -236,7 +235,7 @@ sub list_platforms { grep { -d } map { File::Spec->catdir($_, qw(Devel AssertOS)) } @INC - ); + )}}; return @modules; }