On Fri, Oct 17, 2003 at 10:35:36AM +0000, Slaven Rezic wrote:
> > How do you plan on assigning PERL_MM_DEFAULT_DB on a per module basis
> > from CPAN/CPANPLUS?  Or will you build One Grand Default File and One 
> > Grand Makefile.PL Parser?
> > 
> 
> PERL_MM_DEFAULT_DB is global for all modules. The key of the dbm file
> could be "$extension_name $prompt_text". An additional Makefile.PL
> parser is not necessary, just the change to prompt() [and telling the
> module authors to use prompt() everywhere interactive configuration
> is necessary].

I simply don't see this as scaling.  The text of the prompts is going to
change in small ways all the time, so you can't rely on simply string
equality.  Regexes might be able to get away with it, but than requires
an MLDBM approach to the DBM file since we now have to do something like
this:

        my $defaults = $Default_DB{$module_name};
        my $value;
        foreach my $regex (keys $defaults) {
            if( $prompt =~ /$regex/ ) {
                $value = $defaults->{$regex};   
                last;
            }
        }

And how do you edit that DBM file?  Do we need to ship a tool for that
as well or does every user write their own program for that?

And then what about Module::Build-based modules?  Do they need to
duplicate that?

No, this is definately a major new feature that I don't want to get into.
Also, this strikes me as something better handled inside the CPAN shell.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
I need a SHOWER a BURGER and some ROBOTS, STAT!
        -- http://www.angryflower.com/allrigh.gif

Reply via email to