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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Feb 10 08:24:15 EST 2008


Author: sunnavy
Date: Sun Feb 10 08:24:14 2008
New Revision: 10789

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

Log:
rename _make_maps to _update_map

Modified: Shipwright/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/lib/Shipwright/Source/Base.pm	Sun Feb 10 08:24:14 2008
@@ -250,7 +250,7 @@
     chdir $cwd;
 }
 
-sub _make_maps {
+sub _update_map {
     my $self   = shift;
     my $module = shift;
     my $dist   = shift;

Modified: Shipwright/lib/Shipwright/Source/CPAN.pm
==============================================================================
--- Shipwright/lib/Shipwright/Source/CPAN.pm	(original)
+++ Shipwright/lib/Shipwright/Source/CPAN.pm	Sun Feb 10 08:24:14 2008
@@ -26,24 +26,24 @@
     my $self  = $class->SUPER::new(@_);
     CPAN::Config->use;
 
-#    mkdir File::Spec->catfile( $cpan_dir, 'CPAN' );
-#    my $config_file = File::Spec->catfile( $cpan_dir, 'CPAN', 'MyConfig.pm' );
-#
-#    unless ( -f $config_file ) {
-#        $CPAN::Config->{cpan_home} = File::Spec->catfile($cpan_dir);
-#        $CPAN::Config->{build_dir} = File::Spec->catfile( $cpan_dir, 'build' );
-#        $CPAN::Config->{histfile} =
-#          File::Spec->catfile( $cpan_dir, 'histfile' );
-#        $CPAN::Config->{keep_source_where} =
-#          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'] ) );
-#
-#    }
-#    require CPAN::MyConfig;
+    mkdir File::Spec->catfile( $cpan_dir, 'CPAN' );
+    my $config_file = File::Spec->catfile( $cpan_dir, 'CPAN', 'MyConfig.pm' );
+
+    unless ( -f $config_file ) {
+        $CPAN::Config->{cpan_home} = File::Spec->catfile($cpan_dir);
+        $CPAN::Config->{build_dir} = File::Spec->catfile( $cpan_dir, 'build' );
+        $CPAN::Config->{histfile} =
+          File::Spec->catfile( $cpan_dir, 'histfile' );
+        $CPAN::Config->{keep_source_where} =
+          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'] ) );
+
+    }
+    require CPAN::MyConfig;
     return $self;
 }
 
@@ -78,7 +78,7 @@
 
     my $dist = CPAN::DistnameInfo->new( $module->cpan_file )->dist;
     $self->name( 'cpan-' . $dist );
-    $self->_make_maps( $self->source, 'cpan-' . $dist );
+    $self->_update_map( $self->source, 'cpan-' . $dist );
 
     $self->source(
         File::Spec->catfile(



More information about the Bps-public-commit mailing list