summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-18 16:15:24 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-18 18:21:12 +0000
commit371c4ed4d3e30c6b6dc7a3569b1cae6ed6166464 (patch)
treecdcae1465c99ac30d54502815769e9125520eb77 /lib
parentef35b8f9beb00e91a540c31feaa3e68208b82d7c (diff)
downloadperl-371c4ed4d3e30c6b6dc7a3569b1cae6ed6166464.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/deprecate.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/deprecate.pm b/lib/deprecate.pm
index b5f1793395..9afa3dcc5d 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