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

Re: patches wanted: default warnings/strict

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
October 19, 2015 02:35
Subject:
Re: patches wanted: default warnings/strict
Message ID:
20151019023523.GB18956@cancer.codesimply.com
* Aristotle Pagaltzis <pagaltzis@gmx.de> [2015-10-18T16:11:15]
> So, have you thought about which one you’ll be using for your own code
> once this is out in the wild? Do you have an idea for what kind of thing
> will be a non-`default` warning, and when you will be enabling that kind
> of warning? Or when you’ll recommend to others to enable it?

I plan to keep writing "use warnings" and "use strict" until we have actual new
categories.  When we get new categories, and determine they can't be on by
default, then I'll decide one of these things:

* I want to use them all the time
* I want to use them sometimes
* I won't

If I don't, great!  I'm done.

In the other cases, I will need to update my code.  Either I'll make an editor
macro for "use warnings qw(:standard pseudocolons)" or I'll make a little
pragma to enable the warnings I want to use.  (Prediction: the former for CPAN
code, the latter for bespoke work code.)

Really, is there an alternative?  If we admit that we may want new warnings to
be available, but not turned on by "use warnings;", and that they can only be
added to the core, then it is going to be the case that the user will need to
add something to request them.  This strategy just avoids the needless
multiplication of interfaces to do that.

-- 
rjbs

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