Recently, on IRC (off the top of my head):

<klapperl>: so can you explain why the compatibility layer is broken?
<ewilhelm>: jeez, it is the *compatibility layer*

I think it's time that Module::Build considers another compatibility
layer in addition to the existing one. It would be the one for authors
who consider the compatibility layer broken for their demands.

This is just a raw sketch to get some talk going, I have not actually
tried to work this out. So this is the rough layout:

  Build.PL has a new option:
    diplomatic_makefile_pl => 1,

  The generated Makefile.PL would be very short:
    if (have_Module_Build_installed()){
      system $^X, "Build.PL";
      write_diplomatic_makefile();
    } else {
      beg_user_to_install_module_build_asap();
      write_traditional_compat_makefile();
    }

  The generated diplomatic Makefile would then contain:
    default:
      ./Build
    test:
      ./Build test
    install:
      ./Build install
    [...etc...]

So the effect would be that

(1) the module would ship with a Makefile.PL (so old CPAN.pm will not
    try to invent one on its own).

(2) Users with Module::Build installed get the best the author can
    offer.

(3) Users without Module::Build get the best Module::Build::Compat can
    offer.

Has this been tried? Does it have pitfalls? It seems so easy and
natural. Isn't anybody keen implementing it?

I know that there is to put some more work into this than the above
sketch. But as the term "diplomatic" suggest, most work would be to
appear polite to the user instead of demanding and guide them.

-- 
andreas

Reply via email to