I am trying to install Win32::TieRegistry for use in a perl program that I will run in WSL (under emacs). Details about the perl program I am writing at the end. I see that the above module should let me query the Windows Registry from perl.
I get the following error when in cpan I do:
cpan[16]> install Win32API::Registry
Running install for module 'Win32API::Registry'
CHORNY/Win32API-Registry-0.33.tar.gz
Has already been unwrapped into directory /home/cfclark/.cpan/build/Win32API-Registry-0.33-0
CHORNY/Win32API-Registry-0.33.tar.gz
'/usr/bin/perl Makefile.pl INSTALLDIR$=site' returned status 65280, not re-running
cpan[17]> install Win32::TieRegistry
Running install module 'Win32::TieRegistry'
CHORNY/Win32-TieRegistry-0.30.tar.gz
Has already been unwrapped into directory /home/cfclark/.cpan/build/Win32-TieRegistry-0.30-1
CHORNY/Win32-TieRegistry-0.30.tar.gz
Has already been prepared
CHORNY/Win32-TieRegistry-0.30.tar.gz
Has already been made
Running make test for CHORNY/Win32-TieRegistry-0.30.tar.gz
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t .. skipped: Not testing on non-Windows
t/02_main.t .... Can't locate Win32API/Registry.pm in @INC (you may need to install the Win32API::Registry module) (@INC contains: /home/cfclark/.cpan/build/Win32-TieRegistry-0.30-1/blib/lib /home/cfclark/.cpan/build/Win32-TieRegistry-0.30-1/blib/arch /home/cfclark/.cpan/build/YAML-1.30-1/blib/arch <and a bunch more directories but not ones for Win32-TieRegistry-0.30-0>
BEGIN failed--compilation aborted at t/02/main.t line 17.
t/02_main.t .... Dubious, test returned 2 (wstat 513, 0x200)
No subtests run
My goal is to convert a Windows .cmd file which gets some data out of the Windows registry (using reg query) into a perl program I can run under (emacs under) WSL. I initially tried converting the .cmd script to BASH, but I needed some regex operations on the registry output that were easier to do in Perl. I also tried system('reg.exe', 'query' .....) but that seems to never return to the emacs shell, i.e. the perl program just hangs after that system command.
In any case, the issue seems to be that installing Win32API::Registry failed and it refuses to re-install it. Thus, the relevant directory was never added to the @INC search path. However, I don't know how to tell cpan to fix that issue.