GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::CleanNamespaces(3) User Contributed Perl Documentation Test::CleanNamespaces(3)

Test::CleanNamespaces - Check for uncleaned imports

version 0.24

    use strict;
    use warnings;
    use Test::CleanNamespaces;

    all_namespaces_clean;

This 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.

All functions are exported by default.

    namespaces_clean('YourModule', 'AnotherModule');

Tests every specified namespace for uncleaned imports. If the module couldn't be loaded it will be skipped.

    all_namespaces_clean;

Runs "namespaces_clean" for all modules in your distribution.

    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.

Uncleaned 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.

  • namespace::clean
  • namespace::autoclean
  • namespace::sweep
  • Sub::Exporter::ForMethods
  • Test::API
  • Sub::Name
  • Sub::Install
  • MooseX::MarkAsMethods
  • Dist::Zilla::Plugin::Test::CleanNamespaces

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-CleanNamespaces> (or bug-Test-CleanNamespaces@rt.cpan.org <mailto:bug-Test-CleanNamespaces@rt.cpan.org>).

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>.

Florian Ragwitz <rafl@debian.org>

  • Karen Etheridge <ether@cpan.org>
  • Graham Knop <haarg@haarg.org>

This 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.

2018-12-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.