develooper Front page | perl.perl5.porters | Postings from January 2020

'use warnings' with exceptions

Thread Next
David Cantrell
January 27, 2020 11:19
'use warnings' with exceptions
Message ID:
I was recently annoyed by having to write this:

  use warnings;
  no warnings 'redefine';

in a module that was just a monkey-patch (and yes, I've raised a ticket
with the original author so I can delete this evil file). Surely, I
thought, it should be possible to do something like this:

  use warnings qw(-foo -bar);

to mean "import all the warnings except foo and bar". But it seems not
to be. Before I put fingers to keyboard and implement it does anyone
think it's a terrible idea?

David Cantrell

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About