Ken Williams wrote:
Hi all,
One might have noticed that a couple weeks ago I checked in some code in
the M::B repository called inc/latest.pm . The idea is to allow users
to put a bundled copy of M::B in their distribution so that their users
don't have to have it pre-installed, but to still *allow* users to have
their own copy pre-installed if it's at least as new as the bundled
one.
This is something I definitely want to take advantage of. Presumably,
once you've resolved the issues you discuss, latest.pm will be part of
the release on CPAN?
For instance, in a Build.PL:
use lib 'inc';
use latest 'Module::Build'; # Loads bundled or existing copy, whichever's newer
my $build = Module::Build->new(...);
I recall having great difficulty getting a Module::Build subclass to
work correctly (be used) during all possible installation methods if I
had it in a subdir and had to "use lib 'subdir'". In the end I was
forced to just have my subclass in the same dir as Build.PL. Has anyone
reported similar difficulties? Or do you think your above code
suggestion with "use lib 'inc'" would really work with no problems?