Re: [Module::Build] PERL_MM_USE_DEFAULT
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2006-01-22 02:30:19
|
Thanks, applied, along with the earlier patch in this thread.
-Ken
On Jan 20, 2006, at 3:04 AM, Yitzchak Scott-Thoennes wrote:
> On Thu, Jan 19, 2006 at 05:41:21PM -0800, Tyler MacDonald wrote:
>> Yitzchak Scott-Thoennes <sth...@ef...> wrote:
>>> Without it, the build is going fail for the first person who
>>> runs with </dev/null (in the existing code) or PERL_MM_USE_DEFAULT=1
>>> (with my patch to prompt()).
>>>
>>> Might as well force the module author to not make this mistake.
>>
>> True... we're *almost* there; I'd change this:
>>
>> die "y_n() called without y or n default" unless ($_[1]||"")=~/[yn]/i;
>>
>> To:
>>
>> die "y_n() called without y or n default" unless
>> ($_[1]||"")=~/^[yn]/i;
>
> Sigh. The carat was there when I wrote that; my mailer must have eaten
> it along the way, and somehow got the one in the Base.pm I edited too
> :)
>
> --- 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";
> }
> }
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Module-build-general mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/module-build-general
|