[recalling sub-thread wrt unsatisfied perl prereqs] Stas Bekman <[EMAIL PROTECTED]> writes:
> Joe Schaefer wrote: >> Stas Bekman <[EMAIL PROTECTED]> writes: >> >>> Shouldn't this be fatal? (now it continues to run and you can be sure that >>> noone will notice that suggestion) >>> >>>it fails only later when you run make. >> >>>From `svn log Makefile.PL`: >> r165547 | randyk | 2005-05-01 17:54:26 -0400 (Sun, 01 May 2005) | >> 4 lines >> When testing perl prerequisites, warn, rather than die, on >> failure, so as CPAN clients have a chance to install missing >> prerequisites. >> Is there a way (some environment variable perhaps) to tell whether >> we're running under a CPAN client or not? That way we could die() >> in the non-cpan case. > > You can try to detect whether you are running under CPAN, by just checking > that CPAN is loaded may be. But most likely it's running things as > external procs in which case you've no access to that info. In that case > you could only check something like an env var. I've grep'ed around, it > doesn't seem to set any ENV vars by CPAN. May be we should suggest to have > one? What's the consensus of the group on this issue? Introducing another prereq, possibly on CPAN itself, seems like a bad idea to me. I like the fact that the current build system is cpan- friendly, but I also appreciate the simplicity of having the build fail immediately on an unsatisfied prereq. So I don't know how to proceed at this point. We could either 1) leave things as-is, which allows the cpan client to sift through the generated Makefile in order to pursue unsatisfied prereqs, or 2) change back the "warn" calls to "die", which will confuse the cpan client, but will allow human users to figure out exactly what needs to be done in order for the build to continue. Opinions? -- Joe Schaefer
