Thu Jul 07 11:56:33 2022: Request 143646 was acted upon.
Transaction: Correspondence added by torsten.wer...@assyst.de
       Queue: PAR-Packer
     Subject: Antwort: Problem using Win32::TieRegistry in script packed with 
pp on Windows [rt.cpan.org #143646]
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: torsten.wer...@assyst.de
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=143646 >


Hi Roderich,
I had a look in the decomressed modules and inserted some debug messages 
to see what happens. There is a piece of code in Win32::TieRegistry:

if ( eval { require Win32::WinError } ) {
    $_NoMoreItems  = Win32::WinError::constant("ERROR_NO_MORE_ITEMS",0);
    $_FileNotFound = Win32::WinError::constant("ERROR_FILE_NOT_FOUND",0);
    $_TooSmall     = 
Win32::WinError::constant("ERROR_INSUFFICIENT_BUFFER",0);
    $_MoreData     = Win32::WinError::constant("ERROR_MORE_DATA",0);
} else {
    $_NoMoreItems  = "^No more data";
    $_FileNotFound = "cannot find the file";
    $_TooSmall     = " data area passed to ";
    $_MoreData     = "^more data is avail";
}

$_NoMoreItems is used to check the result of an API call. It has a 
different/wrong value when Win32::WinError is unavailable. 

It is working when I add the module Win32::WinError by

pp -o regtest.exe -M Win32::WinError regtest.pl

That's it.

Bye and thanks a lot.
Grüße
Torsten


----------------------------------------------------------------------

Dr. Ing. Torsten Werner  |  Product Manager plan.assyst
E-Mail:    torsten.wer...@assyst.de

Assyst GmbH  |  Max-Planck-Str. 3  |  85609 Aschheim-Dornach
Registration / Eintragung beim Amtsgericht München: HRB 180174
Managing Director / Geschäftsführer: Hans Peter Hiemer, Dr. Andreas Seidl
www.assyst.de 

----------------------------------------------------------------------




Von:    "Roderich Schupp via RT" <bug-par-pac...@rt.cpan.org>
An:     torsten.wer...@assyst.de, 
Datum:  07.07.2022 16:44
Betreff:        Problem using Win32::TieRegistry in script packed with pp 
on Windows [rt.cpan.org #143646]



<URL: https://rt.cpan.org/Ticket/Display.html?id=143646 >

Sorry, I can't reproduce this here:

OS: Win10Build 19044 (64-bit)
Perl: Win32 strawberry-perl 5.32.1.1 #1 Sun Jan 24 15:00:15 2021 x64 
(installed via MSI installer)

Cheers, Roderich


Reply via email to