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: 93007
Status: new
Priority: 0/
Queue: Perl-Critic-StricterSubs

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

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



Subject: Subroutines::ProhibitCallsToUnexportedSubs complains about fully qualified XS subs

I found two weird cases.

1.

use mro;

...

mro::get_lineraised_isa( $class )

 

 [Subroutines::ProhibitCallsToUnexportedSubs] Subroutine "get_linear_isa" not exported by "mro" at line 90, near 'mro::get_linear_isa(__PACKAGE__)'.  (Severity: 4)
 

K. I didn't ask for an import ...

2.

use Encode qw();

...
return Encode::decode( $force_encoding, $self->content, Encode::FB_CROAK );

[Subroutines::ProhibitCallsToUnexportedSubs] Subroutine "FB_CROAK" not exported by "Encode" at line 145, near '$force_encoding, $self->content, Encode::FB_CROAK'.  (Severity: 4)
 

Odd, because both cases I use  fully qualified terms, but it only complains about the latter.

And both _are_ exported, https://metacpan.org/source/DANKOGAI/Encode-2.57/Encode.pm#L36

But only warns about the latter. ( And I'm not relying on import anyway .. )

 

The only thing common in both is they're both XS subs, so anything relying on static analysis will fail.