From: Peter Rabbitson Date: Wed, 3 Aug 2011 21:04:54 +0000 (+0200) Subject: Strictures and changelogging X-Git-Tag: 0.21~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b026c56f169641f024652b823e67ebb934ba63a;p=p5sagit%2Fnamespace-clean.git Strictures and changelogging --- diff --git a/Changes b/Changes index 6d79367..1490679 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ + - When using the tie() fallback ensure we do not obliterate a + foreign tie() + - Better document how to disable the tie() fallback + [0.20_01] (the "mst made me do it" release) - Only invoke the deleted sub stashing if we run udner a debugger (avoid runtime penalty of Sub::Name/Sub::Identify) diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm index ab08964..95a9ce1 100644 --- a/lib/namespace/clean.pm +++ b/lib/namespace/clean.pm @@ -13,6 +13,9 @@ $STORAGE_VAR = '__NAMESPACE_CLEAN_STORAGE'; BEGIN { + use warnings; + use strict; + # when changing also change in Makefile.PL my $b_h_eos_req = '0.07'; @@ -31,12 +34,18 @@ BEGIN { { package namespace::clean::_TieHintHash; + use warnings; + use strict; + use base 'Tie::ExtraHash'; } { package namespace::clean::_ScopeGuard; + use warnings; + use strict; + sub arm { bless [ $_[1] ] } sub DESTROY { $_[0]->[0]->() }