On Sun, Jan 25, 2009 at 06:00:55PM +0000, MJ Ray wrote:
> Lyle <[email protected]> wrote:
> > Is there a possible requisites you can define? So that when the module 
> > is built with cpan, it pauses asking if you want the extra modules 
> > installed and defaults to no if you don't respond is 30 seconds?
> I think the current answer is to use Module::Build ...

or Module::Install.  I don't particularly like either of 'em, but M::I's
questions about optional modules are nice and predictable, so I can
automate them away using Expect and CPAN.pm distroprefs.

If you want to use ExtUtils::MakeMaker like all right-thinking people
do, then you can use its prompt() function to get user input in a nice
CPAN.pm-friendly manner (mumble mumble IO buffering mumble).  It lets
you specify a default, but not a timeout.  Do *not* just read from STDIN
in a Makefile.PL.  This will Fuck Shit Up, because both CPAN.pm and
CPANPLUS can buffer IO and your users can end up not seeing the prompt
until after they've answered the question!

Based on that user input, create a hash containing all the various
optional modules the user specified, and pass that to WriteMakefile.

-- 
David Cantrell | Enforcer, South London Linguistic Massive

"Every normal man must be tempted at times to spit on his hands,
 hoist the black flag, and begin slitting throats." -- H. L. Mencken
_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to