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

for 5.24: new categories for strict/warnings?

Thread Next
From:
Ricardo Signes
Date:
June 3, 2015 13:15
Subject:
for 5.24: new categories for strict/warnings?
Message ID:
20150603131504.GA4151@cancer.codesimply.com
What is preventing us from changing the meaning of:

  use strict;    # which acts like: use strict 'all'
  use warnings;  # which means    : use warnings 'all'

Why not make them mean:

  use strict 'default';
  use warnings 'default';

We discussed this, for warnings, in the thread
http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225066.html

'all' can remain available in warnings.pm and be made available in strict.pm,
although I'd personally discourage turning 'all' on, except maybe in private
testing, for the sake of forward compatibility.  Yes, some existing code may be
affected because it says "use warnings 'all'" explicitly, but we already add
new kinds of warnings, we're just very circumspect in doing so -- as we'd
continue to be in adding default warnings.  No existing code does "use strict
'all'" because there is no "all" yet.

With this in place, we can add more strictures and less-critical warnings
without the worry that they're breaking old programs, because old programs
won't have them enabled.

(Meanwhile, "no warnings;" and "no strict;" should act on 'all', of course.)

-- 
rjbs

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