On Feb 11, 2008, at 1:20 PM, Michael G Schwern wrote:

I believe you want to send this along to the CPAN bug tracker. perl- qa is for quality assurance (testing) issues.
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN

But it's trivial to do yourself.

        use CPAN;

        for my $name (@ARGV) {
                my $mod = CPAN::Shell->expand("Module", $name);

                unless( $mod ) {
                        warn "Unknown module $name.  Aborting.\n";
                        last;
                }

                next if $mod->uptodate;              # already up to date

                unless( CPAN::Shell->install($mod) ) {
                        warn "Installing $name failed.  Aborting.\n";
                        last;
                }
        }

p1: thanks to the various responders for advice, and for pointing to the rt.cpan.org URL.

p2: the above demonstration code is reasonable, as is, but does not take into account the problem if $mod has a requirement for Foo::Bar which in turn requires Bob::Jones. And the failure with Bob::Jones does not bubble back up to the 'install($mod)'...

so that it can be trapped and the process aborted.


as an illustration of one that I ran into:

<<
Warning: Prerequisite 'Test::Compile => 0.07' for 'U/US/USERPUBS/ OurModuleRedacted-2.06.tar.gz' failed when processing 'M/MA/MARCEL/ Test-Compile-0.08.tar.gz' with 'make => NO cannot resolve circular dependency'. Continuing, but chances to succeed are limited.
>>

it would be simpler if that failure could cause the cpan utility to stop right, for us to figure out and fix.

a.f.hampe





Reply via email to