>From: Andy Dougherty via RT 
>Date: 2007/12/11 Tue AM 08:38:17 CST
>Subject: Re: [perl #48459] [PATCH]:   Refactor config/inter/progs.pm into 2 
>config steps

>
>I don't think this will work.  Specifically, to conduct a "basic test of 
>that compiler's functioning" you need to compile *and link* a program, but 
>you haven't picked a linker yet.  

Andy, that's what I thought at first, and you may well be correct.

However, as I read the code in the current HEAD of config/inter/progs.pm, the 
*only* variable passed to the internal test_compiler subroutine is $cc (line 
130).  $cc is assigned to much farther up inside the runstep() method (lines 
61-62), and immediately thereafter assigned to the 'cc' argument in the 
Parrot::Configure object (line 63).  All the other values you mention are 
assigned between lines 64 and 130, but, AFAICT, none of those assignments 
depend on either $cc or the value assigned to 'cc' inside the configuration 
object.  The test_compiler() method, *as written*, does not appear to depend at 
all on any of the other values located on the system or selected at the prompt, 
and it does not appear to depend on the Parrot::Configure object.  If so, then 
the refactoring I suggested is plausible.

Of course, it may very well be that test_compiler() was misconceived all along 
and that it *should* have been passed the current state of the 
Parrot::Configure object ($conf).  What do you think?

kid51

Reply via email to