After upgrading to OS 10.10 I had to install all former used perl modules again. No problem. I thought.
Perl on OS 10.10 is "This is perl 5, version 16, subversion 3 (v5.16.3) built for darwin-thread-multi-2level" (from perl --version). The @INC looks to be (try perl -e 'print join("\n", @INC);' or perl -V):
/opt/local/lib/perl5/site_perl/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.16.3 /opt/local/lib/perl5/vendor_perl/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.16.3 /opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level /opt/local/lib/perl5/5.16.3 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl
When I try to use an unknown module, perl throws: "Can't locate Mymodule.pm in @INC ... and then: @INC contains: ... /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 and all other known (and added 5.18 perl.pm folders). Every perl dev knows that message. But read literally: @INC links obviously to 5.18 folders ! And at a first glance I supposed to use Perl 5.18.
I installed my first bunch of new modules from Macports. 5.18 portfiles. And added the new module pathes to the list /Library/Perl/5.18/AppendToPath. Worked well. But when I installed a module - not available as 5.18 in Macports - with cpan, I got trouble. The module was compiled with 5.16 (of course, see above) and was not accepted as other path in the AppendToPath file. Dynaloader mismatch.
I do not know, where the @INC list is altered at runtime. In earlier Mac OS 10 versions, the new @INC included same version module versions. I.e. an active perl 5.14 included also 5.14 modules, 5.12 included 5.12 pathes a.s.o. Why does perl 5.16 on Yosemite include 5.18 module pathes ?
To add some confusion after my post: When I try a print $^V in program code, I get 5.18. That means, you don't get what you meant to get. May be my shebang #!/usr/bin/perl starts 5.18 and not 5.16.
echo $PERL5LIB
etc). - Steffen Ullrich