[Module-build-general] read_config()?
Status: Beta
Brought to you by:
kwilliams
|
From: Scott B. <lis...@ni...> - 2003-05-21 03:17:07
|
Is there any way to cleanly read the configuration information
stored in _build/? I want to determine the version information,
which I plan on storing in Build.PL, in another .PL file.
The following construct is what I came up with:
my $build = new Module::Build
(
dist_name => undef,
dist_version => undef,
);
$build->read_config();
printf("version is \"%s\".\n",
$build->{properties}{dist_version});
new() complained unless I called it with dist_name and
dist_version. (It was also noisy on STDOUT, but that's a
separate issue.)
I could duplicate the code in read_config(), but I am loath
to break encapsulation so blatantly.
Is there a better way to get at configuration data?
Scott
|