[四年前的博客,現在看來完全不知道在幹啥]
Apache::DB能夠植入Apache進行Perl的調試,這也是我第一個用的CPAN,好好學習!
資料來自:http://docs.activestate.com/komodo/4.4/debugperl.html
首先需要安裝好Apache::DB,進入Windows Console,輸入CPAN,如果沒有make之類的它會先自動安裝,進入CPAN輸入install Apache::DB稍等即可完成安裝,版本爲0.14。
想要使用Apache::DB,做到以下幾步
1,httpd -X命令啓動Apache,這是Debug mode。
2,Location加入一句
<Location /cgi-bin>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
PerlFixupHandler Apache::DB #<------------Here!!
</Location>
3,把這個東東放進來
<Perl>
use ModPerl::Registry;
use lib qw(c:/Perl/bin/perl512.dll);
$ENV{PERLDB_OPTS} = "RemotePort=localhost:80 LogFile=c:/details.log";
use Apache::DB ();
Apache::DB->init;
</Perl>
這樣,在Debug啓東時,可以看到類似[notice]Apache::DB initialized in child 1xxx的字樣。