cgi or mod_perl

摘自perlmonks.orghttp://www.perlmonks.org/?node_id=518869)的一段讨论:

Re: cgi or mod_perl
by astaines on Dec 24, 2005 at 10:12 UTC
  • A good question, but, at least partly, the wrong question. CGI is a useful low-level suite of tools for emitting HTML. It will happily emit HTML to a file, to a screen, or to a web server. Apache will display the output from programs written with CGI, but you need a perl interpreter, either your normal one (/usr/bin/perl or whatever), or one built into Apache.

    mod_perl is a very different animal, it is, specifically, a perl interpreter embedded into the Apache webserver. As such it doesn't do anything unless and until you feed it.

    CGI is quite a good choice for feeding mod_perl, athough not the only one. It is also easy to learn, and once you understand how CGI works, learning other frameworks will be significantly easier. mod_perl can do stuff that CGI can't, but you won't get near that stuff to start with.

    My own 2 cents - start with CGI and the perl interpreter on your system if you're using Linux. In Windows go with mod_perl from day 1, only because it's a bit easier to setup. If your Apache has mod_perl set up, use it. You normally only need mod_perl if your site gets very popular.

    Have fun, and a Happy Christmas to all

    -- Anthony Staines

对用perl写cgi的新手,可以帮助理清几个概念之间的关系。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值