Subject: | Modules::RequireExplicitInclusion with __PACKAGE__ |
The policy says that __PACKAGE__ should be imported before use, but
__PACKAGE__ already exists always.
use Test::Simple tests => 1;
use Perl::Critic qw();
my $violation = Perl::Critic->new('-single-policy' =>
'Modules::RequireExplicitInclusion')->critique(\<<'PERL');
use Moose;
__PACKAGE__->meta->make_immutable;
PERL
ok !$violation, 'exempts __PACKAGE__ from inclusion';