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

Re: Questions to all proponents of Strict-By-Default

Thread Previous | Thread Next
L A Walsh
April 1, 2021 05:28
Re: Questions to all proponents of Strict-By-Default
Message ID:
On 2021/03/31 13:36, Chad Granum wrote:
> In the last 10ish years or so, maybe longer, people actually test the 
> warnings from their modules.
> It is a fun thought exercise though, props for the creative thinking!
    When 5.18 came on the scene, Ricardo pushed through mandatory/default
warnings for deprecation even though I insisted that it would break code
that treated warnings as fatal.  I was overruled, being told that relying
on no warnings or treating them as Fatal would not be supported.

In particular, this quote from the warnings manpage:

   NOTE: Users of FATAL warnings, especially those using "FATAL => 'all'"
   should be fully aware that they are risking future portability of their
   programs by doing so. ...
   Code that may not warn now may warn in a future release of Perl if
   the Perl5 development team deems it in the best interests of the
   community to do so. 
   Should code using FATAL warnings break due to the introduction of a new
   warning we will NOT consider it an incompatible change.

It's is not like perl's warnings are handed down from POSIX.  They are
without any standard, so anyone relying on them is doing so at their own

    FWIW, I'd only activate warnings about stricture violations if the user
chose 'use warnings' (as well as use 5.xx.yy).  I'd also think it logical
that they'd be in their own category.  I don't see anything extremely
upsetting to enable a category of warnings for strictures when warnings are

    Most of the example progs I've seen showing neat features, don't bother
turning on warnings or or requiring strict.  So it seems like folding some
warnings about strict into warnings would be reasonable/logical and keeping
use strict; as an escalation into fatal (besides other mechanisms for doing

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