summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d7fd5b9)
Keep compatibility wrappers for handler() and everything().
-# This is run by the CGI script. (#!perl \n use PLP; PLP::everything;)
+# Wrap old request handlers.
sub everything {
require PLP::CGI;
sub everything {
require PLP::CGI;
- clean();
- PLP::CGI::init();
- start();
+ PLP::CGI::everything();
-
-# This is the mod_perl handler.
sub handler {
require PLP::Apache;
sub handler {
require PLP::Apache;
- require Apache::Constants;
- clean();
- if (my $ret = PLP::Apache::init($_[0])) {
- return $ret;
- }
- #S start($_[0]);
- start();
- no strict 'subs';
- return Apache::Constants::OK();
+ PLP::Apache::handler(@_);
}
# Sends the headers waiting in %PLP::Script::header
}
# Sends the headers waiting in %PLP::Script::header
<Files *.plp>
SetHandler perl-script
<Files *.plp>
SetHandler perl-script
+ PerlHandler PLP::Apache
PerlSendHeader On
PerlSetVar PLPcache On
</Files>
PerlSendHeader On
PerlSetVar PLPcache On
</Files>
=item * /foo/bar/plp.cgi (local filesystem address)
#!/usr/bin/perl
=item * /foo/bar/plp.cgi (local filesystem address)
#!/usr/bin/perl
- use PLP;
- PLP::everything();
+ use PLP::CGI;
+ PLP::CGI::everything();
=item * httpd.conf (for CGI setup)
=item * httpd.conf (for CGI setup)
+use PLP;
+require Apache::Constants;
+
# mod_perl initializer: returns 0 on success, Apache error code on failure
sub init {
our $r = shift;
# mod_perl initializer: returns 0 on success, Apache error code on failure
sub init {
our $r = shift;
$PLP::Apache::r->print(@_);
}
$PLP::Apache::r->print(@_);
}
+# This is the mod_perl handler.
+sub handler {
+ PLP::clean();
+ if (my $ret = init($_[0])) {
+ return $ret;
+ }
+ #S PLP::start($_[0]);
+ PLP::start();
+ no strict 'subs';
+ return Apache::Constants::OK();
+}
+
# CGI initializer: parses PATH_TRANSLATED
sub init {
$PLP::print = 'print';
# CGI initializer: parses PATH_TRANSLATED
sub init {
$PLP::print = 'print';
$PLP::code = PLP::source($file, 0, undef, $path);
}
$PLP::code = PLP::source($file, 0, undef, $path);
}
-# This is run by the CGI script. (#!perl \n use PLP; PLP::everything;)
-#sub everything {
-# clean();
-# cgi_init();
-# start();
-#}
+# This is run by the CGI script. (#!perl \n use PLP::CGI; PLP::CGI::everything;)
+sub everything {
+ PLP::clean();
+ init();
+ PLP::start();
+}