On Wed, 30 Jul 2003 12:49:10 +0200, Jos I. Boumans <[EMAIL PROTECTED]> wrote:
> 
> On Wednesday, Jul 30, 2003, at 12:14 Europe/Amsterdam, Dominic Mitchell 
> wrote:
>>> the accepted procedure[1] nowadays is to do something roughly like the
>>> following:
>>> *   write an interactive Makefile.PL/Build.PL that gathers the
>>> information.
>>
>> Please don't do this.  Think of the children^Wpackagers!
> we are talking about the times where interactivity is a must.
> i'd be interested to know how you'd make cpanplus' install 
> non-interactive for example.

There are no such times.  If the information isn't provided, skip the
tests.  Simple.

>> If you want to change things in Makefile.PL, look at @ARGV or %ENV.
> as suggested below as well -- if possible every question in Makefile.PL 
> should be overridable by a commandline switch. all questions met == no 
> interactivity.

That's fine and reasonable.  I just take issue with the default of being
interactive.  It's a complete arse, even if you're not doing clever
packaging stuff.  Take the simple example of installing a module with
lots of dependencies.  You set off the build to run over lunch, go away
and come back to find that the 3rd module it depended on is asking for
your database connection details.  It's exceedingly annoying.

CPAN is also another good reason for choosing environment variables;
passing command line options for an individual module is really
difficult.

>>> *   write this information out to a config file, so it can be reused for
>>> multiple installs.
>>> *   try and have command line switches that give the answers to your
>>> question, so interactivity is not needed when the person knows what to
>>> do, ie;
>>>     perl Makefile.PL --db=foo --db-user=bar --db-pass=zot
>>> * alternately, use %ENV variables, but this is the method of last
>>> resort.
>>
>> I'd say environment variables are absolutely the right way of doing 
>> this
>> sort of thing.  Look at DBI_DSN et al.  They're even (fairly)
>> standardised.
> 
> that doesn't work for reuse easily though, which is the only drawback 
> here.

[back from lunch]

I don't understand your comment about reuse I'm afraid.

-Dom

-- 
| Semantico: creators of major online resources          |
|       URL: http://www.semantico.com/                   |
|       Tel: +44 (1273) 722222                           |
|   Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |

Reply via email to