-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
activating lib root writes full PATH etc into init file #216
Comments
@Haar, Sorry I don't understand the point you're making here. Can you maybe provide me some steps that demonstrate the issue ? |
Typo there, wrong person :). |
If you install and switch to a normal perl version, the init file, which is sourced by the bashrc file, looks like this: If you activate a local::lib path, as created with the perlbrew lib command, it looks like this: This file is sourced during the bashrc file, which means any changes prior to sourcing it are wiped out. |
On 2012/7/13, at 下午4:07, Graham Knop wrote:
True. But that's the coded and intended behavior. What trouble or issue are you exactly dealing with ? Cheers, |
It's a problem because it is overwriting the PATH instead of adding to it. If your bashrc makes any changes to PATH before sourcing the perlbrew rc file, they are overwritten. Additions to PATH after sourcing the rc file get written to the init file, so the next time they are added they add duplicate entries. The direct case I ran into was a bug in my bashrc file, and after fixing it I couldn't get the fix to apply until after I tracked it down to perlbrew overwriting my changes. |
Ah, right. I see the problem now. It looks like PATH, PERL5LIB, and PERL_* should all be removed from there. |
I just hit this bug. I updated my $PATH in .zshrc and it kept getting re-ordered the old way. I was so confused until I started tracing everything. I am excited to see that it's already been identified as a problem! |
It looks to me like this has been fixed. |
@haarg Thanks for the write up. Closing this issue. |
Upstream changes: 0.54: # 2012-10-24T21:21:25+0200 - Now requires perl 5.8.8 - Fix an issue with list-module command listing extra modules See GH #245 - Tweak default Configure options for pre-5.6 versions - Fix an issue with warning messagse in 'upgrade-perl' command. 0.53: # 2012-10-14T17:41:17+0200 - New command: `info`. - requires CPAN::Perl::Releases 0.76 for 5.14.3 info. - Skip "." in @inc to deal with a `list-module` issue. GH #245. - Environment variable cleanups and minor bashrc rewrite. 0.52: # 2012-10-04T21:30:40+0200 - userelocatableinc is no longer default. Meanwhile PERLBREW_CONFIGURE_FLAGS can still be used. - Fix GH #197 again. Also make sure perlbrew-unrelated PERL5LIB values are preserved. - Fix an issue that MANPATH contains unwanted values even after switch/use/off. 0.51: # 2012-09-29T09:17:14+0200 - Fix a start-up warning message from bashrc when perlbrew is not active - Fix a breakage on CentOS due to the use of `manpath` command. 0.50: # 2012-09-01T11:25:41+0200 - properly remove perlbrew-related PERL5LIB entries. GH #197 - minor documentation tweak. 0.49: # 2012-08-25T22:32:22+0200 - Fix the build for perl-5.12 and 5.14 -- userelocatableinc are not working properly. gugod/App-perlbrew#232 0.48: # 2012-08-24T07:07:52+0200 - The build log output "build.log" is now named after the installation name for eaiser reference. - Fix the invokation configure command to actually contains -Duserelocatableinc - Experimental: bash/zsh users may put this to shell init instead: eval "$(~/perl5/perlbrew/bin/perlbrew init -)" - A few output message updates 0.47: # 2012-08-23T07:59:53+0200 - New command: download. - New env var: PERLBREW_CONFIGURE_FLAGS - userelocatableinc is enabled by default when the installing perl version is greater than or equals to 5.8.9. It should make some use cases eaiser. In particular, you can move PERLBREW_ROOT directory to another place. - fix gugod/App-perlbrew#216 for bash users and zsh users 0.46: - fix: The deprecation warning when running `self-upgrde` - fix: system MANPATH detection - improvement: Specifying multiple perl: `exec --with perl-5.14.2,perl-5.16.0` 0.45: - New command: install-ack . This install the standalone version of ack under $PERLBREW_ROOT/bin - New command: list-modules - `exec` command now also iterates thourgh all the libs - Documented the `--with` argument of exec command. See `perlbrew help exec` 0.44: - Notice: "self-install" command now alters the shebang to use system perl - Notice: "install-patchperl" command now alters the shebang to use system perl. - some documentation tweaks - fix: `perlbrew use` to/from a lib has not been working properly. 0.43: - cpantester-error fixes - csh support. Big thanks to matzsoft. - support 'fetch' command on FreeBSD. - Fix a bug that perlbrew failed to resolve version number when dist path contain "perl5" 0.42: - Improvement: die when running perlbrew (use|switch) with unknown installation name. - clean 'build.log' on install. ref: RT #69168.
Upstream changes: 0.54: # 2012-10-24T21:21:25+0200 - Now requires perl 5.8.8 - Fix an issue with list-module command listing extra modules See GH #245 - Tweak default Configure options for pre-5.6 versions - Fix an issue with warning messagse in 'upgrade-perl' command. 0.53: # 2012-10-14T17:41:17+0200 - New command: `info`. - requires CPAN::Perl::Releases 0.76 for 5.14.3 info. - Skip "." in @inc to deal with a `list-module` issue. GH #245. - Environment variable cleanups and minor bashrc rewrite. 0.52: # 2012-10-04T21:30:40+0200 - userelocatableinc is no longer default. Meanwhile PERLBREW_CONFIGURE_FLAGS can still be used. - Fix GH #197 again. Also make sure perlbrew-unrelated PERL5LIB values are preserved. - Fix an issue that MANPATH contains unwanted values even after switch/use/off. 0.51: # 2012-09-29T09:17:14+0200 - Fix a start-up warning message from bashrc when perlbrew is not active - Fix a breakage on CentOS due to the use of `manpath` command. 0.50: # 2012-09-01T11:25:41+0200 - properly remove perlbrew-related PERL5LIB entries. GH #197 - minor documentation tweak. 0.49: # 2012-08-25T22:32:22+0200 - Fix the build for perl-5.12 and 5.14 -- userelocatableinc are not working properly. gugod/App-perlbrew#232 0.48: # 2012-08-24T07:07:52+0200 - The build log output "build.log" is now named after the installation name for eaiser reference. - Fix the invokation configure command to actually contains -Duserelocatableinc - Experimental: bash/zsh users may put this to shell init instead: eval "$(~/perl5/perlbrew/bin/perlbrew init -)" - A few output message updates 0.47: # 2012-08-23T07:59:53+0200 - New command: download. - New env var: PERLBREW_CONFIGURE_FLAGS - userelocatableinc is enabled by default when the installing perl version is greater than or equals to 5.8.9. It should make some use cases eaiser. In particular, you can move PERLBREW_ROOT directory to another place. - fix gugod/App-perlbrew#216 for bash users and zsh users 0.46: - fix: The deprecation warning when running `self-upgrde` - fix: system MANPATH detection - improvement: Specifying multiple perl: `exec --with perl-5.14.2,perl-5.16.0` 0.45: - New command: install-ack . This install the standalone version of ack under $PERLBREW_ROOT/bin - New command: list-modules - `exec` command now also iterates thourgh all the libs - Documented the `--with` argument of exec command. See `perlbrew help exec` 0.44: - Notice: "self-install" command now alters the shebang to use system perl - Notice: "install-patchperl" command now alters the shebang to use system perl. - some documentation tweaks - fix: `perlbrew use` to/from a lib has not been working properly. 0.43: - cpantester-error fixes - csh support. Big thanks to matzsoft. - support 'fetch' command on FreeBSD. - Fix a bug that perlbrew failed to resolve version number when dist path contain "perl5" 0.42: - Improvement: die when running perlbrew (use|switch) with unknown installation name. - clean 'build.log' on install. ref: RT #69168.
If a lib directory is activated, the PATH and other environment variables are written into the .perlbrew/init file. When starting a new shell, these then overwrite any set prior in the shell's rc file.
The text was updated successfully, but these errors were encountered: