[Bps-public-commit] r10422 - bpsbuilder/Shipwright/lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jan 22 08:51:33 EST 2008


Author: sunnavy
Date: Tue Jan 22 08:51:32 2008
New Revision: 10422

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

Log:
for back compatibility

Modified: bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm
==============================================================================
--- bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm	(original)
+++ bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm	Tue Jan 22 08:51:32 2008
@@ -78,6 +78,14 @@
     }
 
     if ( my $require = Shipwright::Config::LoadFile($require_path) ) {
+# if not have 'requires' key, all the keys in $require are supposed to be
+# requires type
+        if ( !$require->{requires} ) {
+            for my $module ( keys %$require ) {
+                $require->{requires}{$module}{version} =
+                  delete $require->{$module};
+            }
+        }
         for my $type (qw/requires recommends build_requires/) {
             for my $module ( keys %{ $require->{$type} } ) {
                 # we don't want to require perl



More information about the Bps-public-commit mailing list