使用 Perl 处理开发/生产库路径的好方法是什么?

发布于 2024-07-25 21:36:37 字数 75 浏览 1 评论 0原文

使用 Perl,处理不同开发与生产库路径的简单方法是什么? 我想使用本地盒子路径进行测试,但是当我启动时,我希望它自动指向生产库路径。

With Perl, what is an easy way to handle different development versus production libs paths? I want to use my local box path for testing, but when I launch I want it to automatically point to the production lib path.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你穿错了嫁妆 2024-08-01 21:36:37

查看 PERL5LIB 环境变量,或者为了更简单,请查看local::lib

Take a look at the PERL5LIB environment variable, or for an even easier time, look at local::lib.

北城半夏 2024-08-01 21:36:37

我认为您的开发盒实际上应该是一个与生产环境具有相同配置的虚拟机,因此您不需要更改库路径。

库应该通过相同的机制安装,以便一切都一致。

由于库版本差异,不这样做可能会导致您将无法工作的代码发布到生产环境中。

I think your dev box should really be a VM with an identical configuration to production, so you won't need to change the library path.

Libraries should be installed by the same mechanism so everything's consistent.

Not doing this is likely to risk you releasing non-working code to production due to library version differences.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文