From 5af30972ae37d2fce7cfb6db1aaf99990bf76321 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 13 Jul 2010 15:38:27 +0000 Subject: [PATCH] work around a strange problem in locality of @_ by copying stuff. okay millert@ --- libexec/makewhatis/OpenBSD/Makewhatis.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/makewhatis/OpenBSD/Makewhatis.pm b/libexec/makewhatis/OpenBSD/Makewhatis.pm index aaa922e7458..0283a254804 100644 --- a/libexec/makewhatis/OpenBSD/Makewhatis.pm +++ b/libexec/makewhatis/OpenBSD/Makewhatis.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Makewhatis.pm,v 1.7 2010/07/09 08:12:49 espie Exp $ +# $OpenBSD: Makewhatis.pm,v 1.8 2010/07/13 15:38:27 espie Exp $ # Copyright (c) 2000-2004 Marc Espie # # Permission to use, copy, modify, and distribute this software for any @@ -51,10 +51,10 @@ sub f if (@_ == 0) { return ''; } - my $_ = shift; + my ($_, @l) = @_; # make it so that #0 is # - unshift(@_, '#'); - s/\#(\d+)/$_[$1]/ge; + unshift(@l, '#'); + s/\#(\d+)/$l[$1]/ge; return $_; } -- 2.20.1