Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How do you export more than one path to PERL5LIB

by anonymized user 468275 (Curate)
on Aug 16, 2018 at 11:23 UTC ( [id://1220418]=note: print w/replies, xml ) Need Help??


in reply to How do you export more than one path to PERL5LIB

You seem to want to update PERL5LIB with some paths if they are not there already. But your bash code is too far away from achieving this and it seems easier in Perl e.g.:
#/bin/sh # ... export PERL5LIB=`perl -e ' use strict; use warnings; my @addinc = ("/usr/local/lib/perl5/site_perl", "/Users/me/perl/perl_lib" ); my %inc = map { $_, 1 } split (/\:/, $ENV{PERL5LIB}); for (@addinc) { # this was just updated $inc{$_} or print "$_:"; } print "$ENV{PERL5LIB}\n"; '`

One world, one people

Replies are listed 'Best First'.
Re^2: How do you export more than one path to PERL5LIB
by Anonymous Monk on Aug 30, 2019 at 09:04 UTC
    With perlbrew, add to .bash_profile: export PERL5LIB=`perl -e '($p,$v)=split("-",$ENV{PERLBREW_PERL}); print "$ENV{HOME}/perl5/perlbrew/perls/perl-$v/lib/site_perl/$v/darwin-2level"' `

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found