Consider a Makefile.PL like this where you want to build, test and install 
the distributions alpha & beta at the same time



WriteMakefile(

        NAME            => "whatever",

        VERSION         => '1.0',

        DIR             => [ "alpha", "beta" ],

           );



The "test" target created by that on a Unix-ish platform looks like this





test :: $(TEST_TYPE)

    $(NOECHO) $(ABSPERLRUN)  -e 'chdir '\''alpha'\'';  ' \

      -e 'system '\''$(MAKE) test $(PASTHRU)'\''' \

      -e '    if -f '\''$(FIRST_MAKEFILE)'\'';'

    $(NOECHO) $(ABSPERLRUN)  -e 'chdir '\''beta'\'';  ' \

      -e 'system '\''$(MAKE) test $(PASTHRU)'\''' \

      -e '    if -f '\''$(FIRST_MAKEFILE)'\'';'





The problem with that code is that if there is a failure in one of the 
tests, the status will never work its way back to the shell.



A quick hack, changing



 -e 'system '\''$(MAKE) test $(PASTHRU)'\''' \



to



 -e '(system '\''$(MAKE) test $(PASTHRU)'\'' and exit 1 )' \





sorted the problem for me.



Paul


Reply via email to