Quoth jkee...@cpan.org:
> As part of our project to refactor ExtUtils::ParseXS, I am in the 
> process of building functionality to identify CPAN distributions that 
> contain .xs files and to run 'perl Makefile.PL && make' (or their 
> Module::Build equivalents) on those distributions.
> 
> At this point in development, I only want to concern myself with 
> distributions where Makefile.PL completes successfully and without user 
> input.  I want the process of running the program to be as automated as 
> possible; I don't want to have to respond to STDIN prompts during the 
> course of a particular distribution's Makefile.PL.  In fact, I would 
> like to treat distributions that prompt me for input as equivalent to 
> exiting with non-zero exit codes.
> 
> Example:  If I am working with CPAN distribution 'Authen-Krb5-Admin', 
> this happens:
> 
>    [Authen-Krb5-Admin-0.11] 547 $ perl Makefile.PL
>    checking for Kerberos 5 prefix ... /usr
>    checking for libk5crypto ... not found (using libcrypto)
>    Authenticate as user/instan...@realm] for testing [jimk/admin]:
> 
> I don't want to do anything further with this distribution because at 
> this point I want to exclude it from the list of distributions I'm going 
> to use in my real project.  I want to treat it as if 'perl Makefile.PL' 
> exited with a non-zero value.
> 
> Is there any way to accomplish this?

Running

    PERL_MM_USE_DEFAULT=1 perl Makefile.PL </dev/null

should cover most cases: either it'll take a default value and succeed,
or it'll fail. If you're worried about Makefile.PLs reading from
/dev/tty you could also fork and call setsid to run the above in a
session with no ctty.

Ben

Reply via email to