From: Peter Rabbitson Date: Tue, 21 Jun 2016 14:24:29 +0000 (+0200) Subject: Bring out the big-paranoia-harness - make describe_env infallible X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c7ca96253b07f8ac9b6940ac35368d25ed3b139;p=dbsrgits%2FDBIx-Class.git Bring out the big-paranoia-harness - make describe_env infallible As desmonstrated by the previous commit: testing is no substitute for proper defensive programs. Stop-gap until this is spun off on its own --- diff --git a/t/00describe_environment.t b/t/00describe_environment.t index 0beb5b0..87b4697 100644 --- a/t/00describe_environment.t +++ b/t/00describe_environment.t @@ -48,6 +48,15 @@ use strict; use warnings; use Test::More 'no_plan'; + +# Things happen... unfortunately +$SIG{__DIE__} = sub { + die unless defined $^S and ! $^S; + + diag "Something horrible happened while assembling the diag data\n$_[0]"; + exit 0; +}; + use Config; use File::Find 'find'; use Digest::MD5 ();