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

'use warnings' with exceptions

Thread Next
From:
David Cantrell
Date:
January 27, 2020 11:19
Subject:
'use warnings' with exceptions
Message ID:
20200127110341.GA28353@bytemark.barnyard.co.uk
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About