Modern-Perl
Modern-Perl copied to clipboard
Consider using perl version as default
Modern::Perl defaults to v5.12 (bug!?)
I'm on perl 5.36 and am using Modern::Perl
.
I see that it does not work like the -E flag
on the command line to automatically use the latest version.
Perhaps consider using the latest available version when one is not provided or base it off of the perl version.
perl -E 'say $^V'
v5.36.0
perl -Modern::Perl -e 'say Modern::Perl::validate_date(2022)'
:5.34
perl -Modern::Perl -e 'say Modern::Perl::validate_date()'
:5.12
perl -Modern::Perl=2022 -e 'sub abc ($n) {$n}'
perl -Modern::Perl -e 'sub abc ($n) {$n}'
Illegal character in prototype for main::abc : $n at -e line 1.
Global symbol "$n" requires explicit package name (did you forget to declare "my $n"?) at -e line 1.
Execution of -e aborted due to compilation errors.