Closed haarg closed 1 month ago
Looks good, but can we also remove the require IO::File
code from sub file_magic
? As far as I can tell, this is pre-5.6 compatibility logic. (In fact, it was for perl-5.004 compat: commit ab6f8ca1958822c.)
Looks good, but can we also remove the
require IO::File
code fromsub file_magic
? As far as I can tell, this is pre-5.6 compatibility logic. (In fact, it was for perl-5.004 compat: commit ab6f8ca.)
I would recommend that that be done in a separate pull request, as this pull request is in response to a BBC situation.
Modernize the file handle use by using a lexical.
Using a bareword file handle actually led to a test failure in the CPAN module Patro. It uses an improper CORE::GLOBAL::flock override with an incorrect prototype. This prevents the use of barewords with flock(). While the bug here is in the CPAN module, avoiding bareword file handles will allow those tests to pass.