The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Perl::Critic::Policy::Subroutines::ProhibitCallsToUndeclaredSubs

AFFILIATION

This policy is part of Perl::Critic::StricterSubs.

DESCRIPTION

This Policy checks that every unqualified subroutine call has a matching subroutine declaration in the current file, or that it explicitly appears in the import list for one of the included modules.

LIMITATIONS

This Policy assumes that the file has no more than one package declaration and that all subs declared within the file are, in fact, declared into that same package. In most cases, violating either of these assumptions means you're probably doing something that you shouldn't do. Think twice about what you're doing.

Also, if you require a module and subsequently call the import method on that module, this Policy will not detect the symbols that might have been imported. In which case, you'll probably get bogus violations.

AUTHOR

Jeffrey Ryan Thalhammer <thaljef@cpan.org>

COPYRIGHT

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.