What shows which cpanm from the command line? For you, he must inform:
/home/dave/perl5/perlbrew/bin/cpanm
If so, then what does ls -l /home/dave/perl5/perlbrew/bin/cpanm ? It should indicate:
cpanm -> /home/dave/perl5/perlbrew/perls/current/bin/cpanm
Finally, ls -l /Users/barry/perl5/perlbrew/perls/current should point to the Perl that you switched to perlbrew :
/home/dave/perl5/perlbrew/perls/current -> perl-5.12.2
All three of them should be like this, otherwise something is wrong.
If this is not one of the probable problems, then cpanm points to another installed Perl. You must have cpanm for each version of perl in perlbrew :
perlbrew switch perl-5.12.2 curl -L http:
Now, if which cpanm still does not show the perlbrew path, you have a problem with $PATH priority in your .bash_profile (or equivalent) file. This can be perlbrew making sure your perlbrew string ...
source /home/dave/perl5/perlbrew/etc/bashrc
... in the profile file after any other export $PATH lines.
After logging in again, you can confirm that this is correct by executing echo $PATH , and you should see perlbrew at the beginning (left) of the path line, i.e. something like that:
/home/dave/perl5/perlbrew/bin:/home/dave/perl5/perlbrew/perls/current/bin:/usr/bin:/bin:/usr/local/bin: