From 5a0770be180872c53bfb6188397e5efc380d53d1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 26 May 2003 14:01:22 +0000 Subject: use formatError to display the error message (to have a better error message than "SCALAR(0x....) at ...") --- perl-install/commands | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-install/commands b/perl-install/commands index c37a180c7..adbf7f594 100755 --- a/perl-install/commands +++ b/perl-install/commands @@ -9,7 +9,10 @@ use commands; my $progname = basename($0); -# hack as some functions are defined by perl... so chmod -> chmod_ -&{$commands::{$progname} || $commands::{$progname . "_"} || \&err}(@ARGV), exit 0; +eval { + # hack as some functions are defined by perl... so chmod -> chmod_ + &{$commands::{$progname} || $commands::{$progname . "_"} || \&err}(@ARGV), exit 0; +}; +die formatError($@) . "\n"; sub err { die "$0: unknown program (unimplemented)\n" } -- cgit v1.2.1