develooper Front page | perl.perl5.porters | Postings from June 2021

Re: use warnings ':most'

Thread Previous | Thread Next
Dan Book
June 6, 2021 07:05
Re: use warnings ':most'
Message ID:
On Sun, Jun 6, 2021 at 2:38 AM Eric Brine <> wrote:

> On Wed, Jun 2, 2021 at 7:02 PM Leon Timmermans <> wrote:
>> I would like to propose to add a new warning category, tentatively named
>> "most". This would include everything in :all except warnings that are
>> likely to give false positives. In 5.36 that would be :all minus 'once'
> "once" is exactly the kind of warning a newcomer should have enabled.
> A user performing advanced symbol table manipulation has no problems
> turning off "once" when needed.
> Secondly, I want «use warnings» without a tag to do :most instead of :all
> This is backwards incompatible, and it hurts newcomers.
> The advanced user will know to use :most if that's what they want. The
> newcomer is suddenly told about fewer likely problems.

If not enabled by default, ':most' is entirely pointless. The purpose is to
improve the default when applied via bare 'use warnings' or 'use VERSION',
since that is what almost all code uses.

Changes to warnings do not break compatibility by policy. This doesn't mean
we should change them willy nilly, and changes to the interface can still
break compatibility, but warnings themselves are added and adjusted in
every release, removing them from the default is the same.

'once' warnings are not useful to newcomers, as they only (unreliably)
occur when writing code that uses package variables.


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