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.