On 1/28/07, Eric Wilhelm <[EMAIL PROTECTED]> wrote:
I realized that 'perl Build.PL' doesn't return a failure exit status when dependencies are missing. Do CPAN/CPANPLUS not check this?
For CPAN.pm, it may or may not check the exit status: * If the system supports $SIG{ALRM} and there's an inactivity timeout, then Build.PL is called via a fork/exec in an eval block and the exit status is not checked * Otherwise, it's run via system() and failures are marked from the exit status * In either case, CPAN.pm looks for the presence of Build (or Makefile) as the sign of a successful run of Build.PL or Makefile.PL. Dependencies are subsequently checked directly by CPAN.pm (so it can go build them). Personally, I see the purpose of Build.PL as creating a Build file (and associated metadata like prereqs). As long as that happens, it's a "successful" run. I wouldn't try to use the exit status to signal prerequisite problems -- as that isn't an "error" for what Build.PL is responsible for doing. Dying in Build.PL should indicate that the distribution can't/shouldn't be built -- e.g. a Win32 module on a *nix system. Regards, David