From 997fbf5986136dfd2a2a81ec692fd575ce66478c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Aug 2002 19:28:03 +0000 Subject: give a meaning to the return value of cdie --- MDK/Common/Func.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'MDK/Common/Func.pm') diff --git a/MDK/Common/Func.pm b/MDK/Common/Func.pm index 6578010..56e032a 100644 --- a/MDK/Common/Func.pm +++ b/MDK/Common/Func.pm @@ -280,10 +280,12 @@ sub catch_cdie(&&) { } sub cdie { - my ($err, $f) = @_; + my ($err) = @_; foreach (@MDK::Common::Func::cdie_catches) { $@ = $err; - &{$_}(\$err) and return; + if (my $v = &{$_}(\$err)) { + return $v; + } } die $err; } -- cgit v1.2.1