Closed jkeenan closed 3 years ago
short answer: yes we can remove strict
from these files
longer one: I would prefer to wait a little before removing the useless use strict
and use warnings
, as I think this will makes our process to submit existing changes to blead easier.
I would do it late in the development process.
short answer: yes we can remove
strict
from these files longer one: I would prefer to wait a little before removing the uselessuse strict
anduse warnings
, as I think this will makes our process to submit existing changes to blead easier.I would do it late in the development process.
Fair enough, I did remove use strict
from two files I patched this morning, but will refrain from doing so for other files in ext
and dist
until further discussion.
It seems to me to be make work to remove these lines. I don't understand the motivation
It seems to me to be make work to remove these lines. I don't understand the motivation
When we set out to work on this project in June, our objective was (and still largely is) a proof-of-concept, namely, "This is what the Perl core distribution would like if (for example) strict was on by default."
Well, if strict is on by default, you shouldn't need to declare it at the top of any file. You should only need it if, for some reason, you needed to relax strictures at some point in the file and later wanted to enforce them again.
So the clearest possible way to demonstrate this is to strip out use strict;
at the top of most files.
Now, as the discussion in this ticket back in July suggests, we later realized that files located in the dist/
and cpan/
directories should retain use strict;
because they either originate on CPAN (cpan/
) or are actually or potentially releasable to CPAN (dist/
). So we've been leaving use strict;
in those files even though in the "Perl 7" strict-by-default world such statements are superfluous.
That leaves the files in ext/
. They're not released to CPAN (or, at least, they're not supposed to be released to CPAN) so they're completely under the control of the core distribution. So in those files use strict;
can be removed. And it's not "make work"; it's pretty much just a one-liner, probably this:
find ext -type f | ack -i '\.(p[lm]|t)$' | xargs perl -pi -e 's{^use strict;$}{}'
... which I'll take care of tomorrow.
Thank you very much. Jim Keenan
See branch jkeenan/gha-104-ext-strict and https://github.com/atoomic/perl/pull/293
There are 235 files underneath
ext/
in which the stringuse strict;
can be found.Files under
ext/
are maintained in blead. They are not separately released to CPAN. (Or, at least, they should not be. If they are separately released, they should be indist/
.)In Perl 7,
use strict;
will be on by default. That should mean that that string can be removed -- correct?The list: