Re: [Module::Build] PERL_MM_USE_DEFAULT
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <ml...@th...> - 2006-03-07 10:34:50
|
Sorry for responding late to this, but won't this break exististing
distributions? Distros that currently use y_n() without defaults will
start die-ing when users upgrade M::B.
Randy.
Ken Williams wrote:
> Thanks, applied, along with the earlier patch in this thread.
>
> On Jan 20, 2006, at 3:04 AM, Yitzchak Scott-Thoennes wrote:
>>
>> --- Module-Build-0.27_05/lib/Module/Build/Base.pm.orig 2006-01-18
>> 22:13:09.393200000 -0800
>> +++ Module-Build-0.27_05/lib/Module/Build/Base.pm 2006-01-19
>> 23:27:54.418640000 -0800
>> @@ -379,6 +379,7 @@
>> sub y_n {
>> my $self = shift;
>> die "y_n() called without a prompt message" unless @_;
>> + die "y_n() called without y or n default" unless
>> ($_[1]||"")=~/^[yn]/i;
>>
>> my $interactive = $self->_is_interactive;
>> my $answer;
>> @@ -386,7 +387,6 @@
>> $answer = $self->prompt(@_);
>> return 1 if $answer =~ /^y/i;
>> return 0 if $answer =~ /^n/i;
>> - die "No y/n answer given, no default supplied, and no user to
>> ask again" unless $interactive;
>> print "Please answer 'y' or 'n'.\n";
>> }
>> }
|