Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 8047
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: schwern [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: CPANPLUS does not set PERL_MM_USE_DEFAULT when running Makefile.PL
By MakeMaker convention, if the PERL_MM_USE_DEFAULT environment variable is set a Makefile.PL should not prompt for input and use its defaults instead. The ExtUtils::MakeMaker::prompt() function uses this environment variable (and other heuristics) as well as other hand-rolled prompting code (see Data::UUID for an example). CPANPLUS should set PERL_MM_USE_DEFAULT to a true value when running Makefile.PL to avoid their hanging waiting for input.
[MSCHWERN - Tue Oct 19 02:42:44 2004]: Show quoted text
> By MakeMaker convention, if the PERL_MM_USE_DEFAULT environment > variable is set a Makefile.PL should not prompt for input and use > its defaults instead. The ExtUtils::MakeMaker::prompt() function > uses this environment variable (and other heuristics) as well as > other hand-rolled prompting code (see Data::UUID for an example). > > CPANPLUS should set PERL_MM_USE_DEFAULT to a true value when running > Makefile.PL to avoid their hanging waiting for input.
Changed as such in the development branch, as patch 11298: executing p4 diff //depot/cpanplus/devel/lib/CPANPLUS/Dist/MM.pm ==== //depot/cpanplus/devel/lib/CPANPLUS/Dist/MM.pm#29 - /Users/kane/sources/p4/ cpanplus/devel/lib/CPANPLUS/Dist/MM.pm ==== 263,266c263,271 < ### the config setting below, although it is really not recommended < my $run_verbose = $verbose || < $conf->get_conf('allow_build_interactivity') || < 0; --- Show quoted text
> ### the config setting below, although it is really not > ### recommended > my $run_verbose = $verbose || > $conf->get_conf('allow_build_interactivity') || > 0; > > ### this makes MakeMaker use defaults if possible, according > ### to schwern. See ticket 8047 for details. > local $ENV{PERL_MM_USE_DEFAULT} = 1 unless $run_verbose;
[KANE - Thu Nov 11 10:31:30 2004]: Show quoted text
> > local $ENV{PERL_MM_USE_DEFAULT} = 1 unless $run_verbose;
I just noticed this. I'm not really sure what verbosity has to do with this. Running verbosely doesn't change the automated nature of running Makefile.PL, the user still doesn't get prompted, Makefile.PL is not being run interctively. I noticed this while installing Data::UUID which will only prompt if PERL_MM_USE_DEFAULT is set. CPANPLUS hung running its Makefile.PL because I have verbose turned on. I was not offered any prompt. Unless I'm missing something, the correct behavior should be to always set PERL_MM_USE_DEFAULT regardless of verbosity. As a side note, I do notice that "allow_build_interactively" is set true in my configuration. I don't know what that config setting does. Dist::MM appears to be the only thing which uses it in deciding if it should run verbosely or not. As true seems to be the default and I don't see anything in the user config wizard to turn it off I can conclude that PERL_MM_USE_DEFAULT has never been set.
[MSCHWERN - Wed Jun 29 16:00:55 2005]: Show quoted text
> [KANE - Thu Nov 11 10:31:30 2004]:
> > > local $ENV{PERL_MM_USE_DEFAULT} = 1 unless $run_verbose;
> > I just noticed this. I'm not really sure what verbosity has to do with > this.
'verbose' is the terminology used here meaning 'with output to the screen'. If you have verbose turned off *and* allow_build_interactivity disabled, then we'll set PERL_MM_USE_DEFAULT so that in most cases, no interactive install will happen. Show quoted text
> Running verbosely doesn't change the automated nature of running > Makefile.PL, the user still doesn't get prompted, Makefile.PL is not > being run interctively.
Show quoted text
> I noticed this while installing Data::UUID which will only prompt if > PERL_MM_USE_DEFAULT is set.
You mean *not* set. Show quoted text
> CPANPLUS hung running its Makefile.PL > because I have verbose turned on. I was not offered any prompt.
Actually, it didnt *hang* it merely didn't show you the output from Data::UUID's makefile.pls print statement. A simple buffering issue. I can fix it with a '-Mfoo' where foo.pm holds BEGIN { $|++ }. So, i've added a .pm in the CPANPLUS namespace that does exactly that, which will be included before any makefile.pl is run using -M. Patch is applied as change 12121 Show quoted text
> Unless I'm missing something, the correct behavior should be to always > set PERL_MM_USE_DEFAULT regardless of verbosity.
Definately not. When people want to answer question interactively, they should be able to do so.