On Thu, May 22, 2014 at 11:55:35AM -0400, GAAL via RT wrote:
Show quoted text> The Makefile.PL is somewhat buggy; it means that when the maintainer creates meta files one dependency will be recorded depending on what's installed in the maintainer's system at the time. I'm not sure how to address that.
Generate the META.* files separately, instead of letting ExtUtils::MakeMaker do it. One common way of doing that is with Dist::Zilla.
Show quoted text> Is it reasonable to assume pretty much everybody has Text::CSV_XS these days? Stopping to try to be clever might be the best way to fix this. It takes care of the metadata problem too.
You can add it as a required prereq, which will work for everyone except
those with no compiler, or who want to fatpack your module. One option is
to do this and wait for the bug report from someone who cares about this
(it may never happen).
Or, do this in Makefile.PL:
$WriteMakefileArgs{PREREQ_PM}{'Text::CSV_XS'} = '0' if can_xs();
sub can_xs {
return eval 'require ExtUtils::CBuilder; 1'
&& ExtUtils::CBuilder->new( quiet => 1 )->have_compiler;
}
..and also add ExtUtils::CBuilder to {prereqs}{configure}{requires} metadata.
Note you CANNOT use META_MERGE in WriteMakefile() for this to work. You need to either
use META_ADD, or generate your meta files independently..