Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello

Is it possible in Perl to load at runtime a binary file? In particular, I am using on a macOS the module 'Net::SSLeay' which calls 'libssl.3.dylib' as seen at installation time. I want to be able to use any other version of 'libssl.3.dylib' in other non-standard positions on my machine, passing its location at runtime.

Replies are listed 'Best First'.
Re: load binary at runtime
by Corion (Patriarch) on Aug 24, 2022 at 09:45 UTC

    Under macOS, the magic environment variable is DYLD_INSERT_LIBRARIES. You point it to the library you want preloaded and it should load that library instead of libssl.3.dylib.