How to change @INC to find Perl modules in non-standard locations
Loading your private Perl module
You have a script and have just started to move some parts of it, out to a new module called My::Module. You saved the module to /home/foobar/code/My/Module.pm.
Your perl script now starts like this:
use strict;
use warnings;
use My::Module;
Can't locate My/Module.pm in @INC (@INC contains:
/home/foobar/perl5/lib/perl5/x86_64-linux-gnu-thread-multi
/home/foobar/perl5/lib/perl5
/etc/perl
/usr/local/lib/perl/5.12.4
/usr/local/share/perl/5.12.4
/usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.12
/usr/share/perl/5.12
/usr/local/lib/site_perl
.).
BEGIN failed--compilation aborted.
On Linux/Unix when using Bash, you would write
export PERL5LIB=/home/foobar/code
You can add this to the ~/.bashrc to make it always available when you log-in.
On Windows you can set the same in the cmd command window by typing
set PERL5LIB=c:\path\to\dir
The last solution is the most temporary solution. Add a -I /home/foobar/code flag to perl when running the script.
perl -I /home/foobar/code script.pl
This will add /home/foobar/code to the beginning of @INC for this specific execution of the script.
https://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations
分享到:
相关推荐
标题中的"PyPI 官网下载 | django-locations-base-0.3.3.tar.gz"表明这是一个在Python的包索引平台PyPI上发布的开源软件包。PyPI(Python Package Index)是Python开发者共享和发布自己编写的Python模块、库和其他...
【Laravel开发-laravel-json-locations-manager】 在Laravel框架中,开发者经常需要处理多语言支持,以便为全球用户提供更好的用户体验。"laravel-json-locations-manager"是一个专门为Laravel设计的工具,它专注于...
资源分类:Python库 所属语言:Python 资源全名:wix-protos-wixos-locations-api-0.0.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
"Locations--model 59x" 是针对P59X系列服务器的一种特定信息,它涉及到服务器内部组件的位置编码,这些编码用于识别和定位服务器中的各个物理部件。在维护和故障排查过程中,理解并正确使用这些位置码至关重要。 ...
CREATE TABLE `locations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `parent_id` int(10) unsigned NOT NULL, `level` tinyint(4) NOT NULL, ...
register-locations.ts
jar包,亲测可用
jar包,亲测可用
jar包,亲测可用
jar包,亲测可用
jar包,亲测可用
在 "locations" 应用中,你可以使用 Eloquent 创建、查询和更新地理位置数据,例如 `Country::find($id)->provinces` 可以获取指定国家的所有省份。 4. **数据库迁移**: Laravel 的数据库迁移系统允许开发者定义...
jar包,亲测可用
Searched in the following locations: https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar 最近google 出现不少问题 1、google 欧洲反垄断...
q或Ctrl+C 退出; /字符串 从上往下查找匹配的字符串; ?字符串 从下往上查找匹配的字符串; n 继续查找。 四、退出命令 exit 退出; DOS内部命令 用于退出当前的命令处理器(COMMAND.COM) 恢复前一个命令...
java实现别踩白块儿源码 inc-overlord-game-map-locations BSD Java implementation of a map. For games that don't use regular grids.
medicine recorded observations of subjects in different locations are the basis of reliable diagnoses and medication. In quantitative marketing consumer preferences are collected in order to construct...
- **Data Transmission Services**: Explains how to request and receive data from ECUs, including reading and writing memory locations and retrieving diagnostic trouble codes. ### Conclusion ISO 14229-...
and page faults are not allowed at this level or above, most device drivers use non-paged pool to assure that they do not incur a page fault. Represented by Memory: Pool Nonpaged Bytes, typically ...