[Module-build-general] 0.19_03 released, with notes()
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-07-24 19:51:59
|
Hi,
I've released a new beta to CPAN and sourceforge
(https://sourceforge.net/projects/module-build/)
There's really just one entry in the changelog since 0.19_02:
- Added a notes() feature, which helps share data transparently
between the Build.PL and t/*.t scripts. (XXX needs documentation)
This is really a cool feature, actually. Here's how it's used:
------ in Build.PL ---------------
$m->notes(foo => 'bar'); # Set a notes() entry
------ later, in t/notes.t --------------
use Module::Build;
my $m = Module::Build->instance;
my $value = $m->notes('foo'); # Retrieves notes() entry 'bar'
I use Data::Dumper to store the keys & values, so pretty much any data
can be shared in this way.
I haven't documented it yet because I'm not completely sure about the
interfaces yet. I really like the idea of the instance() method, but
I'm not sure this is the right name because it's not a singleton class.
Maybe current() or something. And there may have to be some caveats
about the fact that this object isn't exactly the same object as the
one created in the Build script, though for most purposes it should be
close enough.
Alternatively, I could get notes() to work as a class method, but
currently it doesn't. I think that would probably be a kludge anyway,
it wouldn't really know the values of the config variables that need to
be in the $m object.
Let me know if you have feedback about it.
-Ken
|