From: Peter Rabbitson Date: Sun, 6 Mar 2016 06:08:56 +0000 (+0100) Subject: (optdeps) _gen_pod can *very much* fail, not sure what I was thinking X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c29ff830bf11e12320f25964643e627c72cb5b1;p=dbsrgits%2FDBIx-Class-Historic.git (optdeps) _gen_pod can *very much* fail, not sure what I was thinking --- diff --git a/maint/Makefile.PL.inc/53_autogen_pod.pl b/maint/Makefile.PL.inc/53_autogen_pod.pl index f595f0d..1c5530f 100644 --- a/maint/Makefile.PL.inc/53_autogen_pod.pl +++ b/maint/Makefile.PL.inc/53_autogen_pod.pl @@ -22,10 +22,17 @@ else { { print "Regenerating Optional/Dependencies.pod\n"; - # this should always succeed - hence no error checking - # if someone breaks OptDeps - travis should catch it - require DBIx::Class::Optional::Dependencies; - DBIx::Class::Optional::Dependencies->_gen_pod ($ver, "$pod_dir/lib"); + eval { + require DBIx::Class::Optional::Dependencies; + DBIx::Class::Optional::Dependencies->_gen_pod ($ver, "$pod_dir/lib"); + 1; + } + or + printf ("FAILED!!! Subsequent `make dist` will fail. %s\n", + $ENV{DBICDIST_DEBUG} + ? "Full error: $@" + : 'Re-run with $ENV{DBICDIST_DEBUG} set for more info' + ); postamble <<"EOP";