Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 53_autogen_pod.pl
index c350734..1c5530f 100644 (file)
@@ -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";
 
@@ -105,15 +112,18 @@ dbic_distdir_gen_dbic_pod :
 
 \tperldoc -u lib/DBIx/Class.pm > $dist_pod_fn
 \t@{[ $mm_proto->oneliner(
-  "s!^.*?this line is replaced with the author list.*! qq{List of the awesome contributors who made DBIC v$ver possible\n\n} . qx(\$^X -Ilib maint/gen_pod_authors)!me",
-  [qw( -0777 -p -i )]
+  "s!^.*?this line is replaced with the author list.*! qq{List of the awesome contributors who made DBIC v$ver possible\\n\\n} . qx(\$^X -Ilib maint/gen_pod_authors)!me",
+  [qw( -0777 -p -i.arghwin32 )]
 ) ]} $dist_pod_fn
+\t\$(RM_F) $dist_pod_fn.arghwin32
 
 create_distdir : dbic_distdir_defang_authors
 
 # Remove the maintainer-only warning (be nice ;)
 dbic_distdir_defang_authors :
-\t@{[ $mm_proto->oneliner('s/ ^ \s* \# \s* \*\*\* .+ \n ( ^ \s* \# \s*? \n )? //xmg', [qw( -0777 -p -i )] ) ]} \$(DISTVNAME)/AUTHORS
+\t@{[ $mm_proto->oneliner('s/ ^ \s* \# \s* \*\*\* .+ \n ( ^ \s* \# \s*? \n )? //xmg', [qw( -0777 -p -i.arghwin32 )] ) ]} \$(DISTVNAME)/AUTHORS
+@{[ $crlf_fixup->( '$(DISTVNAME)/AUTHORS' ) ]}
+\t\$(RM_F) \$(DISTVNAME)/AUTHORS.arghwin32
 
 EOP
 }