table of contents
Perl::Critic::Policy::Community::POSIXImports(3pm) | User Contributed Perl Documentation | Perl::Critic::Policy::Community::POSIXImports(3pm) |
NAME¶
Perl::Critic::Policy::Community::POSIXImports - Don't use POSIX without specifying an import list
DESCRIPTION¶
The POSIX module imports hundreds of symbols (functions and constants) by default for backwards compatibility reasons. To avoid this, and to assist in finding where functions have been imported from, specify the symbols you want to import explicitly in the "use" statement. Alternatively, specify an empty import list with "use POSIX ()" to avoid importing any symbols, and fully qualify the functions or constants, such as "POSIX::strftime".
use POSIX; # not ok use POSIX (); # ok use POSIX 'fcntl'; # ok use POSIX qw(O_APPEND O_CREAT O_EXCL O_RDONLY O_RDWR O_WRONLY); # ok
AFFILIATION¶
This policy is part of Perl::Critic::Community.
CONFIGURATION¶
This policy is not configurable except for the standard options.
AUTHOR¶
Dan Book, "dbook@cpan.org"
COPYRIGHT AND LICENSE¶
Copyright 2015, Dan Book.
This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.
SEE ALSO¶
Perl::Critic
2022-07-25 | perl v5.40.0 |