[Bps-public-commit] r17122 - in Shipwright/trunk: lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Dec 6 06:42:16 EST 2008


Author: sunnavy
Date: Sat Dec  6 06:41:22 2008
New Revision: 17122

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Source/CPAN.pm

Log:
 r18044 at sunnavys-mb:  sunnavy | 2008-12-06 19:39:54 +0800
 improve error msg if can not find module in cpan


Modified: Shipwright/trunk/lib/Shipwright/Source/CPAN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/CPAN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/CPAN.pm	Sat Dec  6 06:41:22 2008
@@ -86,7 +86,13 @@
         $compressed->run(@_);
     }
     elsif ( $self->source =~ /\S/ ) {
-        confess 'invalid source: ' . $self->source;
+        my $error = q{invalid source: can't find '} . $self->source . q{'};
+        if ( $self->version ) {
+            $error .= ' version ' . $self->version;
+        }
+       
+        $error .= ' in your CPAN mirror(s)' . " [@{$CPAN::Config->{urllist}}].";
+        confess $error;
     }
 }
 



More information about the Bps-public-commit mailing list