您是否将Perl应用程序开发为CPAN模块? [英] Do you develop your Perl applications as CPAN modules?

查看:144
本文介绍了您是否将Perl应用程序开发为CPAN模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我读了一篇博文,说开发Perl应用程序是一个很好的做法,就像开发CPAN模块一样。 (这里是 - 感谢大卫!)给出的一个原因是您可以在项目目录中简单地运行 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆