On Jan 26, 2005, at 9:00 PM, Ken Williams wrote:
On Jan 25, 2005, at 3:26 PM, John Peacock wrote:
Jos I. Boumans wrote:I suppose if Module::Build::Base would say, at the top:
$VERSION = $Module::Build::VERSION
this would make EU::MM, M::IV, M::L::C and of course CPANPLUS::inc find a 'real' version declaration, rather than something evil that will blow away UNIVERSAL::VERSION.
Yes, that would be an appropriate fix to M::B::Base.
That won't work. All those tools evaluate the version line in isolation, not by loading the modules and checking the value of $VERSION. In other words, when Module::Build::Base's version is checked, Module::Build won't be loaded, so the version would be undef.
Well, the above one line fix adresses 2 issues, and they both 'do work':
1) Under normal operation, M::B::Base is loaded from M::B, so the $VERSION variable would be defined. Anyone using M::B programatically
would find what is expected.
2) All tools using the EU::MM 'standard' regex would find a valid version
declaration. One that does not happen to override *UNIVERSAL::VERSION
when being evaluated in the way they have been for quite some time now.
So even though in scenario 2 we will not always get a real version number (it
would only when M::B was, for some reason, already loaded), it has the happy
benefit of Doing The Right Thing when being inspected by tools that look for
$VERSION declarations, rather than override built-in methods.
Also, it conforms to the generally accepted view that 'everything should have a
version number, even if inherited'.
If nothing else, such an addition wouldn't /hurt/ anything now, and would stop
segfaults in bleadperl for the moment (of course, they'd need to be fixed proper anyway).
my $0.02;
--
Jos Boumans "Time is nature's way of making sure all the sh*t doesn't happen
at once"CPANPLUS http://cpanplus.sf.net
