Re: [Module-build-general] read_config()?
Status: Beta
Brought to you by:
kwilliams
|
From: Scott B. <lis...@ni...> - 2003-05-22 02:54:52
|
On Wed, 21 May 2003 10:09:19 -0500, Ken Williams wrote:
>
> If there's a timing issue I'm not considering, i.e. if the META.yml
> file isn't created yet, then we might have to figure something else out.
Timing is indeed a problem. I need the data when the PL
files are being processed; well before dir_dist is called.
I think the changes I need are trivial, but I'm not sure
what logic they would break.
Why is the META.yml file not created until ACTION_dist_dir()
is called? If write_metadata($metafile) preceded
process_PL_files() in ACTION_build() the timing issue would
be solved.
Then, to eliminate the guess work by lib/*/foo.PL to find
META.yml, the calls to run_perl_script() in process_PL_files()
should be augmented to include the path to META.yml as the
$postargs argument. That way scripts that care about the
current configuration could find it reliably as $ARGV[0].
One last request, the hash passed into Module::Build::new()
should have a field dedicated to the calling module's private
data. By defining the technique to save private data now, you
avoid name collisions later. Something along the lines of:
my $build = Module::Build->new
(
dist_name => "Sample",
dist_version => "0.1",
module_data => {
public => "library",
private => "gomer pile"
},
);
Predictably I'd like module_data to be included in META.yml.
If those changes are made, transferring information from
the Build.PL file to the various foo.PL files would be solved.
I can create a patch if you like.
Scott
|