[Catalyst-commits] r10378 - trunk/examples/SmokeServer/script
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat May 30 00:00:36 GMT 2009
Author: caelum
Date: 2009-05-30 00:00:36 +0000 (Sat, 30 May 2009)
New Revision: 10378
Added:
trunk/examples/SmokeServer/script/cpan_installdeps.pl
Log:
cpan dep installer for smoker, thanks to confound++
Added: trunk/examples/SmokeServer/script/cpan_installdeps.pl
===================================================================
--- trunk/examples/SmokeServer/script/cpan_installdeps.pl (rev 0)
+++ trunk/examples/SmokeServer/script/cpan_installdeps.pl 2009-05-30 00:00:36 UTC (rev 10378)
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use FindBin '$Bin';
+use CPAN;
+
+BEGIN {
+ $ENV{PERL_MM_USE_DEFAULT} = 1;
+}
+
+my $dir = "$Bin/../cpan/extracted";
+
+opendir my($dists), $dir;
+
+my @dists = grep !/^\.\.?\z/, readdir $dists;
+my @dist_names = @dists;
+s/-\d.*// for @dist_names;
+my %dists;
+ at dists{@dist_names} = @dists;
+
+closedir $dists;
+
+# make sure we have the latest CPAN to get 'notest'
+CPAN::Shell->install('CPAN');
+
+for my $dist (@dists) {
+ 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 $@;
+}
+
+print "************ DONE ***************\n";
Property changes on: trunk/examples/SmokeServer/script/cpan_installdeps.pl
___________________________________________________________________
Name: svn:executable
+ *
More information about the Catalyst-commits
mailing list