Modern-Perl icon indicating copy to clipboard operation
Modern-Perl copied to clipboard

Consider using perl version as default

Open poti1 opened this issue 2 years ago • 0 comments

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.

poti1 avatar Jul 14 '22 04:07 poti1