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

Re: Idea for new warning - scalar assignment from @_

Thread Previous
From:
Dave Mitchell
Date:
January 15, 2020 14:29
Subject:
Re: Idea for new warning - scalar assignment from @_
Message ID:
20200115142854.GU9181@iabyn.com
On Wed, Jan 15, 2020 at 12:56:36PM +0100, Paul Johnson wrote:
> I'm not convinced by the "use warnings FATAL => 'all'" argument though.
> There are dire warnings in the docs about doing this and so I really
> think that if you do it then you get what you ask for.  We can't keep
> painting ourselves into backwards compatibility corners.

We've had a couple of VERY vocal people (who I shall not name) come on
this list and accuse us generally of trying to destroy perl etc because
their code had FATAL enabled and we added a new warning.

Possibly a way forward would be to tie any new warnings to the perl
version they were first added. So:

    use warnings;
    $a = @_; # doesn't warn

    use warnings;
    use 5.32.0;
    $a = @_; # warns

-- 
"There's something wrong with our bloody ships today, Chatfield."
    -- Admiral Beatty at the Battle of Jutland, 31st May 1916.

Thread Previous


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