Tue Apr 21 13:58:48 2015: Request 103861 was acted upon.
Transaction: Ticket created by harald.jo...@arcor.de
       Queue: PAR-Packer
     Subject: Adding local directories to @INC for a pp executable fails
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: harald.jo...@arcor.de
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=103861 >


Hello PAR-Packers,

as suggested by Roderich on par@perl.org, I am submitting this
observation as a bug report.

The symptom: My application adds a local directory to @INC with 'use
lib'.  After packing with pp, modules in this directory are no longer
found.  Surprisingly, when I add more than one library, only the last
'use lib' fails. So, I do have an (ugly) workaround, but no idea about
whether it has side effects.

Versions: Perl v5.18.2, PAR::Packer 1.017,
          Linux ubuntu 3.13.0-45-generic

Here's a simple demo: 'foo' is added to @INC as intended, 'bar' isn't.
----------------------------------------------------------------------
$ cat local_includes.pl 
use Data::Dumper;
use lib 'foo';
use lib 'bar';
print Dumper(\@INC);
$ pp local_includes.pl
$ ./a.out
$VAR1 = [
          'foo',
          sub { "DUMMY" },
          
'/tmp/par-68616a/cache-5bde0b3f6eab9c5f0be91ed26371a4bb8b7cbac1/inc/lib',
          '/tmp/par-68616a/cache-5bde0b3f6eab9c5f0be91ed26371a4bb8b7cbac1/inc',
          sub { "DUMMY" },
          sub { "DUMMY" }
        ];
----------------------------------------------------------------------

PAR::Packer are really awesome if you want to run Perl applications on
Windows tablets with 32GB SSDs, where the 500MB of Strawberry begin to
hurt badly...
-- 
Cheers,
haj

Reply via email to