[Bast-commits] r6546 - local-lib/1.000/trunk/eg

hdp at dev.catalyst.perl.org hdp at dev.catalyst.perl.org
Mon Jun 8 19:44:49 GMT 2009


Author: hdp
Date: 2009-06-08 19:44:47 +0000 (Mon, 08 Jun 2009)
New Revision: 6546

Modified:
   local-lib/1.000/trunk/eg/scripted_install.pl
Log:
make TARGET optional

Modified: local-lib/1.000/trunk/eg/scripted_install.pl
===================================================================
--- local-lib/1.000/trunk/eg/scripted_install.pl	2009-06-08 11:14:08 UTC (rev 6545)
+++ local-lib/1.000/trunk/eg/scripted_install.pl	2009-06-08 19:44:47 UTC (rev 6546)
@@ -6,14 +6,14 @@
 use CPAN;
 use Cwd;
 use File::Spec;
-my $target = Cwd::abs_path($ENV{TARGET})
-  or die "set \$ENV{TARGET} to your desired local::lib dir\n";
+my $target = $ENV{TARGET} ? Cwd::abs_path($ENV{TARGET}) : undef;
 
 my $mod = CPAN::Shell->expand(Module => "local::lib");
 $mod->get;
 my $dir = CPAN::Shell->expand(Distribution => $mod->cpan_file)->dir;
 chdir($dir);
 my $make = $CPAN::Config->{make};
-system($^X, 'Makefile.PL',"--bootstrap=$target") && exit 1;
+my $bootstrap = $target ? "--bootstrap=$target" : "--bootstrap"
+system($^X, 'Makefile.PL', $bootstrap) && exit 1;
 system($make, 'test') && exit 1;
 system($make, 'install') && exit 1;




More information about the Bast-commits mailing list