如何在不安装CPAN模块的情况下安装deps? [英] How do I install deps for CPAN module without installing it?
问题描述
This is a follow-up to my previous question about developing Perl applications. Let’s say I develop an application as a CPAN module using Module::Install
. Now I upload the code to the production server, say using a git push
, and I would like to install the application dependencies listed in Makefile.PL
. If I simply run cpan .
, the thing tries to install the application like a regular Perl module, ie. starts to copy the modules and documentation to standard Perl directories all over the system.
这是应该是这样吗?您是否将应用程序安装到标准Perl目录中?我习惯于将单独的 lib
将我的Perl应用程序放在一个目录中。否则似乎我需要管理很多其他的东西,比如在路径等上安装资源。如果我只想安装在 Makefile.PL
中声明的deps并运行应用程序测试以确保一切正常,我该怎么办?
Is this the way it’s supposed to be? Do you install the application into the standard Perl directories? I am used to having my Perl applications in one directory with separate lib
. Otherwise it seems I’d have to manage a lot of other things, like installing the resources somewhere on path etc. If I just want to install the deps declared in Makefile.PL
and run the application tests to make sure everything works, what should I do?
(这是否记录在某个地方?我的意思是,有什么像最佳做法部署和更新非常简单的Perl应用程序?还是所有人都以自己的方式这样做?)
(Is this documented somewhere? I mean, is there something like best practice for deploying and updating non-trivial Perl applications? Or is everybody doing this his own way?)
推荐答案
我可能会误会,但我认为你正在寻找
I might be misunderstanding, but I think what you're looking for is
perl Makefile.PL
make installdeps
这篇关于如何在不安装CPAN模块的情况下安装deps?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!