in reply to Re: MacOSX: perlbrew + cpanm, dependency check broken?
in thread MacOSX: perlbrew + cpanm, dependency check broken? [SOLVED]

Hello,

Output of perl -v:

~ -> perl -v This is perl 5, version 21, subversion 6 (v5.21.6) built for darwin-2l +evel [... stripped the copyright etc...]

The actual perl bin directory is ~/perl5/perlbrew/perls/perl-5.21.6/bin. This is the /Users/sdk/perl5 directory:

~ -> ls -1 perl5/*/* perl5/perlbrew/build.perl-5.21.6.log perl5/lib/perl5: Getopt darwin-2level perl5/man/man3: Getopt::Mixed.3 perl5/perlbrew/bin: cpanm patchperl perlbrew perl5/perlbrew/build: perl-5.21.6 perl5/perlbrew/dists: perl-5.21.6.tar.bz2 perl5/perlbrew/etc: bashrc csh_reinit csh_set_path csh_wrapper cshrc perlbrew-completion.bash perlbrew.fish perl5/perlbrew/perls: perl-5.21.6

I've changed my env. variables to the values below and tried again. No change. Exactly the same cpanm output.

PERL_LOCAL_LIB=/Users/sdk/perl5/perlbrew/perls/perl-5.21.6/lib # I tri +ed with and without /lib PERL_MB_OPT=--install_base "/Users/sdk/perl5/perlbrew/perls/perl-5.21. +6" PERL_MB_OPT='--install_base "/Users/sdk/perl5/perlbrew/perls/perl-5.21 +.6"' PERL_MM_OPT=INSTALL_BASE=/Users/sdk/perl5/perlbrew/perls/perl-5.21.6
Thank you for looking into this. - sdk

Replies are listed 'Best First'.
Re^3: MacOSX: perlbrew + cpanm, dependency check broken?
by Anonymous Monk on Dec 04, 2014 at 16:00 UTC
    Output of perl -v:
    Uppercase -V. It should look like:
    Summary of my perl5 (revision 5 version 20 subversion 1) configuration +: (tons of stuff)
    This is the /Users/sdk/perl5 directory:
    Well it seems your Getopt is installed right there (for some reasons), but I think that's not where Perl looks for them. Maybe you tried to install Perl manually before deciding to try perlbrew, and now there are some leftovers from manual configuration (in .bashrc)?

      The perl5 directory got created from perlbrew. It was not there before. The system of course has a perl installed. OSX comes with perl - but I didn't do anything with it. I have another machine where I tried the same and it shows the same result. So either I'm systematically doing something wrong, or something with perlbrew is not right.

      I'm using zsh, but I source the bashrc generated from perlbrew. I can see in the changelog that there was a fix in the last perlbrew version in regards of perlbrew. So I also tried it with changing my shell to bash first. Same result.

      However I changed the shell by just launching bash from my zsh - I think the environment is taken over in this case.

      I've now reconfigured my system to use /bin/bash via chsh. Then I've opened a new terminal, sourced the perlbrew bashrc.... and guess what:

      IT WORKS!!!

      So the issue was either shell or environment related. I found out that new environment has only PERLBREW_* variables set. No other perl variables. I'll check on my other machine if it works in zsh if I correct this. I'll let you know.

      Thank you very much for your effort!
      - sdk