TODO: Remove `current` symlink #70

Closed
gugod opened this Issue May 8, 2011 · 9 comments

Projects

None yet

4 participants

@gugod
Owner
gugod commented May 8, 2011

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:

@gugod gugod was assigned May 8, 2011
@gugod gugod closed this May 9, 2011
@doherty
Contributor
doherty commented Jul 6, 2011

With this change, how are you supposed to point to the current one?

@gugod
Owner
gugod commented Jul 9, 2011

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.

@doherty
Contributor
doherty commented Jul 10, 2011

Is there a recommended way to get the full path?

@gugod
Owner
gugod commented Jul 10, 2011

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 .

@oylenshpeegul
Contributor

So what is the recommended way to get cperl-perldoc working in Emacs without 'current'?

@gugod
Owner
gugod commented Oct 25, 2011

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.

Before that happen, you can still use symlink or alias command as a work around, and I really should deprecate / updated my blog post!

@doherty
Contributor
doherty commented Apr 14, 2012

Sorry, I still don't see how I can point scripts at whatever-perl-is-current in the shebang line. Am I missing something?

@hoelzro
Contributor
hoelzro commented Apr 14, 2012

@doherty #!/usr/bin/env perl?

@doherty
Contributor
doherty commented Apr 15, 2012

That's not a binary. Also, it won't be munged by Module::Build's fix_shebang_line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment