X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnamespace%2Fclean.pm;h=d31d2a82ba6d8ef568e79d8df7f67f3ea5a2740b;hb=d6aecfbf3b72bb46d52032f696415e93a22dc5ab;hp=91d0be4bf53abfbb1be898e84f93b230cf679d5b;hpb=52bbba50a157d0e29ad24054603399a16494ff17;p=p5sagit%2Fnamespace-clean.git
diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm
index 91d0be4..d31d2a8 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 B::Hooks::EndOfScope;
+use Stash::Manip;
+use Sub::Identify qw(sub_fullname);
+use Sub::Name qw(subname);
=head1 VERSION
-0.10
+0.13
=cut
-$VERSION = 0.10;
+$VERSION = '0.14';
$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