Attempt to reload Net/ aborted

I have an issue using Net::SMTP::TLS::ButMaintained with perl 5.36 build (on Windows 11). I was previously using perl 5.28 without issue. It fails with the following message:

Attempt to reload Net/ aborted.
Compilation failed in require at …/site/lib/Net/SMTP/TLS/ line 14.
BEGIN failed–compilation aborted at …/site/lib/Net/SMTP/TLS/ line 14.
Compilation failed in require at …\ line 9.
BEGIN failed–compilation aborted at …\ line 9.

Other information: line 14: use Net::SSLeay; line 9: use Net::SMTP::TLS::ButMaintained;

perl 5.36

Net::SMTP::TLS::ButMaintained 0.24
Net::SSLeay version 1.92
IO::Socket::INET version 1.51
IO::Socket::SSL version 2.083

perl 5.28

Net::SMTP::TLS::ButMaintained 0.24
Net::SSLeay version 1.84
IO::Socket::INET version 1.39
IO::Socket::SSL version 2.054

I am not knowledgeable enough to resolve this, hence I am seeking advice here.

“Attempt to reload (modulename).pm aborted”
often means that a dll needed by that module is missing or incompatible.

In this case, I think you have a problem with your openssl dll. The nature of the problem would depend on the build date for your 5.36 project. It if was built in the March/April timeframe it could have been affected by a bug we had with the builder for Net-SSLeay, and a rebuild would fix it.

(Because you’re on Windows, it’s also possible that there’s a third-party version of OpenSSL at a different revision which is higher on your search PATH than the copy of OpenSSL that Net::SSLeay needs to find. dll hell still exists.)

However, if the build date is within the last week or so, you could have OpenSSL 3.0. While Perl 5.36 can use version 3 of OpenSSL, there are still modules which can’t. Net::SMTP::TLS is old code, which is why the modernized version Net::SMTP::TLS::ButMaintatined exists. Since the original code base is far older than OpenSSL 3, this might be a module which must still consume OpenSSL 1.1.1. In this case, going to the Configuration Pane and pinning OpenSSL to might well get you a new build that will solve this problem.

Thanks for your reply. I only created the 5.36 build for the first time yesterday because I needed an additional module. Until then I was still using 5.28 (and not updating to avoid issues like I have now).

I will try your suggestion.

I wrote the code that uses Net/SMTP/TLS/ a very long time ago, before Net::SMTP included support for TLS and SSL. I have rewritten my code to use Net::SMTP.

As I am not using Net/SMTP/TLS/, the aborted attempt to reload Net/ is no longer an issue for me.

So, I am currently no longer looking out for replies to this topic or to Compilation is failing for Net::SMTP::TLS::ButMaintained with perl 5.36 build on Windows.

That leaves Unusable Perl 5.36 build - compilation failures due to various dll files not loading still requiring resolution.

The ‘attempt to reload Net/ aborted’ issue goes away if the exec folder is above the bin and site\bin folders in PATH.

I am waiting to hear why the wrong order causes issues. See Unusable Perl 5.36 build - compilation failures due to various dll files not loading - #12 by onlyonelikeme.