7 # mod_perl initializer: returns 0 on success, Apache error code on failure
11 $PLP::print = 'PLP::Apache::print';
13 $ENV{PLP_FILENAME} = my $filename = $r->filename;
15 unless (-f $filename) {
16 return Apache::Constants::NOT_FOUND();
19 return Apache::Constants::FORBIDDEN();
22 $ENV{PLP_NAME} = $r->uri;
24 our $use_cache = $r->dir_config('PLPcache') !~ /^off$/i;
25 #S our $use_safe = $r->dir_config('PLPsafe') =~ /^on$/i;
26 my $path = $r->filename();
27 my ($file, $dir) = File::Basename::fileparse($path);
30 $PLP::code = PLP::source($file, 0, undef, $path);
35 # FAST printing under mod_perl
37 return unless grep length, @_;
38 PLP::sendheaders() unless $PLP::sentheaders;
39 $PLP::Apache::r->print(@_);