如何在系统级别的Perl库路径中添加目录? [英] How can I add a directory to the Perl library path at the system level?

查看:1064
本文介绍了如何在系统级别的Perl库路径中添加目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在标准的linux设置中,我在哪里可以将目录添加到 @INC 变量?

On a standard linux set up, where can I add a directory to the @INC variable?

/ etc / profile 文件中,我添加了:

 export PERLLIB=$PERLLIB:/foo/bar
 export PERL5LIB=$PERL5LIB:/foo/bar

谢谢

推荐答案

您可能还需要提供〜/ .bashrc来重建您的环境,或者注销并登录在此更改生效之前返回。如果您在本地〜/ .bash_profile而不是系统范围内进行了更改,则至少需要这样做。

You might also need to source your ~/.bashrc so that it rebuilds your environment, or log out and log back in, before this change takes effect. At least this would be required if you made that change in your local ~/.bash_profile instead of system wide.

这篇关于如何在系统级别的Perl库路径中添加目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆