Perl的library设置
来源:互联网 发布:mac安装brew命令 编辑:程序博客网 时间:2024/06/05 18:38
参考链接:
- http://stackoverflow.com/questions/841785/how-do-i-include-a-perl-module-thats-in-a-different-directory
- http://stackoverflow.com/questions/185114/how-do-i-use-a-perl-module-in-a-directory-not-in-inc
在Fedora/RHEL/CentOS中,perl 的library默认安装路径为:
如果要使用自定义的perllib,就需要参考以下的设置了。
EDIT: Putting the right solution first, originally from this question. It's the only one that searches relative to the module directory:
use FindBin; # locate this script
use lib "$FindBin::Bin/.."; # use the parent directory
use yourlib;
There's many other ways that search for libraries relative to the current directory. You can invoke perl with the -I argument, passing the directory of the other module:
perl -I.. yourscript.pl
You can include a line near the top of your perl script:
use lib '..';
You can modify the environment variable PERL5LIB before you run the script:
export PERL5LIB=$PERL5LIB:..
The push(@INC) strategy can also work, but it has to be wrapped in BEGIN{} to make sure that the push is run before the module search:
BEGIN {push @INC, '..'}
use yourlib;
- Perl的library设置
- Perl的library设置
- perl的INC设置
- perl的INC设置
- [转]perl的INC设置
- [转]perl的INC设置
- perl的INC设置分析
- LWP(Library for WWW in Perl)的基本使用
- 自己看的 perl的环境设置!
- symbian的perl环境变量设置调试
- perl生成excel文档的格式设置
- perl 访问网站一些useragent的设置
- birt 的library进行公用数据库连接设置
- birt 的library进行公用数据库连接设置
- Perl inc设置
- Perl 环境变量设置
- perl环境变量设置
- perl - 设置html编码
- 在Ubuntu 10.04.2 LTS上安装 Oracle SQL Developer3.0 (3.0.04.34)
- C++变量在栈上的布局
- AndroidGUI11:OptionsMenu的常用技巧
- 策略模式
- Oracle Connect By用法
- Perl的library设置
- 3dsmax模型导出插件调试技巧
- 游戏程序中的骨骼插件
- vim shell
- El表达式 empty用法
- C++内存泄漏问题务必要避免!
- struts2 过滤器
- 微软亚洲研究院实习生面试
- 再接再厉