[Catalyst-commits] r10384 - trunk/examples/SmokeServer/script
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat May 30 03:00:34 GMT 2009
Author: caelum
Date: 2009-05-30 03:00:34 +0000 (Sat, 30 May 2009)
New Revision: 10384
Modified:
trunk/examples/SmokeServer/script/cpan_installdeps.pl
Log:
significantly speed up smoker dep installer
Modified: trunk/examples/SmokeServer/script/cpan_installdeps.pl
===================================================================
--- trunk/examples/SmokeServer/script/cpan_installdeps.pl 2009-05-30 02:14:36 UTC (rev 10383)
+++ trunk/examples/SmokeServer/script/cpan_installdeps.pl 2009-05-30 03:00:34 UTC (rev 10384)
@@ -21,6 +21,13 @@
closedir $dists;
+# set up CPAN
+CPAN::HandleConfig->load;
+$CPAN::Config->{auto_commit} = 0;
+@{$CPAN::Config->{urllist}} or
+ $CPAN::Config->{urllist} = [ q[http://www.perl.org/CPAN] ];
+$CPAN::Config->{prerequisites_policy} = q[follow];
+
# make sure we have the latest CPAN to get 'notest'
CPAN::Shell->install('CPAN');
@@ -28,22 +35,12 @@
chdir "$dir/$dist";
# stolen from confound at https://trac.opensourcery.com/public/elementalclinic/browser/trunk/build_scripts/deps/install
-# run in a subshell because CPAN gets confused about "." and chdir
- system $^X.q{ -e '
- use CPAN;
- CPAN::HandleConfig->load;
- $CPAN::Config->{auto_commit} = 0;
- @{$CPAN::Config->{urllist}} or
- $CPAN::Config->{urllist} = [ q[http://www.perl.org/CPAN] ];
- $CPAN::Config->{prerequisites_policy} = q[follow];
- my $dist = CPAN::Shell->expandany(q(.));
- $dist->make;
- for my $p ($dist->unsat_prereq("later")) {
- my ($name) = @$p;
- CPAN::Shell->notest(install => $name);
- }
- '};
- die $@ if $@;
+ my $d = CPAN::Shell->expandany("$dir/$dist/.");
+ $d->make;
+ for my $p ($d->unsat_prereq("later")) {
+ my ($name) = @$p;
+ CPAN::Shell->notest(install => $name);
+ }
system "make realclean";
}
More information about the Catalyst-commits
mailing list