andk/cpanpm — pull request #52 by dagolden (2013-10-12 22:00:39+00:00)
Title: Fix retry recommend support

This implements the requires/recommends support that was reverted earlier. CPAN.pm's tests pass for me.

I also tested manually with these config options:

'build_requires_install_policy' => q[no],
'halt_on_failure' => q[1],
'recommends_policy' => q[1],
'suggests_policy' => q[1],

Of note, optional failures do not trigger `halt_on_failure` and required dependencies of optional dependencies stay optional and their failures do not cause problems either.

Here is an example of a live test with lots of recommends/suggests including some with intentional failures:

cpan[1]> test CPAN::Test::Dummy::Perl5::RecSug Path::Tiny
... [lots of stuff] ...
Result: PASS
DAGOLDEN/CPAN-Test-Dummy-Perl5-RecSug-0.001.tar.gz
/usr/bin/make test -- OK
... [lots of stuff] ...
Result: PASS
DAGOLDEN/Path-Tiny-0.041.tar.gz
/usr/bin/make test -- OK
Failures during this command:
(optional) DAGOLDEN/CPAN-Test-Dummy-Perl5-Make-FailLate-1.02.tar.gz: make NO
(optional) DAGOLDEN/CPAN-Test-Dummy-Perl5-Make-PerlReq-Fail-0.001.tar.gz: writemakefile NO '/Users/david/perl5/perlbrew/perls/perl-5.18.1/bin/perl Makefile.PL' returned status 65280
(optional) ANDK/CPAN-Test-Dummy-Perl5-Build-Fails-1.03.tar.gz: make_test NO