This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
write_buildcustomize.pl now test loads the generated lib/buildcustomize.pl
[perl5.git] / write_buildcustomize.pl
index 709923b..92c75de 100644 (file)
@@ -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.