rootcho has asked for the wisdom of the Perl Monks concerning the following question:
I have perlbrew installed in one of my user accounts and what to be able to use it from root.
I configured root ./.bashrc to have :
The problem is if I try to run perl script inside a bash script, I get complains about modules not found :
thanks
PS> And of course I have this in the bash script :
I configured root ./.bashrc to have :
export PERLBREW_ROOT=/home/userx/perl5/perlbrew source $PERLBREW_ROOT/etc/bashrcalso :
root# perlbrew list * perl-5.17.8So far so good I can run perl scripts from bash-console as root
The problem is if I try to run perl script inside a bash script, I get complains about modules not found :
Can't locate Time/HiRes.pm in @INC (@INC contains: /home/userx/perl5/perlbrew/perls/perl-5.17.8/bin/../lib /usr/local/lib64/perl5 ...And yes if I try to do :
root# perldoc Time::HiRes Can't find any loadable formatter class in Pod::Perldoc::Toman Pod::Perldoc::Toman ...But if I check in my userx account I can see the package here :
/home/userx/perl5/perlbrew/perls/perl-5.17.8/lib/5.17.8/x86_64-linux/TimeAnd of course doing perldoc Time::HiRes from usex account works.
userx$ cpanm Time::HiRes Time::HiRes is up to date. (1.9725)What could be the problem... it seems like PERLLIB problem ? and how to solve it..
thanks
PS> And of course I have this in the bash script :
export PERLBREW_ROOT=/home/userx/perl5/perlbrew export PERLBREW_HOME=~/.perlbrew source ${PERLBREW_ROOT}/etc/bashrc
Back to
Seekers of Perl Wisdom