On Wed Jan 22 21:24:28 2014, LAWALSH wrote:
Show quoted text>
> Example:
>
>
> Checking if your kit is complete...
> Looks good
>
> Inline::C is packaged with Inline.pm because it is the most commonly
> used
> Inline Language Support Module (ILSM).
>
> See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++),
> ::CPR,
> : :Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, ::TT,
> : :Tcl and ::WebChat.
>
> Config.pm indicates that your version of Perl was built with this C
> compiler:
>
> gcc
>
> I have located this compiler on your system.
>
> Do you want to install Inline::C? [y] y
At this point you're experiencing the Makefile.PL for Inline::C, as the CPAN installer runs all Makefile.PL's within the distribution recursively. The prompting is handled by ExtUtils::MakeMaker's prompt() function. And as you see within the "[y]" square brackets, prompt() is being directed to supply a default.
prompt() detects whether Makefile.PL has been invoked interactively, or non-interactively (as is the case when running the 'cpan' installer). When it's invoked non-interactively, the default is used. Inline::C supplies the "y" default, which seems to be what you would have selected anyway, had you been in interactive mode. If Inline::C's Makefile.PL didn't supply a default, prompt() would use the empty string as a default in non-interactive mode, which would cause Inline::C's Makefile.PL to enter an endless loop (you can look at the source to see what I mean). Fortunately, Inline::C's Makefile.PL does the right thing; it supplies a default.
So the prompting problem you're describing is actually "how things are done": Makefile.PL is making correct use of prompt(), supplied by ExtUtils::MakeMaker. If you don't like how ExtUtils::MakeMaker::prompt works, and for the most part, prompt() works flawlessly across a broad range of systems and configurations; it has to, being part of EU::MM.
The next issue to consider is how the cpan installer works. The basic 'cpan' installer (provided by App::cpan) doesn't (to my knowledge) provide an option for interactive installations. So if you want to install automatically using the 'cpan' installer, you're going to have to accept Inline::C's defaults, which is exactly why defaults are provided. It would be nice to see an "interactive mode" feature implemented for App::cpan / CPAN.pm, but that's someone else's jurisdiction, not Inline's.
However, if you would like a degree of automation, but still want to be able to hit the "y" key yourself (without waiting around for someone to implement the feature in App::cpan / CPAN.pm), you may use 'cpanm' (App::cpanm, or cpanminus) to install Inline and Inline::C. 'cpanm' provides an "--interactive" option. If you invoke this command: 'cpanm --interactive Inline' you will get an automated installation of Inline, along with blocking prompting that you can respond to manually before Inline::C gets installed.
Show quoted text> (/home/perl/perl-5.16.3/bin/perl Makefile.PL exited with 9)
>
> CPAN::Reporter: test results were not valid, Command interrupted.
>
> No 'Makefile' created SISYPHUS/Inline-0.53.tar.gz
> /home/perl/perl-5.16.3/bin/perl Makefile.PL -- NOT OK
> Running make test
> Make had some problems, won't test
> Running make install
> Make had some problems, won't install
> ---------------------
This problem, I haven't seen before. But it's not related to prompting. The fact that you're able to achieve a successful install manually (make, make test, make install) indicates that your setup is capable of installing Inline and Inline::C. And as indicated earlier, the prompting is working as intended.