Mon Sep 05 18:30:37 2016: Request 117323 was acted upon.
Transaction: Correspondence added by BHALLISSY
       Queue: PAR-Packer
     Subject: parl a.par not finding DLL that was added with -l
   Broken in: 1.035
    Severity: (no value)
       Owner: Nobody
  Requestors: bhalli...@cpan.org
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=117323 >


On Wed Aug 31 03:05:22 2016, RSCHUPP wrote:
> ... then users can invoke this as
> 
>   some.exe foo.pl
>   some.exe bar.pl
>   ...

Thanks, Roderich. I've been able to get this to work save one remaining 
problem: pod2usage() called from, say foo.pl, doesn't find the POD from foo.pl, 
but rather from main.pl.

I've tried setting $0, e.g. in the main.pl script:

  my $which = shift @ARGV;   
  # sanitizing goes here
  ...
  $0 = "$ENV{PAR_TEMP}/inc/script/$which"
  my $rc = do $0;
  ...

and while this works if I try:
  perl main.pl foo.pl

it doesn't work once packed into the binary (at least on Windows).

Any simple tricks up your sleeve for this one?  

I suspect I could modify all the target scripts and, for example detecting 
presence of $ENV{PAR_TEMP} I could manually set the -input option to pod2usage, 
but I was hoping for a simpler solution...

Bob

Reply via email to