Skip to content

Check for writable location if DESTDIR/destdir set #149

wants to merge 4 commits into from

1 participant


I ran into a situation where I wanted to use cpanm to install modules for later packaging.

Even though ExtUtils::MakeMaker and Module::Build were honoring the DESTDIR/destdir flags when passed in using PERL_MM_OPT/PERL_MB_OPT, cpanm's write check on the install directories was failing, causing cpanm to fall back to ~/perl5 as the install location.

This pull request tries to use DESTDIR/destdir if they are set in PERL_MM_OPT/PERL_MB_OPT when doing the write check.


Note that this patch won't catch destdir if it's defined in MODULEBUILDRC.


Ok, these changes ended up being more unwieldy than I expected. Not sure this is the best way to address supporting DESTDIR/destdir.

@jwittkoski jwittkoski closed this Jul 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.