do-know / Crypt-LE

Crypt::LE - Let's Encrypt / Buypass / ZeroSSL and other ACME-servers client and library in Perl for obtaining free SSL certificates (inc. generating RSA/ECC keys and CSRs). HTTP/DNS verification is supported out of the box, EAB (External Account Binding) supported, easily extended with plugins, easily dockerized.
https://Do-Know.com
Artistic License 2.0
353 stars 60 forks source link

How to add URI::Encode module to DNS.pm on Windows (using le64.exe) #84

Closed courtens closed 1 year ago

courtens commented 1 year ago

I would like to use the URI::Encode module inside the DNS.pm script.

I tried using use like this:

use URI::Encode;

but I am getting this error:

2023/05/21 12:05:18 [ Crypt::LE client v0.39 started. ] 2023/05/21 12:05:18 Cannot use the module to handle challenges with - Can't locate URI/Encode.pm

I also tired required like this:

require 'C:\\Perl64_Strawberry\\perl\\site\\lib\\URI\\Encode.pm';

but that too is not working.

Do I need to copy and past the content of Encode.pm into the top section of DNS.pm to use encode?

FYI: I added C:\Perl64_Strawberry\perl\site\lib\ to my Windows Environment.

do-know commented 1 year ago

Perl searches for libraries through a set of paths in @INC array. To specify an additional location, just use:

use lib 'some_path_to_libs';

before using

use Module;

to load the module under that path. Whether that path would be the path to the Strawberry libraries or some other location where you might store those additional modules is up to you. I hope that helps.

courtens commented 1 year ago

It looks like my environment is somehow messed up. Thank you ... that worked.