Commit fa1d06b1 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Adding minimum version of Perl to cpanfile.

parent 8d6f92de
### Requirements ### Requirements
## ##
# Minimum version of Perl required.
# Notation suggested on https://metacpan.org/pod/Carton#PERL-VERSIONS
requires 'perl', '5.8.1';
# This module provides zip/unzip for archive and shared document download/upload # This module provides zip/unzip for archive and shared document download/upload
requires 'Archive::Zip', '>= 1.05'; requires 'Archive::Zip', '>= 1.05';
......
...@@ -490,14 +490,15 @@ Press the Enter key to continue..." ...@@ -490,14 +490,15 @@ Press the Enter key to continue..."
### REQ perl version ### REQ perl version
print "\n" . gettext('Checking for PERL version:') . "\n\n"; print "\n" . gettext('Checking for PERL version:') . "\n\n";
my $rpv = $cpan_modules{"perl"}{'required_version'}; # Compat. for perl < 5.10: $^V is not an object but a vector of integers.
if ($] >= $cpan_modules{"perl"}{'required_version'}) { my $rpv = eval 'v' . $cpan_modules{"perl"}{'required_version'} or die $@;
if ($^V ge $rpv) {
printf gettext('Your version of perl is OK (%s >= %s)') . "\n", $], printf gettext('Your version of perl is OK (%s >= %s)') . "\n", $],
$rpv; $cpan_modules{"perl"}{'required_version'};
} else { } else {
printf gettext( printf gettext(
"Your version of perl is TOO OLD (%s < %s)\nPlease INSTALL a new one !" "Your version of perl is TOO OLD (%s < %s)\nPlease INSTALL a new one !"
) . "\n", $], $rpv; ) . "\n", $], $cpan_modules{"perl"}{'required_version'};
} }
print "\n" . gettext('Checking for REQUIRED modules:') . "\n\n"; print "\n" . gettext('Checking for REQUIRED modules:') . "\n\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment