summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-05-14 15:01:24 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-05-14 15:01:24 +0200
commit8ff02d6ac19a2a0bc99e2d5c5a0d0cb101c52f45 (patch)
treeb4c7a4e4d6f376b2ff37314b1d5356c0f3dd1af6
parentccda2ce4c39be8c833b9afff2ba28622c3e48dca (diff)
downloadbugzilla-8ff02d6ac19a2a0bc99e2d5c5a0d0cb101c52f45.tar.gz
bugzilla-8ff02d6ac19a2a0bc99e2d5c5a0d0cb101c52f45.tar.xz
Bug 1163248: checksetup.pl is unable to run if File::Slurp is missing
r=dkl a=glob
-rw-r--r--Bugzilla/Install/Requirements.pm11
-rw-r--r--template/en/default/setup/strings.txt.pl1
2 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index 4dbb0caef..2db36f89d 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -18,13 +18,14 @@ use strict;
use warnings;
use Bugzilla::Constants;
-use Bugzilla::Install::Util qw(install_string bin_loc
+use Bugzilla::Install::Util qw(install_string bin_loc success
extension_requirement_packages);
-use File::Slurp;
use List::Util qw(max);
use Term::ANSIColor;
use parent qw(Exporter);
+use autodie;
+
our @EXPORT = qw(
REQUIRED_MODULES
OPTIONAL_MODULES
@@ -907,7 +908,11 @@ sub export_cpanfile {
}
# Write out the cpanfile to the document root
- write_file(bz_locations()->{'libpath'} . '/cpanfile', \$cpanfile);
+ my $file = bz_locations()->{'libpath'} . '/cpanfile';
+ open(my $fh, '>', $file);
+ print $fh $cpanfile;
+ close $fh;
+ success(install_string('cpanfile_created', { file => $file }));
}
1;
diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl
index 77bc85d1c..d1d230200 100644
--- a/template/en/default/setup/strings.txt.pl
+++ b/template/en/default/setup/strings.txt.pl
@@ -62,6 +62,7 @@ EOT
Re-run checksetup.pl in interactive mode (without an 'answers' file)
to continue.
END
+ cpanfile_created => "##file## created",
cpan_bugzilla_home =>
"WARNING: Using the Bugzilla directory as the CPAN home.",
db_enum_setup => "Setting up choices for standard drop-down fields:",