[Bps-public-commit] r10770 - Shipwright/lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Feb 8 00:58:47 EST 2008


Author: sunnavy
Date: Fri Feb  8 00:58:46 2008
New Revision: 10770

Modified:
   Shipwright/lib/Shipwright/Source/CPAN.pm

Log:
set a default urllist for CPAN config

Modified: Shipwright/lib/Shipwright/Source/CPAN.pm
==============================================================================
--- Shipwright/lib/Shipwright/Source/CPAN.pm	(original)
+++ Shipwright/lib/Shipwright/Source/CPAN.pm	Fri Feb  8 00:58:46 2008
@@ -24,7 +24,7 @@
 sub new {
     my $class = shift;
     my $self  = $class->SUPER::new(@_);
-    CPAN::Config->use or warn 'CPAN::Config not found';
+    CPAN::Config->use;
 
     mkdir File::Spec->catfile( $cpan_dir, 'CPAN' );
     my $config_file = File::Spec->catfile( $cpan_dir, 'CPAN', 'MyConfig.pm' );
@@ -38,6 +38,7 @@
           File::Spec->catfile( $cpan_dir, 'sources' );
         $CPAN::Config->{prefs_dir} = File::Spec->catfile( $cpan_dir, 'prefs' );
         $CPAN::Config->{prerequisites_policy} = 'follow';
+        $CPAN::Config->{urllist} ||= [];
         write_file( $config_file,
             Data::Dumper->Dump( [$CPAN::Config], ['$CPAN::Config'] ) );
 



More information about the Bps-public-commit mailing list