From 32aa23a917444bd91685850d21311cdb230dabe4 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Tue, 16 Nov 2010 09:31:43 -0800 Subject: update to perl error location support. --- lib/Vyatta/Config.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index 28326dd..43da205 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -678,15 +678,11 @@ sub compareValueLists { sub outputError { - my ($location, $msg) = @_; + my ($location,$msg) = @_; if (defined($ENV{VYATTA_OUTPUT_ERROR_LOCATION})) { - foreach my $elem (@$location) { - print STDERR "_errloc_:[" . $elem . "]\n" . $msg . "\n"; - } - } - else { - print STDERR $msg . "\n"; + print STDERR "_errloc_:[" . join(" ",@{$location}) . "]\n"; } + print STDERR $msg . "\n"; } ############################################################ -- cgit v1.2.3