in reply to Re: EU::MM (again)
in thread EU::MM (again)

Use the source ... App::Info::Handler::Prompt, which just does a straightforward <STDIN>.

Hm. Can that be so? Given that if a simple <STDIN> is used, I get the full power of cmd.exe's command line editing--history etc.--but none of that seems to be available for that (or any other) makefile prompt?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^3: EU::MM (again)
by Anonymous Monk on Apr 15, 2009 at 11:16 UTC
    http://cpansearch.perl.org/src/MSCHWERN/ExtUtils-MakeMaker-6.50/lib/ExtUtils/MakeMaker.pm
    sub prompt ($;$) { ## no critic my($mess, $def) = @_; Carp::confess("prompt function called without an argument") unless defined $mess; my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) + ; my $dispdef = defined $def ? "[$def] " : " "; $def = defined $def ? $def : ""; local $|=1; local $\; print "$mess $dispdef"; my $ans; if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) { print "$def\n"; } else { $ans = <STDIN>; if( defined $ans ) { chomp $ans; } else { # user hit ctrl-D print "\n"; } } return (!defined $ans || $ans eq '') ? $def : $ans; }
    Simple test, each exe appears to get its own history
    perl -e"warn scalar readline(STDIN)" perl5.8.7 -e"warn scalar readline(STDIN)"
Re^3: EU::MM (again)
by JavaFan (Canon) on Apr 15, 2009 at 10:15 UTC
    Why do you expect to get the cmd.exe's features if it isn't cmd.exe that processes your input, but App::Info::Handler::Prompt?