Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: @INC not set for perlbrew

by kcott (Archbishop)
on Jul 29, 2016 at 15:41 UTC ( [id://1168822]=note: print w/replies, xml ) Need Help??


in reply to @INC not set for perlbrew

G'day Alessandro,

I have Mac OS X v10.10.3 (Yosemite) and perlbrew v0.73. If you're not already familiar with certain issues with El Capitan, take a look at "CPAN on El Capitan", "OSX Server Perl install modules" and "apple.stackexchange.com: 'What is the “rootless” feature in El Capitan, really?'".

which finds the first occurrence in $PATH. Your $PATH should look like this:

...:/path/to/perlbrew/bin:...:/path/to/system/bin:...

Here's my system perl, current perl and $PATH:

$ /usr/bin/perl -v ... (v5.18.2) built for darwin-thread-multi-2level ... $ which perl /Users/ken/perl5/perlbrew/perls/perl-5.24.0t/bin/perl $ perl -v ... (v5.24.0) built for darwin-thread-multi-2level ... $ echo $PATH $PERLBREW_ROOT/bin:$PERLBREW_ROOT/perls/perl-5.24.0t/bin:...:/opt/loca +l/bin:...:/usr/bin:...

When you use perlbrew switch, perlbrew should update $PATH; which will now find a different version of perl; the system perl is unaffected.

$ perlbrew switch perl-5.22.0t $ /usr/bin/perl -v ... (v5.18.2) built for darwin-thread-multi-2level ... $ which perl /Users/ken/perl5/perlbrew/perls/perl-5.22.0t/bin/perl $ perl -v ... (v5.22.0) built for darwin-thread-multi-2level $ echo $PATH $PERLBREW_ROOT/bin:$PERLBREW_ROOT/perls/perl-5.22.0t/bin:...:/opt/loca +l/bin:...:/usr/bin:...

If you're not seeing this type of behaviour, study the App-perlbrew README (especially the INSTALLATION section), then consider one of the upgrade or install related functions in perlbrew.

"... but it seems somehow, the "switch" was only partial."

'perlbrew switch' affects the shell in which it is run, and all shells subsequently created, until another 'perlbrew switch' is executed. It doesn't affect other shells which exist when it is used.

If that doesn't help, please provide more details. You should find the guidelines in "How do I post a question effectively?" to be helpful in this regard.

— Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-23 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found