develooper Front page | perl.perl5.porters | Postings from October 2015

Re: patches wanted: default warnings/strict

Thread Previous | Thread Next
October 17, 2015 18:17
Re: patches wanted: default warnings/strict
Message ID:
Abigail wrote:
>"perldoc -f warnings" talks about default warnings, (as opposed
>to optional warnings), but when it comes down to discussing
>the warnings category hierarchie, there's no peep about
>mandatory vs optional anymore.

That sense of "default warnings" is referring to warnings that are
enabled when there is no warnings pragma in scope.  For example,
deprecation warnings are default in this sense.

(The defaultness of warnings is actually being implemented twice. contains a $DEFAULT bitset, which is the starting value
for modifying ${^WARNING_BITS} when it was not previously set and $^W
is false.  This implements the default set of warnings where they have
been modified by category-specific pragmata, and it distinguishes them
along category lines.  But when no pragmata at all are in scope, the
core distinguishes default warnings based on whether the warning code
calls Perl_ck_warner_d() rather than Perl_ck_warner(), a method that is
not constrained to match category boundaries.  I think we should merge
these two into a single mechanism that determines defaultness based
purely on category.)

(Also, ought to document which categories constitute default

This means that using "default" as the name of a warnings category or
pseudo-category would be confusing.  The category that "use warnings;"
invokes, if it's not correctly described as "all", might be described as
"recommended" or somesuch.


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