Unless you build statically linked versions it should be enough to just install a patched openssl shared library (libssl.so, libcrypto.so). If you are not sure you might check with strace on linux, e.g.:
$ strace -e open perl -MNet::SSLeay
....
open("/lib/x86_64-linux-gnu/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = 3
+
+
open("/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", O_RDONLY|O_CLOEXEC)
+= 3
If you see these libs loaded dynamically all is fine and you just need to replace them by installing the updated libssl package.