From 8ff02d6ac19a2a0bc99e2d5c5a0d0cb101c52f45 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 14 May 2015 15:01:24 +0200 Subject: Bug 1163248: checksetup.pl is unable to run if File::Slurp is missing r=dkl a=glob --- Bugzilla/Install/Requirements.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Install/Requirements.pm') 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; -- cgit v1.2.3-24-g4f1b