Perl CGI与FastCGI [英] Perl CGI vs FastCGI

查看:91
本文介绍了Perl CGI与FastCGI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Perl上编程很长时间了,我一直使用CGI技术来构建我的应用程序.现在我想重建它们并在FCGI上编写新的.请解释使用f.e解开FastCGI和PSGI之间的区别.Starman.我还想解释一下当今趋势"中的哪些Perl框架(使用FCGI)?我知道我可以使用CGI :: Fast强制CGI脚本充当FCGI脚本.还有其他模块可以做到这一点吗?

I've been programming on Perl for a long time, I've always used CGI technology to build my applications. Now I think to rebuild them and write new ones on FCGI. Please, explain the difference between unsing FastCGI and PSGI with f.e. Starman. Also I'm asking to explain what Perl frameworks (which use FCGI) are "in trend" today? I understood that I can force my CGI scripts to work as FCGI scripts using CGI::Fast. Are there any other modules to do this?

谢谢!

推荐答案

您是从错误的角度看待这一问题的.不要考虑您将如何部署程序.而是将程序编写到 PSGI 界面.然后,您可以在任何环境中部署应用程序-CGI,FastCGI,mod_perl等,而无需进行任何更改.

You're looking at this from the wrong perspective. Don't think about how you are going to deploy the program. Instead, write your program to the PSGI interface. Then you'll be able to deploy your application in any environment - CGI, FastCGI, mod_perl, etc. without having to change anything.

您可以使用 Plack :: Request Dancer 催化剂.

You can write "raw" PGSI using modules like Plack::Request and Plack::Response, but you'd be better advised to use a framework like Dancer or Catalyst.

如果您要在PSGI环境中运行现有的CGI程序,请参见 Plack ::App :: WrapCGI .

If you have existing CGI programs that you want to run in a PSGI environment, then see Plack::App::WrapCGI.

这篇关于Perl CGI与FastCGI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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