Apologies in advance if this is the wrong place to post.
I am setting up a new machine with Linux/Ubuntu v13.10 -- the first time
in nearly two years when I am using Linux as a desktop. I'm trying to
make a clean start with respect to my Perl-related programming practices:
* I want to use perlbrew as much as possible
* I want to use cpanm rather than cpan as much as possible
But I am having a hell of a time trying to get perlbrew to work in the
way I am accustomed to it working on my $job MacBook Pro.
I have (several times today) installed perlbrew with this command:
cpan
> install App::perlbrew
I now have:
#####
which perlbrew
/usr/local/bin/perlbrew
#####
And I have added: 'source ~/perl5/perlbrew/etc/bashrc' to the end of my
~/.bash_profile file. (AAMOF, it's the only entry yet in that file.)
And I have said: 'perlbrew init'
The following commands work as expected:
#####
perlbrew available
perlbrew install perl-5.18.2
perlbrew list
#####
However, whenever I say:
######
perlbrew switch perl-5.18.2
######
I get:
#####
A sub-shell is launched with perl-5.18.2 as the activated perl. Run
'exit' to finish it.
bash-4.2$
#####
This is unexpected and undesired behavior. On the basis of using
perlbrew on my work laptop for > 1 year, I would *not* expect a
sub-shell to be opened. I would expect that, from the moment of
'perlbrew switch' forward, I would:
a) stay in the same shell
b) have 'perl -v' point to the 5.18.2 underneath my homedir.
On this new machine, when I am in the subshell, which perl -v gives
5.18.2. But when I exit, I'm back to the vendor perl.
'perldoc perlbrew' documents 'switch' as: Permanently use the specified
per as default.
That's the behavior I want. I don't want a subshell to be opened. I
want perlbrew switch perl-5.18.2 to make 5.18.2 my default perl.
Can anyone tell me what I'm doing wrong?
Thank you very much.
Jim Keenan