Subject: | PERL5OPT clobbered in `fatpack trace` |
I spent a while confused trying to work out why:
---
bin/foo
lib/Bar.pm
---
Kept producing:
---
Can't locate Bar.pm in @INC (you may need to install the Bar module) (@INC contains: /home/kent/perl5/perlbrew/perls/perl-5.19.9-fast/lib/site_perl/5.19.9/x86_64-linux /home/kent/perl5/perlbrew/perls/perl-5.19.9-fast/lib/site_perl/5.19.9 /home/kent/perl5/perlbrew/perls/perl-5.19.9-fast/lib/5.19.9/x86_64-linux /home/kent/perl5/perlbrew/perls/perl-5.19.9-fast/lib/5.19.9 .) at bin/foo line 5.
---
I was trying my usual strategy with
---
PERL5OPT="-Ilib" or PERL5OPT="-Isomepath" etc,
---
To no avail.
Seems this value is clobbered in `sub trace` : https://metacpan.org/source/HAARG/App-FatPacker-0.010000/lib/App/FatPacker.pm#L120
---
local $ENV{PERL5OPT} = '-MApp::FatPacker::Trace='.$trace_opts;
---
Granted I could of course use PERL5LIB instead, and that was a suitable workaround, but it wasn't expected behaviour and arguably it should append to such an ENV key if present instead of clobbering it.