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

Re: use warnings ':most'

Thread Previous | Thread Next
From:
=?UTF-8?Q?Salvador_Fandi=c3=b1o?=
Date:
June 3, 2021 07:20
Subject:
Re: use warnings ':most'
Message ID:
84681f06-87d4-4534-fb8b-fd475c11ae9d@gmail.com
On 3/6/21 1:02, 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;».

What would happen with user defined warning categories?

For instance, imagine Foo defines its own warnings

     use 5.36;
     use Foo qw(foo_number); # calls "use warnings::register Foo"
                             # under the hood!

     foo_number("hello");

Would that generate a warning? Would Foo author be able to decide if Foo 
goes with ':most' or not?


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