First, you can avoid using XS with the Protocol :: TLS module. This is pure perl and you can use it over the main socket module.
Secondly, you can avoid using OpenSSL with Crypt :: MatrixSSL. MatrixSSL seems easy and safe. See IO :: Stream :: MatrixSSL, for example, code.
doublebind
source share