diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-06-12 15:17:24 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-06-13 15:19:21 +0200 |
commit | 8e6dd9cb29e9c03670d2d4e093d51eebe74ed950 (patch) | |
tree | 41a420c3ac07b08cce148fb028be6f31c5082d55 /write_buildcustomize.pl | |
parent | b78ac7159b42a0e0bd59ab07411d2f5ef09e1d7e (diff) | |
download | perl-8e6dd9cb29e9c03670d2d4e093d51eebe74ed950.tar.gz |
write_buildcustomize.pl now test loads the generated lib/buildcustomize.pl
And deletes it if it encounters an error whilst loading it. A non-functional
lib/buildcustomize.pl will cause the build to fail with seemingly unrelated
errors. Deleting it and exiting with an error should make the cause of build
failures obvious.
Diffstat (limited to 'write_buildcustomize.pl')
-rw-r--r-- | write_buildcustomize.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/write_buildcustomize.pl b/write_buildcustomize.pl index 709923baa2..92c75de93e 100644 --- a/write_buildcustomize.pl +++ b/write_buildcustomize.pl @@ -65,8 +65,12 @@ if ($error) { close $fh or warn "Can't unlink $file after error: $!"; } else { - close $fh and exit; - $error = "Can't close $file: $!"; + if (close $fh) { + do $file and exit; + $error = "Can't load generated $file: $@"; + } else { + $error = "Can't close $file: $!"; + } } # It's going very wrong, so try to remove the botched file. |