[Bps-public-commit] r16887 - in Shipwright/trunk: lib/Shipwright/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Nov 18 14:27:38 EST 2008
Author: sunnavy
Date: Tue Nov 18 14:27:35 2008
New Revision: 16887
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Source/CPAN.pm
Log:
r17791 at sunnavys-mb: sunnavy | 2008-11-19 03:26:22 +0800
we should try to use user's cpan config
Modified: Shipwright/trunk/lib/Shipwright/Source/CPAN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/CPAN.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Source/CPAN.pm Tue Nov 18 14:27:35 2008
@@ -10,6 +10,7 @@
use File::Temp qw/tempdir/;
use File::Slurp;
use CPAN::DistnameInfo;
+use File::HomeDir;
use base qw/Shipwright::Source::Base/;
@@ -37,6 +38,15 @@
require CPAN::Config;
}
+ unshift @INC, catdir( File::HomeDir->my_home, '.cpan' );
+ if ( Module::Info->new_from_module('CPAN::MyConfig') ) {
+
+ # keep user's CPAN::MyConfig too
+ require CPAN::MyConfig;
+ }
+ shift @INC;
+
+
mkdir catdir( $cpan_dir, 'CPAN' );
my $config_file = catfile( $cpan_dir, 'CPAN', 'MyConfig.pm' );
More information about the Bps-public-commit
mailing list