atoomic / perl

a repo to show what could be p7
Other
18 stars 8 forks source link

dual life modules should not use logic proper to perl 7 #130

Open atoomic opened 4 years ago

atoomic commented 4 years ago

To avoid some blockers, I've patched multiple dual life and enforce them to use syntax they should not use such as: :prototype, function signatures, p5/p7...

This needs to be address in a cleaner way.

jkeenan commented 4 years ago

This weekend I went through the code base excising use p5; from many modules and test files. Much of that work is already in p7. Some I'm still working on locally and have not yet submitted a p.r.

Among other things, I went through the cpan/ directory and began the process of removing use p5; there. I was actually pleasantly surprised by how rapid the work of repairing files went. It was much easier going than the "core" test directories.

But perhaps I shouldn't have been surprised. CPAN authors have been under more pressure to use strict and warnings over the past 20 years than Perl 5 Porters has been. And if a CPAN module is already strict-and-warnings-compliant, it's 90% on the road to being Perl 7-compliant.

The one caveat to that is CPAN modules and tests that use prototypes. In the Test-Simple distribution for example, all the remaining test failures when run against a Perl 7 executable are do this problem.

atoomic commented 4 years ago

The main issue with the cpan/ directory is that we would have to submit a patch upstream and wait for a release...

As discussed recently function signatures (view https://github.com/Perl/perl5/wiki/SC-Notes-2020-07-14#on-by-default) are not going to be turned on by default, so the prototype issue would be fix the second we remove function signature from the default list of features. I'm currently experimenting with it via p7-lite branch