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

for 5.24: new categories for strict/warnings?

Thread Next
Ricardo Signes
June 3, 2015 13:15
for 5.24: new categories for strict/warnings?
Message ID:
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

'all' can remain available in and be made available in,
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.)


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