NAME

Perl::Critic::Policy::Lax::RequireExplicitPackage::ExceptForPragmata

VERSION

version 0.006

DESCRIPTION

This policy is meant to replace Modules::RequireExplicitPackage. That policy's POD says:

In general, the first statement of any Perl module or library should be a
package statement.  Otherwise, all the code that comes before the package
statement is getting executed in the caller's package, and you have no idea
who that is.  Good encapsulation and common decency require your module to
keep its innards to itself.

Sure, that's swell for code that has effect at a package level, but some statements are lexical. This policy makes allowance for just one of those cases: turning on strictures, warnings, and diagnostics.

This module understands the exempt_scripts configuration parameter just like Perl::Critic::Policy::Modules::RequireExplicitPackage.

AUTHOR

Ricardo SIGNES <rjbs@cpan.org>

Adapted from Modules::RequireExplicitPackage by Jeffrey Ryan Thalhammer.

COPYRIGHT

Copyright (c) 2006 Ricardo SIGNES and Jeffrey Ryan Thalhammer.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.