exercism / perl5

Exercism exercises in Perl 5.
https://exercism.org/tracks/perl5
MIT License
28 stars 51 forks source link

Use Perl v5.38 features #583

Closed m-dango closed 1 year ago

m-dango commented 1 year ago

Temporarily based on top of another branch for clarity of changes.

glennj commented 1 year ago

Question: if v5.38 is now required, how is this still passing CI on the older perls?

m-dango commented 1 year ago

@glennj The template is slightly different for example solutions, where it enables features which are stable in 5.38 as experimental in older versions e.g. signatures. Almost everything used so far still goes back to compatibility with v5.20 as experimental features (and I'm more inclined to drop older versions which don't).

The only exception I can think of to that "almost" is that v5.38 no longer requires a true value at the end of a module file, so those have been removed from the stubs. I suspect for users running the files locally, use v5.38 would be enough of an encouragement to update to the latest version of Perl, and for those who don't, the error message is very clear that it needs to be added.

glennj commented 1 year ago

it enables features which are stable in 5.38 as experimental in older versions e.g. signatures

That is really cool!