X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=README;h=53a90fff916491178982e0c477adcd3aef3682d1;hb=99d2e6b61c03d29efc6848f563f67308cb0da816;hp=ee8a034940df77b81899763b8e06fa641776f18d;hpb=6c0ece9ba4e73a0f83be4fc6e92072995fd21696;p=p5sagit%2Fnamespace-clean.git diff --git a/README b/README index ee8a034..53a90ff 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME namespace::clean - Keep imports and functions out of your namespace VERSION - 0.03 + 0.06 SYNOPSIS package Foo; @@ -49,6 +49,16 @@ DESCRIPTION By unimporting via "no" you can tell "namespace::clean" to start collecting functions for the next "use namespace::clean;" specification. + You can use the "-except" flag to tell "namespace::clean" that you don't + want it to remove a certain function or method. A common use would be a + module exporting an "import" method along with some functions: + + use ModuleExportingImport; + use namespace::clean -except => [qw( import )]; + + If you just want to "-except" a single sub, you can pass it directly. + For more than one value you have to use an array reference. + METHODS You shouldn't need to call any of these. Just "use" the package at the appropriate place. @@ -81,7 +91,8 @@ IMPLEMENTATION DETAILS will remove the "foo" symbol from $SomePackage for run time lookups (e.g., method calls) but will leave the entry alive to be called by - already resolved names in the package itself. + already resolved names in the package itself. "namespace::clean" will + restore and therefor in effect keep all glob slots that aren't "CODE". A test file has been added to the perl core to ensure that this behaviour will be stable in future releases.