Subject: | build_requires should include File::Slurp |
Bug against the hg tip:
Building without File::Slurp causes error:
Can't locate File/Slurp.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at Build.PL line 50.
Now it causes:
Checking prerequisites...
- ERROR: File::Slurp is not installed
Subject: | BuildRequiresFileSlurp.hg.patch |
# HG changeset patch
# User Peter Valdemar Mørch <peter@morch.com>
# Date 1282128963 -7200
# Node ID 8620f6978228794d9243c01582bef2be5632a247
# Parent 47d5f0a1758b0351f259bdc27b601a3635bbd2bb
build_requires File::Slurp
diff -r 47d5f0a1758b -r 8620f6978228 Build.PL
--- a/Build.PL Wed Aug 18 12:01:16 2010 +0200
+++ b/Build.PL Wed Aug 18 12:56:03 2010 +0200
@@ -21,6 +21,7 @@
'ExtUtils::CBuilder' => '0',
'Pod::Man' => '1.14',
'Test::More' => '0.88',
+ 'File::Slurp' => '0',
},
c_source => 'c',
add_to_cleanup => \@pp,
@@ -46,7 +47,10 @@
sub _make_pp_tests {
return unless -d '.hg' || $ENV{AUTHOR_TESTING};
- require File::Slurp;
+ eval {
+ require File::Slurp;
+ };
+ return () if $@;
File::Slurp->import(qw( read_file write_file ));
opendir my $dh, 't'