Permalink
Browse files

Merge pull request #178 from hoelzro/master

Fix a bug when using --installdeps and a dependency has a cpanfile
  • Loading branch information...
2 parents ec0719e + b703aa0 commit 9ba4e7d0b358ecf385d176aaa9f4bf6c04513efc @miyagawa committed Nov 16, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/App/cpanminus/script.pm
@@ -1286,7 +1286,7 @@ sub build_stuff {
$self->diag_progress("Configuring $target");
- my $configure_state = $self->configure_this($dist);
+ my $configure_state = $self->configure_this($dist, $depth);
$self->diag_ok($configure_state->{configured_ok} ? "OK" : "N/A");
@@ -1389,9 +1389,9 @@ DIAG
}
sub configure_this {
- my($self, $dist) = @_;
+ my($self, $dist, $depth) = @_;
- if (-e 'cpanfile' && $self->{installdeps}) {
+ if (-e 'cpanfile' && $self->{installdeps} && $depth == 0) {
require Module::CPANfile;
$dist->{cpanfile} = eval { Module::CPANfile->load('cpanfile') };
return {
@@ -1464,10 +1464,10 @@ sub configure_this {
unless ($state->{configured_ok}) {
while (1) {
my $ans = lc $self->prompt("Configuring $dist->{dist} failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?", "s");
- last if $ans eq 's';
- return $self->configure_this($dist) if $ans eq 'r';
- $self->show_build_log if $ans eq 'e';
- $self->look if $ans eq 'l';
+ last if $ans eq 's';
+ return $self->configure_this($dist, $depth) if $ans eq 'r';
+ $self->show_build_log if $ans eq 'e';
+ $self->look if $ans eq 'l';
}
}

0 comments on commit 9ba4e7d

Please sign in to comment.