Subject: | process_PL_files doesn't catch script failure [with fix] |
I noticed that when process_PL_files runs a script and the script fails,
the build continues. This seems dangerous...
I modified my setup to die when the script fails - we have a subclass
setup, so my bodge is a method override plus "is it OK to do that to
this version?" safety check.
Here's the diff with complications removed. Perhaps you could roll it
into the next version?
Thanks,
Matthew #8-)
--
--- local-subclass.pm 2007-05-04 17:00:34.250539792 +0100
+++ lib/Module/Build/Base.pm 2007-05-04 16:44:12.998579527 +0100
@@ -1,14 +1,14 @@
sub process_PL_files {
my ($self) = @_;
my $files = $self->find_PL_files;
while (my ($file, $to) = each %$files) {
unless ($self->up_to_date( $file, $to )) {
- $self->run_perl_script($file, [], [@$to]) or die "$file failed";
+ $self->run_perl_script($file, [], [@$to]);
$self->add_to_cleanup(@$to);
}
}
}