summaryrefslogtreecommitdiff
path: root/Build/source/texk/tests/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-08-03 23:07:09 +0000
committerKarl Berry <karl@freefriends.org>2016-08-03 23:07:09 +0000
commit99545658e68a1c9200f7c97f0ab9d9183a6a676d (patch)
treee493f497c9cc53eedd3788432cd0b6bfb327fb57 /Build/source/texk/tests/TeXLive
parent52042637dd09cc49bb7c355da98269b845c23a26 (diff)
sync
git-svn-id: svn://tug.org/texlive/trunk@41792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/tests/TeXLive')
-rw-r--r--Build/source/texk/tests/TeXLive/TLUtils.pm22
1 files changed, 10 insertions, 12 deletions
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<push_uniq(\@list, @items)>
+=item C<push_uniq(\@list, @new_items)>
-The C<push_uniq> function pushes the last elements on the list referenced
-by the first argument.
+The C<push_uniq> 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<member($item, @list)>
-The C<member> function returns true if the the first argument is contained
-in the list of the remaining arguments.
+The C<member> function returns true if the first argument
+is also inclued in the list of the remaining arguments.
=cut