[Bioperl-l] a thought on Bio::Root::Build

Mark A. Jensen maj at fortinbras.us
Fri Jan 23 15:49:57 UTC 2009


Is it a reasonable convenience for the user who has run ./Build.PL
with a non-default set of install directories to ask CPAN::Shell
to use those directories when installing prerequisites (unless 
the user's MyConfig.pm is saying something else)? The following
does this in a prob not very robust way (but it seems to work):

Index: Build.pm
===================================================================
--- Build.pm (revision 15402)
+++ Build.pm (working copy)
@@ -445,7 +445,13 @@
         
         # Save this because CPAN will chdir all over the place.
         my $cwd = Cwd::cwd();
-        
+        unless ($$CPAN::Config{makebuildpl_arg}) {
+     $$CPAN::Config{mbuildpl_arg} = "--installdirs ".$self->installdirs;
+ }
+ unless ($$CPAN::Config{makepl_arg}) {
+     $$CPAN::Config{makepl_arg} = "INSTALLDIRS=".$self->installdirs;
+ }
+
         CPAN::Shell->install($desired);
         my $msg;
         my $expanded = CPAN::Shell->expand("Module", $desired);




More information about the Bioperl-l mailing list