Subject: | InputOutput::RequireBriefOpen false positive |
The following code triggers a false positive with the latest Perl::Critic (1.119):
#!/usr/bin/perl
use strict;
use warnings;
sub work () {
my($path, $fh);
$path = "/foo/bar";
open($fh, "<", $path) or die();
binmode($fh) or die();
generate($path, $fh);
close($fh) or die();
}
foo:7:5 Close filehandles as soon as possible after opening them [4@InputOutput::RequireBriefOpen]
Older versions (e.g. 1.105) do not report any problem wrt open().