From: Mike Taylor Date: Wed, 25 Oct 2006 15:42:47 +0000 (+0000) Subject: Die if a callback returns an unknown value. This is important, since X-Git-Tag: CPAN-v1.02~54^2~859 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=0508e915338044bdb04d302ae2c5c7745a98338b;hp=4f35abdf2907b2bf567a5708fb6f032d1d2560ea 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. --- 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'"; } }