On 09/19/2013 08:20 AM, David Oswald wrote:
That's too late, isn't it? If the user types, "cpan install List::BinarySearch", Makefile.PL doesn't get executed until after the target module is pulled in. Prereqs are specified in the distribution's META.* files. By the time Makefile.PL is run, the installer is done pulling in prereqs. The goal is for a cpan installer to pull in the XS distribution and attempt to install it. Failure not block the PP module from completing its install.
nope. (Makefile|Build).PL is always executed *before* checking for prerequisites, thus the META used is the one generated from there. (actually, from what I can see CPAN even looks inside the generated (Makefile|Build) for possibly additional prerequisites).
the "conditional prerequisite" approach should be totally safe. cheers, Aldo