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

Good day, dear Monks, I have been trying to install Parse::RecDescent in a local::lib to isolate the dependencies of my application from the system. (Actually, it's a prereq for Mail::IMAPClient, which is the one I really need.) I have been installing modules with this:
my $dir = "/usr/local/MailControl"; $ENV{PERL5LIB} = "$dir/lib/perl5"; $ENV{PERL_LOCAL_LIB_ROOT} = $dir; $ENV{PERL_MB_OPT} = qq(--install_base "$dir"); $ENV{PERL_MM_OPT} = qq(INSTALL_BASE=$dir); system "cpanm --no-man-pages Mail::IMAPClient";
I'm installing with a userid with write permissions to the target directory, but not as root. This is failing, and the message in the build log says:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Can't create '/usr/local/share/man/man3' Do not have write permissions on '/usr/local/share/man/man3' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! at /usr/share/perl5/Module/Build/Base.pm line 2988
Can anyone point me to a reason that the install is trying to install the documentation when I supplied --no-man-pages, and why if it's going to do that it is ignoring my installation directory? Since this is bundling a procedure that will be executed by puppet, I don't want to have to stop and modify something that is downloaded. I want it to run as scripted every time. Any insights would be appreciated.

Replies are listed 'Best First'.
Re: Problems installing Parse::RecDescent in a local::lib
by perlfan (Parson) on Feb 24, 2016 at 15:27 UTC
      Sometimes it's the obvious oversights that result in the most un-obvious failures. I had omitted building local::lib into my library. With that included, the installation completed without problem. The fact that a dozen other packages had installed without problem had lulled me into thinking the problem was with this package. Thanks very much for the pointer that got me on the right track.