modperl2をインストールした

fedora8 + perl5.8.8 + apache2 の場合の解説。
yum -y install mod_perl
だけでOK。

特定のものをmod_perl化するので、httpd.confに以下のように指定

SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
PerlSendHeader On
Order allow,deny
Allow from all


バーチャルホストをつかっている場合、モジュール位置を指定

ServerName ****.jp
DocumentRoot "/home/****/www"
PerlOptions +Parent
PerlSwitches -I/home/****/www/lib

実行環境が絶対パスになってしまうので、スクリプトの頭に追加
use Cwd;
chdir("/home/****/www/test");

あとはグローバル変数に気をつければたぶんおk

ところでスクリプトはいつまでロードされてるんだろう・・。

■参考資料
バーチャルホストな mod_perl2 で Catalyst アプリを動かす - Web道楽
http://d.hatena.ne.jp/webdoraku/20061117/p2

インストール全般の説明 - Img0ch
http://hikarin.jp/wiki/index.php/%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E5%85%A8%E8%88%AC%E3%81%AE%E8%AA%AC%E6%98%8E

おいぬま日報(不定期) - Apache2 + mod_perl2.0.1 + Sledge-1.11
http://diary.lampetty.net/20050918.html

mod_perl2 による高速化 - adiary manual
http://adiary.org/man/mod_perl2%20%A4%CB%A4%E8%A4%EB%B9%E2%C2%AE%B2%BD

PerlSwitches
http://www.wizard-limit.net/mt/pc/archives/000742.html