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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Dec 18 15:04:42 EST 2007


Author: sunnavy
Date: Tue Dec 18 15:04:34 2007
New Revision: 9993

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

Log:
added map config in case the auto map is not enough

Modified: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Base.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm	Tue Dec 18 15:04:34 2007
@@ -10,7 +10,7 @@
 
 use base qw/Class::Accessor::Fast/;
 __PACKAGE__->mk_accessors(
-    qw/source directory download_directory follow min_perl_version map_path skip/
+    qw/source directory download_directory follow min_perl_version map_path skip map/
 );
 
 =head2 new

Modified: bpsbuilder/BPB/lib/BPB/Source/CPAN.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/CPAN.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/CPAN.pm	Tue Dec 18 15:04:34 2007
@@ -57,6 +57,13 @@
 sub _run {
     my $self = shift;
     return if $self->source eq 'perl';    # don't expand perl it self;
+
+    for ( keys %{ $self->map } ) {
+        if ( $self->source =~ /$_/ ) {
+            $self->{source} = $self->map->{$_};
+        }
+    }
+
     my $module = CPAN::Shell->expand( 'Module', $self->source );
 
     croak 'invalid module name: ' . $self->source unless $module;



More information about the Bps-public-commit mailing list