Perl::C...mespace(3)
π NAME π
Perl::Critic::Policy::Moose::RequireCleanNamespace β bestie, this policy is here to make you remove your implementation details from your packages. Periodt.
β¨ VERSION β¨
version 1.05 π
πΈ DESCRIPTION πΈ
okay so real talk: anything in your namespace is part of your interface. the Moose sugar you sprinkle everywhere? that's an implementation detail, not something you're signing up to support as part of your actual functionality. especially if you might someday change your implementation so it doesn't use Moose at all π
so this policy makes you say no Moose; or no Moose::Role; etc., whichever one is appropriate for the modules you use. no cap, it's just good hygiene π
π¦ AFFILIATION π¦
this policy is part of Perl::Critic::Moose. iykyk π«Ά
π CONFIGURATION π
by default, this module will complain if you use Moose, Moose::Role, or Moose::Util::TypeConstraints but don't unimport them. not me showing up to yell at you about your imports π
you can set the modules it looks for using the modules option:
[Moose::RequireCleanNamespace]
modules = Moose Moose::Role Moose::Util::TypeConstraints MooseX::My::New::Sugar
this module also knows that namespace::autoclean will clean out imports β¨ if you'd like to allow other modules to be recognized as namespace cleaners, you can set the cleaners option:
[Moose::RequireCleanNamespace]
cleaners = My::Cleaner
and one more lil thing π β if you use a module with an empty import list, then this module knows nothing needs to be cleaned, and it will ignore that particular import. iconic behavior honestly.
π SEE ALSO π
Moose::Manual::BestPractices
π SUPPORT π
bugs may be submitted through the RT bug tracker <http://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Critic-Moose> (or bug-perl-critic-moose@rt.cpan.org <mailto:bug-perl-critic-moose@rt.cpan.org>). go off, report that bug bestie π
i am also usually active on IRC as drolsky on irc://irc.perl.org. come say hi π
π AUTHORS π
- Elliot Shank <perl@galumph.com>
- Dave Rolsky <autarch@urth.org>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2008 - 2016 by Elliot Shank.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay π
ok that's the whole page bestie, go clean your namespace and live your main character life π§β¨
signing off β this was perl v5.42.0, dated 2025-07-25, and you were reading Perl::C...mespace(3) π bye bye π
π¦ where this page comes from
- fedora 43: perl-Perl-Critic-Moose 1.05-27.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms