Subject: | non-installing causes a boom |
Small bug which leads to a distressing failure case (in that it looks ugly and scares small children).
Attached is brute-force fix.
Before:
Installing: Template
Module Template already up to date; won't install without force!
Can't use an undefined value as a HASH reference at /usr/local/perl5.8.0/lib/site_perl/5.8.0/CPANPLUS/Shell/Default.pm line 435.
in CPANPLUS::Shell::Default::_input_loop at Fri Oct 3 18:06:28 2003 at /usr/local/perl5.8.0/lib/site_perl/5.8.0/CPANPLUS/Shell/Default.pm line 765
After:
Installing: Template
Module Template already up to date; won't install without force!
All modules installed successfully
--
Richard Clamp <richardc@unixbeard.net>
--- .cpan/build/CPANPLUS-0.044/lib/CPANPLUS/Shell/Default.pm 2003-08-31 20:31:55.000000000 +0100
+++ /usr/local/perl5.8.1/lib/site_perl/5.8.1/CPANPLUS/Shell/Default.pm 2003-10-03 18:05:08.000000000 +0100
@@ -431,8 +431,10 @@
}
my $flag;
- for ( @list ) {
- $flag++ unless $href->rv->{$_}
+ if (ref $href->rv) {
+ for ( @list ) {
+ $flag++ unless $href->rv->{$_}
+ }
}
if( $href->ok and !$flag ) {