X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=inc%2FClean.pm;h=cf8fee0a7babe258c84f0fc8bdce1ec647a7ae03;hb=dfa11004a2d5ffded0323bb85317ed444a90d2ac;hp=ce528b543d61bfc6423ba61d1814c2e1512fc05e;hpb=ef5454ec6face171dc729f36279d252e7bd96ab7;p=gitmo%2FMoose.git diff --git a/inc/Clean.pm b/inc/Clean.pm index ce528b5..cf8fee0 100644 --- a/inc/Clean.pm +++ b/inc/Clean.pm @@ -8,7 +8,13 @@ sub before_build { if (-e 'Makefile') { $self->log("Running make distclean to clear out build cruft"); - system("$^X Makefile.PL && make distclean"); + unless (fork) { + close(STDIN); + close(STDOUT); + close(STDERR); + { exec("$^X Makefile.PL && make distclean") } + die "couldn't exec: $!"; + } } if (-e 'META.yml') {