Remove "beta status" warning in README
Fix BAIL_OUT error message

The Test::More::BAIL_OUT routine can't print an error message with
newlines in it. So, we pass to it a long single line instead.

This problem was detected in
http://cpantesters.org/cpan/report/70e7f09c-6aa8-11e2-93f8-f85de4c1b563.
Tell dzil to extract build dependencies from Makefile.PL

Dzil isn't smart enough (nor am I) to know how to infer which modules
should be considered build dependencies. I have to tell it to extract
dependencies from Makefile.PL in dist.ini.

This problem was detected in
http://cpantesters.org/cpan/report/aab9636f-754c-1014-9df3-df95d871b27e.
Remove unused routine
Catch and treat File::Slurp::write_file errors

This routine croaks by default and the testing framework wasn't
catching such errors. This was generating hard to debug errors such as
http://www.cpantesters.org/cpan/report/ffd68682-6ae5-11e2-992e-e7c00a4a7996.

Now I changed from croak to carp the routine's behaviour on errors and
treat them.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is ahead of 'origin/master' by 4 commits.
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   t/02-check-jira.t
#	modified:   t/02-check-log.t
#	modified:   t/02-check-structure.t
#	modified:   t/02-externals.t
#	modified:   t/02-gerrit-change-id.t
#	modified:   t/test-functions.pl
#
diff --git a/t/02-check-jira.t b/t/02-check-jira.t
index 87eb510..b9197ba 100755
--- a/t/02-check-jira.t
+++ b/t/02-check-jira.t
@@ -138,7 +138,7 @@ $repo->command(config => '--unset-all', 'check-jira.by-assignee');
 check_can_commit('allow commit if valid issue cited [GIT-2]');

 my $codefile = catfile($T, 'codefile');
-write_file($codefile, <<'EOF');
+my $code = <<'EOF';
 sub {
     my ($git, $commit_id, $jira, @issues) = @_;
     my $keys = join(', ', sort map {$_->{key}} @issues);
@@ -146,6 +146,8 @@ sub {
     die "You must cite issues GIT-2 and GIT-3 only: not '$keys'\n";
 }
 EOF
+write_file($codefile, {err_mode => 'carp'}, $code)
+    or BAIL_OUT("can't write_file('$codefile', <>code>)\n");

 $repo->command(config => 'check-jira.check-code', "file:$codefile");

diff --git a/t/02-check-log.t b/t/02-check-log.t
index a5f8b25..84fde60 100755
--- a/t/02-check-log.t
+++ b/t/02-check-log.t
@@ -16,16 +16,20 @@ my $msgfile = catfile($T, 'msg.txt');

 sub check_can_commit {
     my ($testname, $msg) = @_;
-    write_file($msgfile, $msg);
-    append_file($file, $testname);
+    write_file($msgfile, {err_mode => 'carp'}, $msg)
+        or BAIL_OUT("check_can_commit: can't write_file('$msgfile', '$msg')\n");
+    append_file($file, {err_mode => 'carp'}, $testname)
+        or BAIL_OUT("check_can_commit: can't append_file('$file', '$testname')\n");
     $repo->command(add => $file);
     test_ok($testname, $repo, 'commit', '-F', $msgfile);
 }

 sub check_cannot_commit {
     my ($testname, $regex, $msg) = @_;
-    write_file($msgfile, $msg);
-    append_file($file, $testname);
+    write_file($msgfile, {err_mode => 'carp'}, $msg)
+        or BAIL_OUT("check_cannot_commit: can't write_file('$msgfile', '$msg')\n");
+    append_file($file, {err_mode => 'carp'}, $testname)
+        or BAIL_OUT("check_cannot_commit: can't append_file('$file', '$testname')\n");
     $repo->command(add => $file);
     if ($regex) {
 	test_nok_match($testname, $regex, $repo, 'commit', '-F', $msgfile);
diff --git a/t/02-check-structure.t b/t/02-check-structure.t
index 8064d3c..5911194 100755
--- a/t/02-check-structure.t
+++ b/t/02-check-structure.t
@@ -41,7 +41,7 @@ sub add_file {
     my $dirname  = catfile($repo->wc_path(), @path);
     make_path($dirname);

-    unless (write_file($filename, 'data')) {
+    unless (write_file($filename, {err_mode => 'carp'}, 'data')) {
 	fail($testname);
 	diag("[TEST FRAMEWORK INTERNAL ERROR] Cannot create file: $filename; $!\n");
     }
diff --git a/t/02-externals.t b/t/02-externals.t
index bb5170f..c7fc251 100755
--- a/t/02-externals.t
+++ b/t/02-externals.t
@@ -44,13 +44,15 @@ mkdir $hookd or die "Can't mkdir $hookd: $!";
 my $hook   = catfile($hookd, 'script.pl');
 my $mark   = catfile($hooksd, 'mark');

-write_file($hook, <<"EOF");
+my $hook_script = <<"EOF";
 #!$Config{perlpath}
 open FH, '>', '$mark' or die "Can't create mark: \$!";
 print FH "line\\n";
 close FH;
 exit 0;
 EOF
+write_file($hook, {err_mode => 'carp'}, $hook_script)
+    or BAIL_OUT("can't write_file('$hook', <hook_script 1>)\n");

 chmod 0755, $hook or die "Cannot chmod $hook: $!\n";

@@ -61,10 +63,12 @@ check_can_commit('execute a hook that succeeds');
 ok(-f $mark, 'mark exists now');

 # install a hook that fails
-write_file($hook, <<"EOF");
+$hook_script = <<"EOF";
 #!$Config{perlpath}
 die "external hook failure\n";
 EOF
+write_file($hook, {err_mode => 'carp'}, $hook_script)
+    or BAIL_OUT("can't write_file('$hook', <hook_script 2>)\n");

 check_cannot_commit('execute a hook that fails', qr/external hook failure/);

diff --git a/t/02-gerrit-change-id.t b/t/02-gerrit-change-id.t
index 9f18aa5..5201877 100755
--- a/t/02-gerrit-change-id.t
+++ b/t/02-gerrit-change-id.t
@@ -19,7 +19,8 @@ my ($repo, $filename, undef, $T) = new_repos();
 my $gerrit_script = catfile($T, 'gerrit-commit-msg');
 {
     local $/ = undef;
-    write_file($gerrit_script, <DATA>);
+    write_file($gerrit_script, {err_mode => 'carp'}, <DATA>)
+        or BAIL_OUT("can't write_file('$gerrit_script', <DATA>)\n");
     chmod 0755, $gerrit_script;
 };

@@ -41,7 +42,8 @@ sub cannot_commit {
     my ($testname, $regex, $msg) = @_;
     append_file($filename, "new line\n");
     $repo->command(add => $filename);
-    write_file($msgfile, $msg);
+    write_file($msgfile, {err_mode => 'carp'}, $msg)
+        or BAIL_OUT("cannot_commit: can't write_file('$msgfile', '$msg')\n");
     unless (test_nok_match($testname, $regex, $repo, 'commit', '-F', $msgfile)) {
 	diag_last_log();
     }
@@ -51,7 +53,8 @@ sub can_commit {
     my ($testname, $msg) = @_;
     append_file($filename, "new line\n");
     $repo->command(add => $filename);
-    write_file($msgfile, $msg);
+    write_file($msgfile, {err_mode => 'carp'}, $msg)
+        or BAIL_OUT("can_commit: can't write_file('$msgfile', '$msg')\n");
     return test_ok("$testname [commit]", $repo, 'commit', '-F', $msgfile);
 }

@@ -115,7 +118,8 @@ foreach my $test (
 sub expected {
     my ($msg) = @_;

-    write_file($msgfile, $msg);
+    write_file($msgfile, {err_mode => 'carp'}, $msg)
+        or BAIL_OUT("check_can_commit: can't write_file('$msgfile', '$msg')\n");

     my $dir = pushd($repo->repo_path());

@@ -128,7 +132,8 @@ sub produced {
     my ($msg) = @_;

     # Check how our hook change the message
-    write_file($msgfile, $msg);
+    write_file($msgfile, {err_mode => 'carp'}, $msg)
+        or BAIL_OUT("check_can_commit: can't write_file('$msgfile', '$msg')\n");
     Git::Hooks::GerritChangeId::rewrite_message($repo, $msgfile);
     read_file($msgfile);
 }
diff --git a/t/test-functions.pl b/t/test-functions.pl
index c589825..50b9672 100755
--- a/t/test-functions.pl
+++ b/t/test-functions.pl
@@ -118,10 +118,12 @@ EOF
             (my $perl = $^X) =~ tr:\\:/:;
             $hook_pl =~ tr:\\:/:;
             my $d = $ENV{DBG} ? '-d' : '';
-            write_file($hookfile, <<"EOF");
+            my $script = <<"EOF";
 #!/bin/sh
 $perl $d $hook_pl $hook \"\$@\"
 EOF
+            write_file($hookfile, {err_mode => 'carp'}, $script)
+                or BAIL_OUT("can't write_file('$hookfile', '$script')\n");
 	    chmod 0755 => $hookfile;
 	} else {
             symlink 'hook.pl', $hookfile