Search results for "module:Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles"
Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles - Write open my $fh, q{<}, $filename; instead of open FH, q{<}, $filename;.
Using bareword symbols to refer to file handles is particularly evil because they are global, and you have no idea if that symbol already points to some other file handle. You can mitigate some of that risk by "local"izing the symbol first, but that'...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC
Perl::Critic::Policy::Community::BarewordFilehandles - Don't use bareword filehandles other than built-ins
Bareword filehandles are allowed in "open()" as a legacy feature, but will use a global package variable. Instead, use a lexical variable with "my" so that the filehandle is scoped to the current block, and will be automatically closed when it goes o...
DBOOK/Perl-Critic-Community-v1.0.3 - 24 Jul 2022 06:28:31 UTC
Perl::Critic::Policy::InputOutput::ProhibitBarewordDirHandles - Write opendir my $dh, $dirname; instead of opendir DH, $dirname;.
Using bareword symbols to refer to directory handles is particularly evil because they are global, and you have no idea if that symbol already points to some other file or directory handle. You can mitigate some of that risk by "local"izing the symbo...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC