From: Dave Rolsky Date: Thu, 14 Oct 2010 19:10:18 +0000 (-0500) Subject: Clarify carp level use X-Git-Tag: v0.05~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba614f876aff0624a07e7a18509064bc8099e6d5;p=gitmo%2FPackage-DeprecationManager.git Clarify carp level use --- diff --git a/lib/Package/DeprecationManager.pm b/lib/Package/DeprecationManager.pm index 423c104..a0fa4a0 100644 --- a/lib/Package/DeprecationManager.pm +++ b/lib/Package/DeprecationManager.pm @@ -109,6 +109,8 @@ sub _build_warn { $warned{$package}{ $args{feature} }{$msg} = 1; + # We skip at least two levels. One for this anon sub, and one for the + # sub calling it. local $Carp::CarpLevel = $Carp::CarpLevel + $skipped; Carp::cluck($msg);