From 0508e915338044bdb04d302ae2c5c7745a98338b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 25 Oct 2006 15:42:47 +0000 Subject: [PATCH] Die if a callback returns an unknown value. This is important, since otherwise if you forget to explicitly return something, the loop will just fall through and the whole run will quietly end. --- lib/ZOOM/IRSpy.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index e3c4be4..06b223a 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.35 2006-10-20 14:49:11 mike Exp $ +# $Id: IRSpy.pm,v 1.36 2006-10-25 15:42:47 mike Exp $ package ZOOM::IRSpy; @@ -421,6 +421,8 @@ sub check { $nskipped += $n; } } + } else { + die "unknown callback return-value '$res'"; } } -- 1.7.10.4