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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Jul 23 04:09:45 EDT 2008


Author: sunnavy
Date: Wed Jul 23 04:09:45 2008
New Revision: 14426

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Script/Import.pm
   Shipwright/trunk/lib/Shipwright/Source/Base.pm

Log:
 r14890 at sunnavys-mb:  sunnavy | 2008-07-23 15:12:42 +0800
 trans source.yml as url.yml in source directory


Modified: Shipwright/trunk/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Import.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Import.pm	Wed Jul 23 04:09:45 2008
@@ -115,6 +115,11 @@
             $shipwright->backend->map || {},
         );
 
+        Shipwright::Util::DumpFile(
+            $shipwright->source->url_path,
+            $shipwright->backend->source || {},
+        );
+
         $source = $shipwright->source->run(
             copy => { '__require.yml' => $self->require_yml }, );
 

Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm	Wed Jul 23 04:09:45 2008
@@ -59,6 +59,7 @@
     my $cwd          = getcwd;
     my $require_path = File::Spec->catfile( $path, '__require.yml' );
     my $map          = {};
+    my $url          = {};
 
     unless ( $self->min_perl_version ) {
         no warnings 'once';
@@ -72,6 +73,10 @@
         $map = Shipwright::Util::LoadFile( $self->map_path );
     }
 
+    if ( -e $self->url_path ) {
+        $url = Shipwright::Util::LoadFile( $self->url_path );
+    }
+
     if ( !-e $require_path ) {
 
         # if not found, we'll create one according to Build.PL or Makefile.PL
@@ -188,7 +193,7 @@
                 my $name = $module;
 
                 if ( $self->_is_skipped($module) ) {
-                    unless ( defined $map->{$module} ) {
+                    unless ( defined $map->{$module} || defined $url->{$module} ) {
 
                 # not in the map, meaning it's not been imported before,
                 # so it's safe to erase it
@@ -248,6 +253,7 @@
                     if ( -e $self->map_path ) {
                         $map = Shipwright::Util::LoadFile( $self->map_path );
                     }
+
                 }
 
                 # convert required module name to dist name like cpan-Jifty-DBI



More information about the Bps-public-commit mailing list