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

Re: use warnings ':most'

Thread Previous | Thread Next
From:
Dan Book
Date:
June 3, 2021 15:16
Subject:
Re: use warnings ':most'
Message ID:
CABMkAVVznnAazWvhgyJzriY_dp-QFVZkqsbvvP+tFgXZQEkgbg@mail.gmail.com
On Thu, Jun 3, 2021 at 8:54 AM David Cantrell <david@cantrell.org.uk> wrote:

> On Thu, Jun 03, 2021 at 01:02:25AM +0200, 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',
> > but I can imagine more warnings being added to :all in the future that
> > wouldn't be appropriate for :most.
> >
> > Secondly, I want «use warnings» without a tag to do :most instead of
> :all,
> > and likewise «use 5.36;».
>
> While I think that a 'most' category is a good idea, I'm not so sure
> that we could get agreement on what should be in it!
>
> And now that we have negative imports on the warnings pragma is it
> needed so much?
>
> Your preferred 'most' can be expressed as ...
>
>     use warnings qw(all -once);
>
> My preferred 'most' can be expressed as ...
>
>     use warnings qw(all -redefine -experimental::signatures);
>

The purpose is not to appease a preference (as there are clearly many of
those and they can call warnings.pm how they want), but to change the
behavior of 'use warnings;' and eventually 'use VERSION;' by default. The
proposal here is that 'once' would not be included by default.

-Dan

Thread Previous | 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