# from David E. Wheeler
# on Tuesday 16 September 2008 10:25:

>> _backticks()       - starts with an underscore
>
>I've used this one many times. I'd like to see it documented without  
>the underscore.

Because you want to capture the output of a command or because you want 
to have quoting bugs?

>> So only do_system() was documented.  My inclination would be to
>> deprecate that or at least discourage its use.  And note: the
>> documentation doesn't say anything about PERL5LIB.
>
>What would replace it?

I'm not sure about the general form of "system(), but with dwim 
PERL5LIB" - if you're calling perl, let's make it a perl-specific 
method.  If you're calling some other command which will call perl and 
expecting the dwim PERL5LIB to propagate, we have a problem with the 
size of the environment.

Possibly a PERL5OPT=-M$abspath/theselibs.pm would do the trick, but if 
so then that covers the general case *outside* of do_system() or 
whatever (except perhaps some juggling in VMS.)  If we're trying to 
make it "just work", then any code under test using a plain 
system()/exec() should also "just work".

>What do you plan to replace these things with?

If I knew that to a sufficient level of detail to make it clear, I would 
have code.  Perhaps you would like to meet up and help with the design?

I've been thinking that the Compat needs its own UNIX/Windows/etc 
classes - or maybe just tables of methods which are installed in the 
Compat object at compile-time.  But basically some of it goes in 
Compat.

Other parts could maybe be made into Module::Build->sys->something(), 
such that there is a more compact object which could be more easily 
tested and decoupled where necessary, etc.  Implicit in this is the 
idea of collecting the setup and knowledge of the system and making it 
be distinct from the builder.

I guess the guiding concept would be "does an author need to override 
this method to create their custom build class?" - if that answer 
is "no", then the method really belongs in a utility or some other 
small piece which M::B then 'hasa's.

Still only a sketch.  I suspect that whatever we come up with will also 
inform the plugins scheme.

But first, there's still this t/xs.t failure.

--Eric
-- 
"...our schools have been scientifically designed to
prevent overeducation from happening."
--William Troy Harris
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to