Fix test-external.pl
[gitmo/Mouse.git] / author / test-externals.pl
1 #!perl -w
2 use strict;
3 use FindBin qw($Bin);
4 use autodie;
5
6 my %dist = (
7     'HTTP-Engine' => q{git://github.com/http-engine/HTTP-Engine.git},
8     'Ark'         => q{git://github.com/typester/ark-perl.git},
9
10 #    'Any-Moose'   => q{git://github.com/sartak/any-moose.git}, # has no Makefile.PL :(
11 );
12
13 my $distdir = 'externals';
14
15 chdir $Bin;
16 mkdir $distdir if not -e $distdir;
17
18 $ENV{ANY_MOOSE} = 'Mouse';
19
20 while(my($name, $repo) = each %dist){
21     chdir "$Bin/$distdir";
22
23     print "Go $name ($repo)\n";
24
25     if(!(-e "$name")){
26         system "git clone $repo $name";
27         chdir $name;
28     }
29     else{
30         chdir $name;
31         system "git pull";
32     }
33
34     print "$^X Makefile.PL\n";
35     system("$^X Makefile.PL");
36
37     print "make test\n";
38     system "make test";
39 }