# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
package CPAN;
-$VERSION = '1.76_60';
+$VERSION = '1.76_65';
$VERSION = eval $VERSION;
use CPAN::Version;
use File::Copy ();
use File::Find;
use File::Path ();
+use File::Spec;
+use File::Temp ();
use FileHandle ();
use Safe ();
+use Sys::Hostname;
use Text::ParseWords ();
use Text::Wrap;
-use File::Spec;
-use File::Temp ();
-use Sys::Hostname;
no lib "."; # we need to run chdir all over and we would get at wrong
# libraries there
$CPAN::Frontend->myprint(qq{ + _check_binary($binary)\n})
if $CPAN::DEBUG;
- $pid = open $readme, "-|", "which", $binary
- or $CPAN::Frontend->mydie(qq{Could not fork $binary: $!});
+ $pid = open $readme, "which $binary|"
+ or $CPAN::Frontend->mydie(qq{Could not fork 'which $binary': $!});
while (<$readme>) {
$out .= $_;
}
- close $readme;
+ close $readme or die "Could not run 'which $binary': $!";
$CPAN::Frontend->myprint(qq{ + $out \n})
if $CPAN::DEBUG && $out;
$CPAN::Frontend->myprint(qq{ERROR: problems while getting $url, $!\n})
unless defined($saved_file);
- $pid = open $readme, "-|", $html_converter, $saved_file
+ $pid = open $readme, "$html_converter $saved_file |"
or $CPAN::Frontend->mydie(qq{
-Could not fork $html_converter $saved_file: $!});
+Could not fork '$html_converter $saved_file': $!});
my $fh = File::Temp->new(
template => 'cpan_htmlconvert_XXXX',
suffix => '.txt',
$fh->print($_);
}
close $readme
- or $CPAN::Frontend->mydie(qq{Could not close file handle: $!});
+ or $CPAN::Frontend->mydie(qq{Could not run '$html_converter $saved_file': $!});
my $tmpin = $fh->filename;
$CPAN::Frontend->myprint(sprintf(qq{
Run '%s %s' and
Or you leave the CPAN shell and start it again.
+Or, if you're not really sure and just want to run some make, test or
+install command without this pesky error message, say C<force get
+Foo::Bar> first and then continue as always. C<Force get> I<forgets>
+previous error conditions.
+
For the really curious, by accessing internals directly, you I<could>
! delete CPAN::Shell->expand("Distribution", \