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


In reply to Re: @INC not set for perlbrew by kcott
in thread @INC not set for perlbrew by Alessandro

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.