Module::Build: incompatible with CPAN.pm

M

Markus Dehmann

I use to install Modules with the perl CPAN shell:

perl -MCPAN -e shell

I configured it so that it uses my /home/markus/modules as PREFIX for
the builds:

o conf makepl_arg "PREFIX=..."

However, Module::Build does not accept PREFIX for whatever stupid
reasons. So, everytime some module needs Module::Build to build it
becomes a big mess. Prefix is then not supported and I don't know how to
install into my home directory using CPAN.pm

Is there a workaround?

Markus
 
P

Paul Lalli

Markus said:
I use to install Modules with the perl CPAN shell:

perl -MCPAN -e shell

I configured it so that it uses my /home/markus/modules as PREFIX for
the builds:

o conf makepl_arg "PREFIX=..."

However, Module::Build does not accept PREFIX for whatever stupid
reasons.

The documentation for Module::Build does list those reasons. I make no
assertions about whether or not they are *good* reasons....
So, everytime some module needs Module::Build to build it
becomes a big mess. Prefix is then not supported and I don't know how to
install into my home directory using CPAN.pm

Is there a workaround?

This was one of my biggest complaints about Module::Build as recently
as a few months ago. So big was my complaint that I outright refused
to use any module that required Module::Build.

Thankfully, the CPAN.pm author has finally saved us from the
Module::Build/CPAN conflicts. First, make sure you have the most
recent CPAN.pm version (you need at least 1.83). Then set one of the
new values the new CPAN.pm modules gives you:

o conf mbuildpl_arg --dest_dir=/home/markus/modules

This will cause the `perl Build.PL` script to be executed with this
option, must like the makepl_arg causes the `perl Makefile.PL` script
to be executed with the PREFIX=... option.

(Make sure you do an `o conf commit` afterwards to save your changes)

Hope this helps,
Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top