From f28809a189dd76310882ba855a6e5e7246a6187f Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Tue, 8 Jul 2014 16:52:48 +0000 Subject: in case we say("Some parameter #1 blabla there") but we forget the parameter, display a decent error message instead of the usual warning... --- usr.sbin/pkg_add/OpenBSD/State.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 12ea7cb4d72..89270c1a6da 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.30 2014/06/10 15:50:01 espie Exp $ +# $OpenBSD: State.pm,v 1.31 2014/07/08 16:52:47 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -233,7 +233,7 @@ sub f my ($fmt, @l) = @_; # make it so that #0 is # unshift(@l, '#'); - $fmt =~ s/\#(\d+)/$l[$1]/ge; + $fmt =~ s,\#(\d+),($l[$1] // ""),ge; return $fmt; } -- cgit v1.2.3