Subject: | Subroutines::ProhibitCallsToUndeclaredSubs with version numbers in import spec |
Date: | Sun, 15 Feb 2009 11:21:40 -0600 |
To: | bug-Perl-Critic-StricterSubs [...] rt.cpan.org |
From: | Elliot Shank <perl [...] galumph.com> |
The policy says that the symbol has not been explicitely declared in
the import spec in the test below, even though it has been.
use Test::Simple tests => 1;
use Perl::Critic qw();
my $violation = Perl::Critic->new('-single-policy' =>
'Subroutines::ProhibitCallsToUndeclaredSubs')->critique(\<<'PERL');
use HTTP::Status '5.817' => qw(HTTP_INTERNAL_SERVER_ERROR);
say HTTP_INTERNAL_SERVER_ERROR;
PERL
ok !$violation, 'recognises imports declared after a minimum version
number';
(Original bug against Perl-Critic https://rt.cpan.org/Ticket/Display.html?id=43310)