1Test::CleanNamespaces(3U)ser Contributed Perl DocumentatiToenst::CleanNamespaces(3)
2
3
4

NAME

6       Test::CleanNamespaces - Check for uncleaned imports
7

VERSION

9       version 0.24
10

SYNOPSIS

12           use strict;
13           use warnings;
14           use Test::CleanNamespaces;
15
16           all_namespaces_clean;
17

DESCRIPTION

19       This module lets you check your module's namespaces for imported
20       functions you might have forgotten to remove with namespace::autoclean
21       or namespace::clean and are therefore available to be called as
22       methods, which usually isn't want you want.
23

FUNCTIONS

25       All functions are exported by default.
26
27   namespaces_clean
28           namespaces_clean('YourModule', 'AnotherModule');
29
30       Tests every specified namespace for uncleaned imports. If the module
31       couldn't be loaded it will be skipped.
32
33   all_namespaces_clean
34           all_namespaces_clean;
35
36       Runs "namespaces_clean" for all modules in your distribution.
37
38   find_modules
39           my @modules = Test::CleanNamespaces->find_modules;
40
41       Returns a list of modules in the current distribution. It'll search in
42       "blib/", if it exists. "lib/" will be searched otherwise.
43
44   builder
45           my $builder = Test::CleanNamespaces->builder;
46
47       Returns the "Test::Builder" used by the test functions.
48

KNOWN ISSUES

50       Uncleaned imports from Mouse classes are incompletely detected, due to
51       its lack of ability to return the correct method list -- it assumes
52       that all subs are meant to be callable as methods unless they
53       originated from (were imported by) one of: Mouse, Mouse::Role,
54       Mouse::Util, Mouse::Util::TypeConstraints, Carp, Scalar::Util, or
55       List::Util.
56

SEE ALSO

58       •   namespace::clean
59
60       •   namespace::autoclean
61
62       •   namespace::sweep
63
64       •   Sub::Exporter::ForMethods
65
66       •   Test::API
67
68       •   Sub::Name
69
70       •   Sub::Install
71
72       •   MooseX::MarkAsMethods
73
74       •   Dist::Zilla::Plugin::Test::CleanNamespaces
75

SUPPORT

77       Bugs may be submitted through the RT bug tracker
78       <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-
79       CleanNamespaces> (or bug-Test-CleanNamespaces@rt.cpan.org <mailto:bug-
80       Test-CleanNamespaces@rt.cpan.org>).
81
82       There is also a mailing list available for users of this distribution,
83       at <http://lists.perl.org/list/perl-qa.html>.
84
85       There is also an irc channel available for users of this distribution,
86       at "#perl" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>.
87

AUTHOR

89       Florian Ragwitz <rafl@debian.org>
90

CONTRIBUTORS

92       •   Karen Etheridge <ether@cpan.org>
93
94       •   Graham Knop <haarg@haarg.org>
95
97       This software is copyright (c) 2009 by Florian Ragwitz.
98
99       This is free software; you can redistribute it and/or modify it under
100       the same terms as the Perl 5 programming language system itself.
101
102
103
104perl v5.34.0                      2021-07-23          Test::CleanNamespaces(3)
Impressum