Re: [Module::Build] PERL_MM_USE_DEFAULT
Status: Beta
Brought to you by:
kwilliams
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-01-23 21:21:38
|
Changes should probably note this:
--- Changes.orig 2006-01-23 10:57:34.759486000 -0800
+++ Changes 2006-01-23 13:18:45.189366400 -0800
@@ -8,7 +8,8 @@
- We should now work with recent (> 0.49) versions of YAML.pm when
creating the META.yml file. [Yitzchak Scott-Thoennes]
- - The prompt() and y_n() methods have been improved with respect to
+ - The y_n() method now requires the default parameter, and the
+ prompt() and y_n() methods have been improved with respect to
how they behave/detect when there is no user to ask. We're now
more consistent with MakeMaker, including respecting the
PERL_MM_USE_DEFAULT environment variable. [Tyler MacDonald and
On Sat, Jan 21, 2006 at 08:30:14PM -0600, Ken Williams wrote:
> 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
>
>
>
> -------------------------------------------------------
> 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
|