Closed sciurius closed 2 years ago
It didn't get lost -- this was a previous author's approach to preventing warnings from getting printed. I think it was meant to read as "don't print any warnings, ever, of any kind, especially these."
I've been enabling warnings in the various modules as I've been updating the code. As of the last time I checked, though, the root PDF::API2 module still has a fair bit of code that assumes that Perl won't complain about uninitialized/undefined values.
I think it is okay to disable warnings about uninitialized/undefined values. But disabling all warnings seems a bit overkill and incorrect.
FWIW, I've added a use warnings
before the no warnings
and my tests do not throw up warnings. Well, except for one warning that pointed out a programming error (of mine) that would otherwise have been very hard to find.
At the start of PDF::API2:
Certain warnings are disabled, but warnings are not enabled. Did the line
use warnings;
got lost?