From 080a8401fcb33fa4a0372db3017edf84fb902868 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 1 Aug 2007 21:03:12 +0000 Subject: (find_index) pinpoint the actual bug (ie the caller) (all other die should probably be altered the same way) --- lib/MDK/Common/Func.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/MDK/Common/Func.pm b/lib/MDK/Common/Func.pm index 82811bb..12e8777 100644 --- a/lib/MDK/Common/Func.pm +++ b/lib/MDK/Common/Func.pm @@ -258,7 +258,8 @@ sub find_index(&@) { $_ = $_[$i]; &$f and return $i; } - die "find_index failed in @_"; + use Carp; + carp("find_index failed in @_") } sub map_each(&%) { my ($f, %h) = @_; -- cgit v1.2.1