WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Module/Install/Admin/ScanDeps.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Please first specify a required perl version, like this:
perl_version('5.005');
END_MESSAGE
$perl_version =~ s{^(\d+)\.(\d+)\.(\d+)}{$1 + $2/1_000 + $3/1_000_000}e;
$perl_version = 0 + $perl_version;

require Module::ScanDeps;
require Module::CoreList;
Expand Down
23 changes: 23 additions & 0 deletions t/35_perl_version.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
use Test::More;

my @existing_versions = ( qw(5.005 5.01 5.010 5.0100 5.01000 5.010000 5.10.0
5.010.000) );
my @missing_versions = ( qw(5.005002 5.5.2) );
plan tests => 1 + @existing_versions + @missing_versions;

require_ok( 'Module::Install::Admin::ScanDeps' );
my $m = Module::Install::Admin::ScanDeps->new;

for my $version (@existing_versions) {
eval { $m->scan_dependencies(q{Carp}, $version, q{0}) };
ok(!$@, "scan_dependencies() can query core modules for $version Perl");
}
for my $version (@missing_versions) {
eval { $m->scan_dependencies(q{Carp}, $version, q{0}) };
ok($@, "scan_dependencies() cannot query core modules for $version Perl");
}