测试mod_perl模块
启动apache
#telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
输入get Head /http /1.0
HTTP/1.1 400 Bad Request
Date: Wed, 25 Dec 2002 03:32:32 GMT
Server: Apache/1.3.27 (Unix) mod_perl/1.27
ok,mod_perl加上了
给perl安装asp模块,一张方法是CPAN安装,一种是常规安装
CPAN安装
#perl -MCPAN -e shell
cpan>; install CPAN
...
Installing the Apache::ASP bundle will automatically install all the modules
Apache::ASP is dependent on as well as Apache::ASP itself. If you have
trouble installing the bundle, then try installing the necessary modules one
at a time:
cpan>; install MLDBM
cpan>; install MLDBM::Sync
cpan>; install Digest::MD5
cpan>; install Apache::ASP
For extra/optional functionality in Apache::ASP 2.31 or greater, like
support for FormFill, XSLT, or SSI, you can install this bundle via CPAN:
cpan>; install Bundle::Apache::ASP::Extra
也可以用常规的方法安装asp模块
Otherwise, just copy ASP.pm to
$PERLLIB/site/Apache
>; perl Makefile.PL
>; make
>; make test
>; make install
安装完毕,进行测试
在htdocs里vi一个test.asp,内容如下
<!-- sample here -->;
<html>;
<body>;
For loop incrementing font size: <p>;
<% for(1..5) { %>;
<!-- iterated html text -->;
<font size="<%=$_%>;" >; Size = <%=$_%>; </font>; <br>;
<% } %>;
</body>;
</html>;
<!-- end sample here -->;