X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/4cbac41f4d1bef193cf955c6c854c8a9ed258119..27b0c16f2bdec1feb77ff34f6dd3aaca9a0fb6f3:/PLP.pm
diff --git a/PLP.pm b/PLP.pm
index 03b5b92..fd9b262 100644
--- a/PLP.pm
+++ b/PLP.pm
@@ -1,8 +1,6 @@
package PLP;
-# Not to be used without the CGI script;
-
-our $VERSION = '3.06';
+use 5.006;
use PLP::Functions ();
use PLP::Fields;
@@ -10,174 +8,583 @@ use PLP::Tie::Headers;
use PLP::Tie::Delay;
use PLP::Tie::Print;
-=head1 PLP
-
-None of the functions in this module should be called by PLP scripts.
+use File::Basename ();
+use File::Spec;
+#use Cwd ();
-Functions:
+use strict;
-=over 10
+our $VERSION = '3.19';
-=item sendheaders
+# Subs in this package:
+# _default_error($plain, $html) Default error handler
+# cgi_init Initialization for CGI
+# clean Reset variables
+# error($error, $type) Handle errors
+# everything Do everything: CGI
+# handler($r) Do everything: mod_perl
+# mod_perl_init($r) Initialization for mod_perl
+# mod_perl_print Faster printing for mod_perl
+# sendheaders Send headers
+# source($path, $level, $linespec) Read and parse .plp files
+# start Start the initialized PLP script
-Sends the headers waiting in %PLP::Script::header
+# The _init subs do the following:
+# Set $PLP::code to the initial code
+# Set $ENV{PLP_*} and make PATH_INFO if needed
+# Change the CWD
-=item source
+# This gets referenced as the initial $PLP::ERROR
+sub _default_error {
+ my ($plain, $html) = @_;
+ print qq{
},
+ qq{Debug information: $html
};
+}
-Given a filename and optional level (level should be C<0> if it isn't called
-by C