dcbecker has asked for the wisdom of the Perl Monks concerning the following question:

trying to install Win32::Registry on windows 7 using strawberry perl, and getting error. any suggestions? This is first cpan module install attempted after a virgin strawberry perl install.

C:\Program Files (x86)\Qualcomm\QCAT 6.x\Script>cpan install Win32::Re +gistry CPAN: CPAN::SQLite loaded ok (v0.203) Database was generated on Fri, 01 Nov 2013 18:23:49 GMT Running install for module 'Win32::Registry' Running make for J/JD/JDB/Win32-Registry-0.10.tar.gz CPAN: Digest::SHA loaded ok (v5.85) CPAN: Compress::Zlib loaded ok (v2.061) Checksum for C:\strawberry\cpan\sources\authors\id\J\JD\JDB\Win32-Regi +stry-0.10. tar.gz ok CPAN: Archive::Tar loaded ok (v1.92) CPAN: File::Temp loaded ok (v0.2301) CPAN: Parse::CPAN::Meta loaded ok (v1.4405) CPAN: CPAN::Meta loaded ok (v2.132140) CPAN.pm: Building J/JD/JDB/Win32-Registry-0.10.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Win32::Registry Writing MYMETA.yml and MYMETA.json CPAN: Module::CoreList loaded ok (v2.96) cp Registry.pm blib\lib\Win32\Registry.pm C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap Registry.xs + > Registr y.xsc && C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- +Registry.x sc Registry.c Could not find a typemap for C type 'FILETIME'. The following C types are mapped by the current typemap: 'AV *', 'Boolean', 'CV *', 'DWORD', 'FILE *', 'FileHandle', 'HANDLE', +'HKEY', 'H V *', 'I16', 'I32', 'I8', 'IV', 'InOutStream', 'InputStream', 'NV', 'O +utputStrea m', 'PerlIO *', 'REGSAM', 'Result', 'STRLEN', 'SV *', 'SVREF', 'SysRet +', 'SysRet Long', 'Time_t *', 'U16', 'U32', 'U8', 'UV', 'bool', 'bool_t', 'caddr_ +t', 'char' , 'char *', 'char **', 'const char *', 'double', 'float', 'int', 'long +', 'short' , 'size_t', 'ssize_t', 'time_t', 'unsigned', 'unsigned char', 'unsigne +d char *', 'unsigned int', 'unsigned long', 'unsigned long *', 'unsigned short', + 'void *', 'wchar_t', 'wchar_t *' in Registry.xs, line 548 dmake.exe: Error code 129, while making 'Registry.c' JDB/Win32-Registry-0.10.tar.gz C:\strawberry\c\bin\dmake.exe -- NOT OK CPAN: YAML::XS loaded ok (v0.41) Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Stopping: 'install' failed for 'Win32::Registry'. C:\Program Files (x86)\Qualcomm\QCAT 6.x\Script>

Replies are listed 'Best First'.
Re: cpan install error for Win32::Registry
by Corion (Patriarch) on Nov 01, 2013 at 19:39 UTC

    This seems to be a known bug (as found via the "view/report bugs" link of Win32::Registry). There also seems to be a patch available, as posted in that bug report. If you can report that patch as working, it might incite somebody to adopt the module just to apply that patch.

    If you are in a bind to modify the Windows registry, maybe consider Win32API::Registry.

Re: cpan install error for Win32::Registry
by runrig (Abbot) on Nov 01, 2013 at 19:54 UTC
    In the documentation, it says: obsolete, use Win32::TieRegistry. Why don't you use the recommended library instead?

      I'm trying to use existing code modules in 3rd party code that depend on Win32::Registry, and I dont think TieRegistry is backward compatible. So its not just a matter of making manual changes to the Registry, and I'm not inclined to muck up the 3rd party code.

      I tried downloading the cpan module, and applying the patch manually, but so far havent figured out how to install the modified tarball. tried "cpan ." with the tarball in the current directory, but thats obviously not correct.

        figured it out. just unwound the tarball, applied the patch, and then ran "cpan ." in the parent dir. seemed to work, and the 3rd party script finds the module. thanks.