With the responses to far to design questions favoring only messing
with inc/ in distdir,  I've worked up a first-draft adapted from
Eric's code.

You can find it in the subversion branch:

    http://svn.perl.org/modules/Module-Build/branches/inc-bundling

Here's what a Build.PL would look like using it (with a
Devel::AssertOS example added):

    use inc::latest 'Module::Build';
    use inc::latest 'Devel::AssertOS::Unix';

    Module::Build->new(
      module_name => 'Local::Blah',
      license => 'perl',
    )->create_build_script;

I've bundled up the resulting tarball if people would like to check it
out and see how it works:

    http://echo.dagolden.com/~xdg/Local-Blah-v0.1.2.tar.gz

This also includes a share/ directory, so if you run the Build.PL on a
perl without File::ShareDir and with Module::Build <= 0.35, you'll see
a warning that the File::ShareDir prereq isn't available.  This shows
that the bundled Module::Build was used as it knows to add
File::ShareDir as a prereq when share/ is present.

Please play around with this if you have time.  After some testing,
I'll merge this into the trunk.

Note: Getting Devel::AssertOS* to work takes some trickery since the
packlist is really under Devel::CheckOS.  If there are other things
you think people might be inclined to bundle, please let me know what
they are so I can add them to a mapping file in M::B::Base if the
packlist is under a diffferent name. This will help make it DWIM for
"common" things people might bundle.

(It also exposed an interesting bug for File::Spec/Cwd in that the
PathTools Build.PL never defines module_name and thus doesn't create a
packlist, whereas nstalling PathTools with Makefile.PL *does* create
the packlist.)

David

Reply via email to