in reply to Re: My confession - I'm now strict-ing...
in thread My confession - I'm now strict-ing...
In particular, any code that runs fine with strict, will continue to run fine, and in exactly the same way, if you remove the line use strict;.
Most of the time, yes. But not always.
use strict 'refs'; has a run-time effect. There can be programs that rely on symbolic references throwing an error. A program can rely on such behaviour.
use 5.010; sub ok { # remove the "use strict;" and try again... use strict; local $@; eval { $_[0]->[0]; 1 }; } say ok('foo');
It is unlikely that this code appears like this in production somewhere, but it can very well be hidden somewhere less obvious.
|
|---|