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

Does anyone know if there is any way to pass Makefile,.PL arguments when using one of the cpan modules? I need to do
perl Makefile.PL EXPATLIBPATH=E:\expat\2.01
in order to build XML::Path on Windows. I'd rather NOT do it by hand or start patching. Thanks

Replies are listed 'Best First'.
Re: Makefile.PL args in cpan(p, -, etc)
by Anonymous Monk on Sep 23, 2013 at 02:04 UTC
      Thank you, anonymous. I will alter the Makefile.PL to set PERL_MM_OPT based on envvars that should be set before cpanp is run.

        Thank you, anonymous. I will alter the Makefile.PL to set PERL_MM_OPT based on envvars that should be set before cpanp is run.

        Why? I thought you wanted to avoid editing files?

        If you're going to edit files, why not set EXPATLIBPATH directly instead?

        Weird