http://www.perlmonks.org?node_id=471264


in reply to Re^3: Can I force strictness on included files?
in thread Can I force strictness on included files?

It catches typos. My post was motivated by being bitten earlier today by a missing sigil and a resulting unwanted bareword. use strict would have made that error immediately obvious. So of course, I added the use strict in that particular file, but I'd like to have it everywhere now.

Will Perl 6 be strict by default ?

Replies are listed 'Best First'.
Perl6 and default strictness
by jonadab (Parson) on Jun 30, 2005 at 11:00 UTC
    Will Perl 6 be strict by default?

    The answer to this is not as simple as 'yes' or 'no'. What do you mean by "by default"? What do you mean by "Perl6"? The Perl6 compiler will, by default, assume it is being fed Perl5 code... Also, the details have changed at least once since they were originally given; the original thinking was that a Perl6 package declaration would trigger strictness by default, so that modules would be strict by default, but other Perl6 code, by default, would not be. The current (last I checked) thinking is that -e will turn off strictness by default, but otherwise it will be on by default for Perl6 code, unless you change it. It will still be off by default for Perl5 code, which is the default, for compatibility reasons, so I guess you could say that the default default in Perl6 is for strictures to be off, but the Perl6 default is for them to be on. (If you're not confused yet, you should definitely subscribe to perl6-language.)