diff --git a/Changes b/Changes index a0e33b4..4a6a635 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for CPAN-Mini {{$NEXT}} + if the config file does not exist, do not die or spew warnings; this + fixes RT #57388 1.100630 2010-03-04 07:57:34 America/New_York suppress "using config..." during setup with -qq diff --git a/lib/CPAN/Mini.pm b/lib/CPAN/Mini.pm index 60330bb..09d8075 100644 --- a/lib/CPAN/Mini.pm +++ b/lib/CPAN/Mini.pm @@ -646,11 +646,15 @@ sub read_config { my $config_file = $class->config_file($options); + return unless defined $config_file; + # This is ugly, but lets us respect -qq for now even before we have an # object. I think a better fix is warranted. -- rjbs, 2010-03-04 $class->trace("Using config from $config_file\n") unless $options->{quiet}; + return unless -e $config_file; + open my $config_fh, '<', $config_file or die "couldn't open config file $config_file: $!";