Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 60466
Status: resolved
Priority: 0/
Queue: Params-Validate

People
Owner: Nobody in particular
Requestors: peter [...] morch.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.95
Fixed in: (no value)



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'
Subject: Re: [rt.cpan.org #60466] build_requires should include File::Slurp
Date: Wed, 18 Aug 2010 08:10:58 -0500 (CDT)
To: Peter Valdemar Mørch via RT <bug-Params-Validate [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 18 Aug 2010, Peter Valdemar Mørch via RT wrote: Show quoted text
> 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
No, this isn't right. The code that uses File::Slurp is only for the module author(s). The build_requires setting is only for modules needed for _end users_ to build the distribution tarball. If you want to make a patch that checks for File::Slurp more elegantly and fails with a useful message, that'd work. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/