X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnamespace%2Fclean.pm;h=8c6a156bbbb544fffcbb02ddf714a0be7e52cce9;hb=32ffc8cb2f6e62f6e9bc9468820ac61d098e71b8;hp=214bbb0f34931e90d03f48da49a78fb1708c651f;hpb=cc1392b6a1432a887bb0f284acfecb932221cd27;p=p5sagit%2Fnamespace-clean.git
diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm
index 214bbb0..8c6a156 100644
--- a/lib/namespace/clean.pm
+++ b/lib/namespace/clean.pm
@@ -10,16 +10,18 @@ use warnings;
use strict;
use vars qw( $VERSION $STORAGE_VAR $SCOPE_HOOK_KEY $SCOPE_EXPLICIT );
-use Symbol qw( qualify_to_ref );
+use Symbol qw( qualify_to_ref gensym );
use B::Hooks::EndOfScope;
+use Sub::Identify qw(sub_fullname);
+use Sub::Name qw(subname);
=head1 VERSION
-0.08
+0.13
=cut
-$VERSION = 0.09;
+$VERSION = '0.13';
$STORAGE_VAR = '__NAMESPACE_CLEAN_STORAGE';
=head1 SYNOPSIS
@@ -114,6 +116,27 @@ the installed C method. So your classes should look like:
Same goes for L.
+=head2 Cleaning other packages
+
+You can tell C that you want to clean up another package
+instead of the one importing. To do this you have to pass in the C<-cleanee>
+option like this:
+
+ package My::MooseX::namespace::clean;
+ use strict;
+
+ use namespace::clean (); # no cleanup, just load
+
+ sub import {
+ namespace::clean->import(
+ -cleanee => scalar(caller),
+ -except => 'meta',
+ );
+ }
+
+If you don't care about Cs discover-and-C<-except> logic, and
+just want to remove subroutines, try L.
+
=head1 METHODS
You shouldn't need to call any of these. Just C