Perl - 如何更改 @INC 以包含非标准路径

如何设置环境变量@INC ?,让perl可以快速定位到cpan模块。

export PERL5LIB=$PERL5LIB:/some/other/perl/lib/path

要使目录优先于当前@INC 路径,例如:

export PERL5LIB=/some/other/perl/lib/path:$PERL5LIB

查看路径:

perl -E 'map{say}@INC'

或者

perl -V
日期:2020-06-02 22:17:11 来源:oir作者:oir