Todd Olson via RT <[EMAIL PROTECTED]> on 2007/11/28 Wed AM 08:39:24 CST wrote:

>
>One feature I have been exploiting extensively in my Perl 5 installs
>is cpan.pm's  MyConfig.pm  which permits me to overlay Perl's %Config
>and to swap sets of config changes in and out with out messing with
>the base Perl 5 install.  I find this to be a useful way of organizing
>experiments and changes.
>
>Does Parrot's Config architecture provide this capability?
>

No, it does not.  The 16 instances in which modules underneath config/ call 
'use Config;' all refer to the Config.pm associated with the instance of Perl 
used in 'perl Configure.pl'.

The problem arises in the fact that users can and may need to provide 
information to the configuration system via command-line options to 
Configure.pl or by interactivity at the prompt.  This information can be 
different from the information supplied in %Config.  This means that if I as 
the tester/maintainer write tests which rely too heavily on %Config, those 
tests will fail on systems where there is a discordance between %Config and 
user-supplied information.

Another problem arises in the fact that %Config is consulted early in the 
configuration process for a value for a particular element in the 
Parrot::Configure object's data structure.  That element's value may then be 
overwritten in subsequenct configuration steps by, for instance, C programs 
which probe the system.  But still later in the configuration process, a step 
may call for once again consulting the *original* value supplied by %Config -- 
not the corresponding updated value inside the object.  (Whether that's 
absolutely necessary I can't say.  I'm proceeding on the assumption that the 
colleagues who wrote the config step classes in the first place knew what they 
were doing, so my job is to preserve the existing functionality and do no harm 
to it during refactoring.)

While I can see the value of the approach you take for development and 
debugging purposes, I think it would probably be very difficult to implement in 
a test suite intended to be executed on many different platforms.  But it may 
prove fruitful in the future.

Thank you very much.


Reply via email to