# CGI initializer: opens SCRIPT_FILENAME
sub init {
$PLP::print = 'print';
+ $PLP::read = \&read;
if (defined $ENV{PATH_TRANSLATED}) {
# SCRIPT_* points to handler script (Apache CGI)
$PLP::code = PLP::source($file, 0, undef, $ENV{PLP_FILENAME});
}
+sub read ($) {
+ my ($bytes) = @_;
+ read *STDIN, my $data, $bytes;
+ return $data;
+}
+
# This is run by the CGI script. (#!perl \n use PLP::CGI; PLP::CGI::everything;)
sub everything {
PLP::clean();