Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic-StricterSubs CPAN distribution.

Report information
The Basics
Id: 62184
Status: resolved
Priority: 0/
Queue: Perl-Critic-StricterSubs

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.04



Subject: ProhibitCallsToUndeclaredSubs vs more than two imports
Date: Sat, 16 Oct 2010 11:30:44 +1100
To: bug-Perl-Critic-StricterSubs [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
If an import list has three or more literal strings only the first and last seem to be used, use Some::Thing 'foo', 'bar', 'quux', 'xyzzy'; my $w = foo(123); my $x = bar(123); my $y = quux(123); my $z = xyzzy(123); reports foo.pl:3:9: Perl::Critic::Policy::Subroutines::ProhibitCallsToUndeclaredSubs Subroutine "bar" is neither declared nor explicitly imported my $x = bar(123); foo.pl:4:9: Perl::Critic::Policy::Subroutines::ProhibitCallsToUndeclaredSubs Subroutine "quux" is neither declared nor explicitly imported my $y = quux(123); where I expected no reports. I wonder if _get_imports_from_use_statements() ``@schildren[2,-2]'' should be a range instead of just the 2 and -2 elements.
I concur. A fix was committed as SVN revision 3970. Thanks for the failing snippet, which got pasted into the test suite for this policy.
This has finally been released as Perl-Critic-StricterSubs-0.04 https://metacpan.org/release/Perl-Critic-StricterSubs Thanks for your patience.