X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnamespace%2Fclean.pm;h=76bb92ebd3ae9d4a77c284b5db9967c619221d1a;hb=226432f602f11579ef0d87d70bbe31547bbd66aa;hp=2a9b255809bf1df7db815fef6c59cd5dd1483d3f;hpb=f423c7a996e4793ac3f3498ff9bd6a06c8e15160;p=p5sagit%2Fnamespace-clean.git
diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm
index 2a9b255..76bb92e 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.09
+0.11
=cut
-$VERSION = 0.09;
+$VERSION = '0.11';
$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