in reply to Asking a question in Makefile.PL
If you want to control the process yourself remember that Makefile.PL is just perl so before the call to WriteMakefile do whatever you want:
use ExtUtils::MakeMaker; eval{require Some::Module}; if ($@) { my $reply = prompt("Some::Module not installed. Install (Y/n)", "Y +"); install("Some::Module") unless $reply =~ m/n/i; } sub install { my $module = shift; eval{require CPAN}; die "Aaaaagh! $@\n" if $@; CPAN::Shell->install($module); } WriteMakefile( ... );
Update: In line with grinders post changed to EUMM prompt routine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Asking a question in Makefile.PL
by grinder (Bishop) on Apr 20, 2008 at 09:41 UTC | |
|
Re^2: Asking a question in Makefile.PL
by bingos (Vicar) on Apr 20, 2008 at 08:30 UTC | |
by tachyon-II (Chaplain) on Apr 20, 2008 at 11:20 UTC | |
by Anonymous Monk on Apr 20, 2008 at 19:12 UTC |