From: espie Date: Sun, 27 Jul 2014 22:19:18 +0000 (+0000) Subject: make sure makewhatis shows error messages without unsightly CODE() refs X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2da94bb332d16452835f6ab257acfe1f17e654b7;p=openbsd make sure makewhatis shows error messages without unsightly CODE() refs --- diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 89270c1a6da..e999eaf4ac5 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.31 2014/07/08 16:52:47 espie Exp $ +# $OpenBSD: State.pm,v 1.32 2014/07/27 22:19:18 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -432,6 +432,12 @@ sub system my $self = shift; my $r = $self->_system(@_); if ($r != 0) { + if (ref $_[0] eq 'CODE') { + shift; + } + if (ref $_[0] eq 'CODE') { + shift; + } $self->say("system(#1) failed: #2", join(", ", @_), $self->child_error); }