From 99545658e68a1c9200f7c97f0ab9d9183a6a676d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 3 Aug 2016 23:07:09 +0000 Subject: sync git-svn-id: svn://tug.org/texlive/trunk@41792 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/tests/TeXLive/TLUtils.pm | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'Build/source') diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index d86bb1e7423..bb41e0a47d1 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -5,7 +5,7 @@ package TeXLive::TLUtils; -my $svnrev = '$Revision: 41437 $'; +my $svnrev = '$Revision: 41618 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -2960,28 +2960,26 @@ sub sort_uniq { } -=item C +=item C -The C function pushes the last elements on the list referenced -by the first argument. +The C function pushes the last argument @ITEMS to the $LIST +referenced by the first argument, if they are not already in the list. =cut sub push_uniq { - # can't we use $l as a reference, and then use my? later ... - local (*l, @le) = @_; - foreach my $e (@le) { - if (! &member($e, @l)) { - push @l, $e; + my ($l, @new_items) = @_; + for my $e (@new_items) { + if (! &member($e, @$l)) { + push (@$l, $e); } } } - =item C -The C function returns true if the the first argument is contained -in the list of the remaining arguments. +The C function returns true if the first argument +is also inclued in the list of the remaining arguments. =cut -- cgit v1.2.3