tmaly has asked for the wisdom of the Perl Monks concerning the following question:

Monks, I have searched for an answer to this, but I have not been able to find an answer. Is there a way to tell CPAN when starting the shell up to use Module::Build instead of the traditional MakeFile.PL for this session and also apply it to any module dependencies that will need to be installed?

I have run into a limitation on windows xp with strawberry perl where certain modules will not install because the lines in the makefile exceed the length that can be handled by dmake.exe.

The author told me to use Build.PL, but I only know how to do this on the commandline for a single module. Since the modules I am looking at have dependencies, I am hoping to find a way to change the preferences of CPAN for a session to choose the Build.PL if it exists over the MakeFile.PL.

  • Comment on CPAN question on Module Build Preference

Replies are listed 'Best First'.
Re: CPAN question on Module Build Preference
by jettero (Monsignor) on Apr 23, 2009 at 15:38 UTC
    o conf prefer_installer MB

    Other choices include: EUMM or MB or RAND

    you can choose to o conf commit (or not). It's really up to you.

    -Paul

      .. the lines in the makefile exceed the length that can be handled by dmake.exe.

      'dmake -V' will output the default MAXLINELENGTH value (32766 for me).That length limit *can* be increased using the -x switch. Instead of running simply dmake, one could run (eg):
      dmake -x MAXLINELENGTH=100000
      One could probably make that the default for $Config{make} by amending the value assigned to make in Config_heavy.pl accordingly. (This would, no doubt, create havoc with any Makefile.PL that tested the condition $Config{make} eq 'dmake' :-))

      I also googled up the solution that the same could be achieved by adding MAXLINELENGTH = 100000 to strawberry/c/bin/startup.mk but I wonder if that really works. And it was also claimed that one could open up the Makefile and specify MAXLINELENGTH = 100000 (or whatever) in it.

      Anyway, I just wanted to point out that there are other ways (well, one at least) around the problem - though I'm not suggesting they're any better than the solution chosen by the op.

      Cheers,
      Rob
        This is interesting. I wonder if increasing the line length would help building Gtk. I thought it was a microsoft "shell" limitation.

        -Paul

Re: CPAN question on Module Build Preference
by tmaly (Monk) on Apr 23, 2009 at 16:12 UTC
    Thanks Paul, that did the trick. -Ty