Discussion:
[rt.cpan.org #103861] Adding local directories to @INC for a pp executable fails
(too old to reply)
via RT
2015-04-21 17:58:48 UTC
Permalink
Tue Apr 21 13:58:48 2015: Request 103861 was acted upon.
Transaction: Ticket created by ***@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: ***@arcor.de
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=103861 >


Hello PAR-Packers,

as suggested by Roderich on ***@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
Roderich Schupp via RT
2015-04-22 15:46:52 UTC
Permalink
Wed Apr 22 11:46:51 2015: Request 103861 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Adding local directories to @INC for a pp executable fails
Broken in: (no value)
Severity: (no value)
Owner: RSCHUPP
Requestors: ***@arcor.de
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=103861 >
Post by via RT
----------------------------------------------------------------------
$ cat local_includes.pl
use Data::Dumper;
use lib 'foo';
use lib 'bar';
$ pp local_includes.pl
$ ./a.out
$VAR1 = [
'foo',
sub { "DUMMY" },
The bug is actually in PAR (not PAR::Packer), fixed in PAR 1.009, just uploaded to CPAN.

Cheers, Roderich

Loading...