Subject: | Modules::RequireExplicitInclusion with __PACKAGE__ |
Date: | Sun, 15 Feb 2009 11:19:27 -0600 |
To: | bug-Perl-Critic-StricterSubs [...] rt.cpan.org |
From: | Elliot Shank <perl [...] galumph.com> |
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';