From 014dc8595070533eb7a14771e98640f74037ff78 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 14 May 2015 15:47:04 +0100 Subject: Bug 1164863: backport upstream bug 1163248 to bmo to remove dependency on File::Slurp for checksetup.pl --- Bugzilla/Install/Requirements.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Install') 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; -- cgit v1.2.3-24-g4f1b