Background
Work with OS X and use macports for additional utilities and libraries. macports installs everything in /opt/local . But by default, perl in macports is 5.12, specifying a higher version, for example, to break many ports, so I use my own 5.16 perl installed with perlbrew .
So, I have the default libraries /usr/lib (provided by Apple), but you want to associate XS-based perl modules with macports provided by libs and include in /opt/local .
Now the question is when installing modules with cpanm (in my perlbrew perl tree) here somehow, how to specify the global default search path for libraries and includes cpanm (to the module building process) first search /opt/local/{lib|include}
AFAIK cpanm lacks any switches for this, maybe some ENV variables? Or any simpler solution, how to edit each Makefile.PL?
jm666 source share