Son of MacPorts openssl versus Perl

This post is a follow-up to MacPorts openssl versus Perl. That post told of a problem with a recent MacPorts openssl upgrade, and gave a workaround.

The right thing to do, however, is to use the current openssl. That involves finding all Perl modules that use openssl and re-installing them.

To do this, I wrote a small Perl script that traversed @INC looking for binary files. It spawned the file command to determine whether they were Mach-O files. If they were, otool -L was used to determine whether they actually linked to openssl. The script requires Perl 5.10, but uses only core modules. The file and otool commands come with Mac OS X, at least with OS 10.11 El Capitan. The script itself is available as a GitHub gist.

In my case all I found was Net::SSLeay. So I took my MacPorts openssl back to the current version using the same commands detailed in the previous post to do the downgrade, and then did the following in the cpan client:

cpan> test Net::SSLeay
cpan> # to make sure it passes
cpan> force install Net::SSLeay
cpan> # forced because it is already installed

Leave a comment

About Tom Wyant

user-pic I blog about Perl.