[Bps-public-commit] r18422 - Shipwright/trunk/lib/Shipwright/Backend

jesse at bestpractical.com jesse at bestpractical.com
Mon Feb 16 19:08:26 EST 2009


Author: jesse
Date: Mon Feb 16 19:08:26 2009
New Revision: 18422

Modified:
   Shipwright/trunk/lib/Shipwright/Backend/Base.pm

Log:
Extract Module::Build installation out into a method

Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm	Mon Feb 16 19:08:26 2009
@@ -76,19 +76,11 @@
         $clean_inc_path )
       or confess "copy Shipwright/Util/CleanINC.pm failed: $!";
 
-    my $module_build_path = catdir( $dir, 'inc', 'Module', );
-    mkpath catdir( $module_build_path, 'Build' );
-    copy( catdir( Module::Info->new_from_module('Module::Build')->file),
-            $module_build_path ) or confess "copy Module/Build.pm failed: $!";
-    dircopy(
-        catdir(
-            Module::Info->new_from_module('Module::Build')->inc_dir, 'Module',
-            'Build'
-        ),
-        catdir( $module_build_path, 'Build' )
-      )
-      or confess "copy
-        Module/Build failed: $!";
+
+    
+    $self->_install_module_build($dir);
+
+
 
     # set proper permissions for yml under /shipwright/
     my $sw_dir = catdir( $dir, 'shipwright' );
@@ -110,6 +102,26 @@
     return $dir;
 }
 
+sub _install_module_build {
+    my $self = shift;
+    my $dir = shift;
+    my $module_build_path = catdir( $dir, 'inc', 'Module', );
+    mkpath catdir( $module_build_path, 'Build' );
+    copy( catdir( Module::Info->new_from_module('Module::Build')->file),
+            $module_build_path ) or confess "copy Module/Build.pm failed: $!";
+    dircopy(
+        catdir(
+            Module::Info->new_from_module('Module::Build')->inc_dir, 'Module',
+            'Build'
+        ),
+        catdir( $module_build_path, 'Build' )
+      )
+      or confess "copy
+        Module/Build failed: $!";
+
+
+}
+
 =item import
 
 import a dist.



More information about the Bps-public-commit mailing list