User:Feixie/Perl/mod perl

Book

 * <>

Arch
+--> Child Proc --> fork cgi-bin proc Parent Proc ---+--> Child Proc --> fork proc, load perl interpreter, load perl cgi, exec, exit +--> Child Proc --> load perl cgi/compile once, exec, exit

perl cgi v.s. mod_perl

 * perl cgi
 * Each request invokes a fresh script run
 * don't need worry about
 * file close
 * DB connection release
 * global env
 * won't affect other session
 * mod_perl
 * performance benefits
 * internal perl interpreter
 * load script once
 * full power of apach api/ can handle all stages of request
 * Apache::PerlRun & Apache::Registry (PerlRun only benefits from internal interpreter, but it doesn't need more strict perl code)