Permalink
Browse files

Added $SIG{__DIE__} handler (Eric Strom++)

  • Loading branch information...
1 parent 714c476 commit 5860153f79942485d237bfb23f34add94ea26198 @jberger jberger committed Oct 26, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 Build.PL
View
@@ -31,17 +31,17 @@ BEGIN {
grep { $_ ne 'perl' }
keys %conf_req;
+ ## allows `die` without adding a "BEGIN failed--compilation aborted" message which clutters up the warning the user sees
+ local $SIG{__DIE__} = sub {warn @_; exit 1};
+
if (@failed) {
local $" = ' ';
my $message = "Some needed modules are missing or must be upgraded before configuring Alien::GSL.\nThose modules are:\t@failed\n";
if ($ENV{AUTOMATED_TESTING}) {
print $message;
exit 0;
} else {
- print $message;
- exit 1;
- ## personnally I like die better, but it adds a "BEGIN failed--compilation aborted" message which clutters up the warning the user sees
- #die $message;
+ die $message;
}
}

0 comments on commit 5860153

Please sign in to comment.