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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Sep 23 20:50:53 EDT 2008


Author: sunnavy
Date: Tue Sep 23 20:50:52 2008
New Revision: 16042

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

Log:
 r16798 at sunnavys-mb:  sunnavy | 2008-09-24 08:06:05 +0800
 just skip the undefined module
 r16799 at sunnavys-mb:  sunnavy | 2008-09-24 08:32:47 +0800
 skip if we can't find the source of a dist
 r16811 at sunnavys-mb:  sunnavy | 2008-09-24 08:50:37 +0800
 tiny clean


Modified: Shipwright/trunk/lib/Shipwright/Script/Update.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Update.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Update.pm	Tue Sep 23 20:50:52 2008
@@ -124,6 +124,11 @@
             confess 'invalid name ' . $name . "\n";
         }
 
+        unless ( $s ) {
+            warn "can't find the source name of $name, skipping";
+            next;
+        }
+
         $shipwright->source(
             Shipwright::Source->new(
                 source  => "cpan:$s",

Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm	Tue Sep 23 20:50:52 2008
@@ -260,6 +260,9 @@
         for my $type (qw/requires recommends build_requires/) {
             for my $module ( keys %{ $require->{$type} } ) {
 
+#$module shouldn't be undefined, but it _indeed_ happens in reality sometimes
+                next unless $module;
+
                 # we don't want to require perl
                 if ( $module eq 'perl' ) {
                     delete $require->{$type}{$module};



More information about the Bps-public-commit mailing list