develooper Front page | perl.par | Postings from July 2022

Problem using Win32::TieRegistry in script packed with pp on Windows[rt.cpan.org #143646]

From:
Roderich Schupp via RT
Date:
July 13, 2022 05:15
Subject:
Problem using Win32::TieRegistry in script packed with pp on Windows[rt.cpan.org #143646]
Message ID:
rt-5.0.2-17494-1657370793-1792.143646-15-0@rt.cpan.org
Sat Jul 09 08:46:33 2022: Request 143646 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR-Packer
     Subject: 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.Werner@assyst.de
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=143646 >


On 2022-07-07 11:56:33, Torsten.Werner@assyst.de wrote:

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

That propbably explains why it worked for me (English vs German messages?),
though my exe/zip didn't contain Win32::WinError either.

> if ( eval { require Win32::WinError } ) {

This runtime check and fallback code is likely obsolete as Win32::TieRegistry states in its META.yml

requires:
  Carp: 0
  Tie::Hash: 0
  Win32::WinError: 0
  Win32API::Registry: 0.33
  perl: 5.006

Anyway, the interesting question for me is: why didn't PAR::Packer 
take the above line as a clue to pack Win32::WinError into the executable.

I'll fix this in Module::ScanDeps (which PAR::Packer uses to analyze the dependencies of your script).

Thanks for following up. Cheers,

Roderich




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About