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.

Collin

[1] https://packages.debian.org/sid/amd64/perl-base/filelist
[2] 
https://packages.fedoraproject.org/pkgs/perl-Text-ParseWords/perl-Text-ParseWords/



Reply via email to