Subject: | Subroutines::ProhibitCallsToUndeclaredSubs with version numbers in import spec |
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';