The switch command now use a global symlink inside $PERLBREW_ROOT to keep tracking current activated perl. The problem with this approach is that it is not friendly when multiple users are sharing the same PERLBREW_ROOT.
To solve this, perlbrew switch should be re-written completely in bash, it should save the result in ~/.perlbrew/init, which is a personal directory.
There are several RT issues related to switch, that should be taken care of after the rewrite:
With this change, how are you supposed to point to the current one?
The name of current perl is store in env var PERLBREW_PERL, which is inited in ~/.perlbrew/init, which is sourceed in the bashrc/cshrc provided by perlbrew.
Is there a recommended way to get the full path?
The full path to current perl should be the second one in PERLBREW_PATH, one can check if PERLBREW_PERL is defined first, then locate it's path with $PERLBREW_ROOT/perls/$PERLBREW_PERL/bin .
So what is the recommended way to get cperl-perldoc working in Emacs without 'current'?
The recommended way is, cough, not coded yet ;-)
The idea is to have a perlbrew command that output elisp code, just like like perlbrew env perl-5.12.3 output bash/csh code. Emacs can either require a file to have a current setting, or do eval to perform a perlbrew use in lisp. The same idea can work with vim, or virtually any editors.
perlbrew env perl-5.12.3
Before that happen, you can still use symlink or alias command as a work around, and I really should deprecate / updated my blog post!
Sorry, I still don't see how I can point scripts at whatever-perl-is-current in the shebang line. Am I missing something?
@doherty #!/usr/bin/env perl?
That's not a binary. Also, it won't be munged by Module::Build's fix_shebang_line.