Thu Mar 05 03:31:08 2020: Request 132055 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR-Packer
     Subject: PodStrip filter corrupts __FILE__ in modules
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: db...@cpan.org
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=132055 >


On 2020-03-04 18:57:24, DBOOK wrote:
> The filename override causes __FILE__ to then be unusable within the
> module since TestModule.pm is not found within cwd.

Don't do that then.

And yes, there are modules that behave differently when run from a packed 
executable.
PAR/Filter/PatchContent.pm contains workarounds for the known ones.

> I wonder why this filter overrides the filename at all. It should be
> able to set line numbers and omit the filename.

My guess is that the filename is for the benefit of the "embedded files"
(cf. 
https://metacpan.org/pod/distribution/PAR/lib/PAR/Tutorial.pod#Anatomy-of-a-Self-Contained-PAR-executable)
 
as these are extracted with mangled names like "776cb274.pm". Hence any runtime 
diagnostic messages originating from one of these modules would be pretty 
useless.

Cheers, Roderich

Reply via email to