Perl::Critic::Policy::Subroutines::ProhibitCallsToUnexportedSubs
This policy is part of Perl::Critic::StricterSubs.
Many Perl modules define their public interface by exporting subroutines via Exporter. The goal of this Policy is to enforce encapsulation by by prohibiting calls to subroutines that are not listed in the callee's @EXPORT or @EXPORT_OK.
@EXPORT
@EXPORT_OK
This Policy does not properly deal with the only pragma or modules that don't use Exporter for their export mechanism, such as CGI. In the near future, we might fix this by allowing you configure the policy with a list of packages that are exempt from this policy.
Subroutines::ProhibitCallsToUnexportedSubs: Cannot find source file
This warning usually indicates that the file under analysis includes modules that are not installed in this perl's <@INC> paths. See "CONFIGURATION" for controlling the @INC list this Policy.
@INC
This warning can also happen when one of the included modules contains multiple packages, or if the package name doesn't match the file name. Perl::Critic advises against both of these conditions, and has additional Policies to help enforce that.
Perl::Critic::Policy::Modules::ProhibitMultiplePackages
Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage
Jeffrey Ryan Thalhammer <thaljef@cpan.org>
Copyright (c) 2007 Jeffrey Ryan Thalhammer. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.
To install Perl::Critic::StricterSubs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::StricterSubs
CPAN shell
perl -MCPAN -e shell install Perl::Critic::StricterSubs
For more information on module installation, please visit the detailed CPAN module installation guide.