Help with #!/usr/bin/perl

Sierk Bornemann sierkb at gmx.de
Mon Jun 18 08:27:48 UTC 2018



> Am 17.06.2018 um 00:01 schrieb Michael <keybounce at gmail.com>:
> 
> How do I avoid the out of date system Perl, which doesn't have the needed support modules, and installing those modules with Mac ports doesn't put them where the system Perl sees them.

What about adding the path of MacPorts’ Perl modules located below /opt/local/lib/perl5/ to the file
/Library/Perl/5.18/AppendToPath , so that the system’s Perl can find these modules as well and includes them at the end of its @INC path (check via perl -e 'print join("\n", @INC);' or perl -V)?

/Library/Perl/5.18/AppendToPath per default consists already of one path to add:
/System/Library/Perl/Extras/5.18

Adding

/opt/local/lib/perl5/site_perl/5.18
/opt/local/lib/perl5/vendor_perl/5.18

to this file/path (for instance, I have no MacPorts Perl installed at the moment, the precise paths may differ slightly depending on the concrete Perl installation via MacPorts) might suffice the need and add these modules to system's Perl @INC path. I’ve had this one or two years ago, and it worked very well.


Regards,
Sierk


More information about the macports-users mailing list