Make Perl env compatible with F-16 Perl local::lib.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 29 Nov 2011 15:27:48 +0000 (16:27 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 29 Nov 2011 15:27:48 +0000 (16:27 +0100)
.bashrc

diff --git a/.bashrc b/.bashrc
index e0b66e5..87684d0 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -7,6 +7,9 @@ if [ -n "$_home_short_dotbashrc_norc" -o "${TERM#norc-}" != "$TERM" ];then
        export _home_short_dotbashrc=true
 fi
 
+export PERL5LIB="$HOME/perl5/lib/perl5/`uname -m`-linux-thread-multi:$HOME/perl5/lib/perl5";
+export PATH="$HOME/perl5/bin:$PATH";
+
 # "$PS1" for interactive shells detection.
 if [ -n "$PS1" -a -z "$_home_short_dotbashrc" ];then
        # We permit later reinitialization by unsetting it.
@@ -96,11 +99,6 @@ _bash_profile_addpath    -s CVSROOT "$HOME/pserver/cvs"
 _bash_profile_addpath    -s CVSROOT "$HOME/cvs"
 _bash_profile_addpath    -s ANT_HOME "/usr/local/ant"
 
-for _perldir in $(eval "echo $HOME{/share,/lib{,64}}/perl5{/site_perl,}");do
-       _bash_profile_addpath -f PERL5LIB "$_perldir"
-       done
-unset _perldir
-
 unset -f _bash_profile_addpath
 _bash_profile_addpath_fini
 unset -f _bash_profile_addpath_fini
@@ -163,8 +161,11 @@ export IGNOREEOF=10
 [ -n "$SSH_TTY" ] && export TMOUT=900 2>/dev/null
 export EDITOR='vim'
 [ -x /bin/less ] && export PAGER='/bin/less -MMh5cis'
-export PERL_MM_OPT=""
-[ "$UID" -ne 0 ] && export PERL_MM_OPT="$PERL_MM_OPT PREFIX=$HOME"
+
+export PERL_LOCAL_LIB_ROOT="$HOME/perl5";
+export PERL_MB_OPT="--install_base $HOME/perl5";
+export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5";
+
 for file in $HOME/.bookmarks.html;do
        export WWW_HOME="file://$HOME/"
        [ -r $file ] && export WWW_HOME="file://$file"