summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-05-14 16:47:04 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-05-14 16:47:04 +0200
commit014dc8595070533eb7a14771e98640f74037ff78 (patch)
tree5bd34cfe3299c98f053f6c7edc5c2f90a52893a9 /Bugzilla/Install
parentbdaf609c71b6b75b0a3182f087b3cd3805e5a199 (diff)
downloadbugzilla-014dc8595070533eb7a14771e98640f74037ff78.tar.gz
bugzilla-014dc8595070533eb7a14771e98640f74037ff78.tar.xz
Bug 1164863: backport upstream bug 1163248 to bmo to remove dependency on File::Slurp for checksetup.pl
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Requirements.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm
index fe66b581b..e5a76bc83 100644
--- a/Bugzilla/Install/Requirements.pm
+++ b/Bugzilla/Install/Requirements.pm
@@ -27,9 +27,8 @@ use strict;
use version;
use Bugzilla::Constants;
-use Bugzilla::Install::Util qw(vers_cmp install_string bin_loc
- extension_requirement_packages);
-use File::Slurp;
+use Bugzilla::Install::Util qw(vers_cmp install_string bin_loc
+ success extension_requirement_packages);
use List::Util qw(max);
use Safe;
use Term::ANSIColor;
@@ -42,6 +41,7 @@ BEGIN {
}
use base qw(Exporter);
+use autodie;
our @EXPORT = qw(
REQUIRED_MODULES
OPTIONAL_MODULES
@@ -831,7 +831,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;