您是否将Perl应用程序开发为CPAN模块? [英] Do you develop your Perl applications as CPAN modules?
问题描述
cpan。
来安装所有依赖项。这听起来很合理,我也喜欢你所获得的统一界面。当你遇到这样的一个应用程序,你知道makefile做什么等等。这种方法有什么其他的优点和缺点? <更新:感谢您的回答。我还有一个关于依赖安装的问题,我将单独发布。
一般来说,是的,我会说这是一个好主意。 Catalyst 使这样做很简单,因为catalyst.pl帮助脚本将为您的Web设置一个基本框架应用程序,使用Makefile.PL等完成。
这意味着将应用程序打包并将其部署到服务器上很简单。
编辑:我认为你所想的原始博文是在 Perlbuzz 上编写您的代码,就像在CPAN 上一样。
通过处理代码,我们永远不会像CPA一样释放到CPAN,我们赢得了所有CPAN工具链的支持。每天工具链越来越好。
Recently I read a blog post saying that it is a good practice to develop Perl applications just as you would develop a CPAN module. (Here it is – thanks David!) One of the reasons given was that you could simply run cpan .
in the project dir to install all the dependencies. This sounds reasonable, and I also like the "uniform interface" that you get. When you come across such an application, you know what the makefile does etc. What are other advantages and disadvantages to this approach?
Update: Thanks for the answers. I’ve got one more question about the dependency installing, I’ll post it separately.
Generally, yes, I'd say it's a good idea. Catalyst makes this easy, as the catalyst.pl helper script will set up a basic framework for your web app, completed with a Makefile.PL etc.
This means that packaging your application and deploying it to a server is trivially easy.
Edit: I think the original blog post you were thinking of was Write your code like it's going on CPAN from Perlbuzz.
"By treating code we were never going to release to CPAN as if we were, we win the support of all of the CPAN toolchain. A toolchain that is getting better every day."
这篇关于您是否将Perl应用程序开发为CPAN模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!