[Bps-public-commit] r10192 - bpsbuilder/BPB/lib/BPB/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Dec 30 08:47:00 EST 2007


Author: sunnavy
Date: Sun Dec 30 08:46:59 2007
New Revision: 10192

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

Log:
we can set source for each module in require.yml, while 'CPAN' means we can get that module from CPAN

Modified: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Base.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm	Sun Dec 30 08:46:59 2007
@@ -115,8 +115,18 @@
             }
 
             unless ( grep { $name eq $_ } @sources ) {
-                my $cpan = BPB::Source->new( %$self, source => $module );
-                $cpan->run();
+                my $s;
+                if (   $require->{$module}{source}
+                    && $require->{$module}{source} ne 'CPAN' )
+                {
+                    $s =
+                      BPB::Source->new( %$self,
+                        source => $require->{$module}{source} );
+                }
+                else {
+                    $s = BPB::Source->new( %$self, source => $module );
+                }
+                $s->run();
             }
 
             # reload map



More information about the Bps-public-commit mailing list