From 371c4ed4d3e30c6b6dc7a3569b1cae6ed6166464 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 18 Feb 2011 16:15:24 +0000 Subject: [PATCH] In deprecate.pm, only cluck() once if the leaf isn't found in the caller stack. Previously, if the expected leafname was not found in the caller stack, the code was cluck, and then continue the loop with the next directories to scan. However, this serves no useful purpose, as the loop changes nothing that causes the failure condition, hence all that this would result in is a second cluck() if the next scanned directories also happened to match. Now the core returns immediately. --- lib/deprecate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/deprecate.pm b/lib/deprecate.pm index b5f1793..9afa3dc 100644 --- a/lib/deprecate.pm +++ b/lib/deprecate.pm @@ -34,7 +34,7 @@ sub import { Carp::cluck(<<"EOM"); Can't find use/require $expect_leaf in caller stack EOM - next; + return; } # This is fragile, because it -- 2.7.4