DESCRIPTIONThis module lets you check your module's namespaces for imported functions you might have forgotten to remove with namespace::autoclean or namespace::clean and are therefore available to be called as methods, which usually isn't want you want.
FUNCTIONSAll functions are exported by default.
Tests every specified namespace for uncleaned imports. If the module couldn't be loaded it will be skipped.
Runs ``namespaces_clean'' for all modules in your distribution.
METHODSThe exported functions are constructed using the the following methods. This is what you want to override if you're subclassing this module.
my $coderef = Test::CleanNamespaces->build_namespaces_clean;
Returns a coderef that will be exported as "namespaces_clean" (or the specified sub name, if provided).
my $coderef = Test::CleanNamespaces->build_all_namespaces_clean;
Returns a coderef that will be exported as "all_namespaces_clean". (or the specified sub name, if provided). It will use the "find_modules" method to get the list of modules to check.
my @modules = Test::CleanNamespaces->find_modules;
Returns a list of modules in the current distribution. It'll search in "blib/", if it exists. "lib/" will be searched otherwise.
my $builder = Test::CleanNamespaces->builder;
Returns the "Test::Builder" used by the test functions.
KNOWN ISSUESUncleaned imports from Mouse classes are incompletely detected, due to its lack of ability to return the correct method list --- it assumes that all subs are meant to be callable as methods unless they originated from (were imported by) one of: Mouse, Mouse::Role, Mouse::Util, Mouse::Util::TypeConstraints, Carp, Scalar::Util, or List::Util.
SUPPORTBugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-CleanNamespaces> (or [email protected] <mailto:[email protected]>).
There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/perl-qa.html>.
There is also an irc channel available for users of this distribution, at "#perl" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>.
AUTHORFlorian Ragwitz <[email protected]>
COPYRIGHT AND LICENCEThis software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.