Index: lib/Module/Install/Admin/ScanDeps.pm
===================================================================
--- lib/Module/Install/Admin/ScanDeps.pm (revision 9930)
+++ lib/Module/Install/Admin/ScanDeps.pm (working copy)
@@ -9,7 +9,7 @@
}
sub scan_dependencies {
- my ($self, $pkg, $perl_version) = @_;
+ my ($self, $pkg, $perl_version, $pkg_version) = @_;
return if $pkg eq 'perl';
@@ -25,7 +25,7 @@
die "Module::CoreList has no information on perl $perl_version"
unless exists $Module::CoreList::version{$perl_version};
- if (my $min_version = Module::CoreList->first_release($pkg)) {
+ if (my $min_version = Module::CoreList->first_release($pkg, $pkg_version)) {
return if $min_version <= $perl_version;
}
Index: lib/Module/Install/Admin/Include.pm
===================================================================
--- lib/Module/Install/Admin/Include.pm (revision 9930)
+++ lib/Module/Install/Admin/Include.pm (working copy)
@@ -17,8 +17,8 @@
}
sub include_deps {
- my $self = shift;
- my $deps = $self->admin->scan_dependencies($_[0]) or return;
+ my ($self, $module, $version) = @_;
+ my $deps = $self->admin->scan_dependencies($module, $self->perl_version, $version) or return;
foreach my $key ( sort keys %$deps ) {
$self->include($key);
}
@@ -39,12 +39,13 @@
sub auto_include_deps {
my $self = shift;
foreach my $module (
- map { $_->[0] }
+ map { $_ }
map { @$_ }
grep { $_ }
$self->build_requires
) {
- $self->include_deps($module);
+ my ($name, $version) = @{$module};
+ $self->include_deps($name, $version);
}
}