Re: [Module::Build] PERL_MM_USE_DEFAULT

[email protected] ("Randy W. Sims")
Newsgroups perl.cpan.discuss
Message-ID <[email protected]>
Tyler MacDonald wrote:
> Yitzchak Scott-Thoennes <[email protected]> wrote:
> 
>>The problem that I tried to address is module authors not giving a
>>default and not realizing that this dies when you try to do an
>>unattended install.  I want to force a default so they don't have
>>the option to unknowingly cause some users a problem.
> 
> 
> 	This is a problem with CPAN.pm as well; if you try to do the initial
> setup with PERL_MM_USE_DEFAULT=1, it loops forever on the "Select a mirror"
> prompt. :-/ I've been meaning to discuss this more / submit a patch, but my
> backlog has been insane lately...

We can:

die "ERROR: This build script not safe for unattended installs. Please 
notify @{[$self->dist_author]} that they wrote a bad bad Build.PL. 
Please ask them to provide reasonable defaults or switch to the new 
ask() method."
   if $ENV{PERL_MM_USE_DEFAULT}
   && (called_without_default(y_n) || called_without_default(prompt);

__END__
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.