in reply to How do you export more than one path to PERL5LIB
Cannot load config file: couldn't open /Users/me/perl/perl_lib:/usr/local/lib/perl5/site_perl/
That's not a problem with the setting of $PERL5LIB, that's a problem with how your perl script is using it. Since you haven't shown your script I can't help you further with that.
BTW, there is no effect in exporting the same variable twice in sh/bash.
Update: just for completeness, here's a demo showing multiple entries in $PERL5LIB.
use strict; use warnings; use Path::Tiny; use Test::More tests => 3; chdir '/'; # In case you have . in @INC my $mod = path ('/tmp')->child ('ZZZZZ.pm'); $mod->spew ('package ZZZZZ;1;'); ok ! system ("PERL5LIB=/tmp:/foo perl -e 'use ZZZZZ;'"), 'First in pat +h'; ok ! system ("PERL5LIB=/foo:/tmp perl -e 'use ZZZZZ;'"), 'Second in pa +th'; ok system ("PERL5LIB=/foo:/bar perl -e 'use ZZZZZ;'"), 'Not in path' +; $mod->remove;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do you export more than one path to PERL5LIB
by nysus (Parson) on Aug 16, 2018 at 13:39 UTC |