Did you read the cpan documentation for Net::SSLeay? It has a section on how to use it in a multi-threaded environment. It should probably work if you follow those instructions, unless you're also using another module that independently initializes openssl.