Re: DWIM bundling

Eric Wilhelm <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.module-build
Message-ID <[email protected]>
# from Nicholas Clark
# on Monday 07 September 2009 08:39:

>Is getting M::B bundling working anyone's itch?

Bundling "works" in that the inc/latest.pm scheme works.

Bundling "can be done" if you run the bundle.pl script from the dist and 
change your Build.PL to look in inc and use the latest.pm.

What is missing?  I don't think we want "bundle it without me knowing". 
Maybe just need "bundle it without me having an M::B tarball at hand"?

I guess the main blockage is that latest.pm has a namespace collision 
with AndyA's more recent cpan dist.  And there needs to be an 
installed .pm to make it DWIM via e.g. just changing your Build.PL to 
have:

  use inc::latest 'Module::Build';

But then the inc/latest.pm in your @INC needs to defer to the one 
in './' (where '.' is *assumed* to be at the end of @INC.)  And then 
you also have to deal with whatever interaction might happen between an 
installed inc/latest.pm and the bundled ./inc/latest.pm -- which I 
think has bitten me with Module::Install at least a few times.

And, I suppose bundling from an installed Module::Build requires reading 
some packlists.  Plus, ensuring that your bundled code is replaced with 
the latest installed version before './Build dist'.

There's also an issue of getting any extras (e.g. EU::CBuilder) into the 
bundle -- or do those just get treated as build_requires?

It seems like a better idea to have an external tool do the bundling 
(ala contrib/bundle.pl), and maybe attempting to modify your Build.PL.

Or, just go with the slightly wordier Build.PL bit:

  use lib 'inc';
  use latest 'Module::Build';

... and have ACTION_dist() do the bundling if it can see latest->VERSION 
or something like that.

--Eric
-- 
To a database person, every nail looks like a thumb.
--Jamie Zawinski
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.