On 10/02/2026 05:01, Collin Funk wrote:
Pádraig Brady <[email protected]> writes:

diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index 393a8c8df..376609d73 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -21,6 +21,7 @@ use vars qw($VERSION @ISA @EXPORT);
use FileHandle;
  use File::Compare qw(compare);
+use Text::ParseWords qw(shellwords);
@ISA = qw(Exporter);
  ($VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd;
@@ -213,7 +214,12 @@ sub getlimits()
  {
    my $NV;
    open $NV, "getlimits |" or die "Error running getlimits\n";
-  my %limits = map {split /=|\n/} <$NV>;
+  my %limits = map {
+    chomp;
+    my ($k, $v) = split /=/, $_, 2;
+    $v = (shellwords($v))[0] if defined $v;
+    ($k, $v)
+  } <$NV>;
    return \%limits;
  }

Should we make this optional like we do for "use Expect;" or document
the dependency somewhere, e.g., README-prereq?

 From what I can tell, it is in Debian's perl-base package (look for
ParseWords.pm) [1]. But in Fedora it is under a separate package
called perl-Text-ParseWords. I had it already installed as a transitive
dependency, but others might install less packages than I do.

Good point, but in my previous quick look it seemed to be always available.
I had already checked FreeBSD, Solaris, Debian.
On Fedora perl-libs is a direct depedency of perl, so should always be 
installed.
I think it should be fine to depend on this perl base lib unconditionally.

cheers,
Padraig



Reply via email to