git.shiar.nl
/
perl
/
plp
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
generalize reading post input
[perl/plp/.git]
/
PLP
/
CGI.pm
diff --git
a/PLP/CGI.pm
b/PLP/CGI.pm
index 9b72355c55eafd1050d20a7ae4fab305a2814fbe..56ca4db72eece75fcd434f6ed04211545ee4bc4d 100644
(file)
--- a/
PLP/CGI.pm
+++ b/
PLP/CGI.pm
@@
-9,6
+9,7
@@
use PLP;
# CGI initializer: opens SCRIPT_FILENAME
sub init {
$PLP::print = 'print';
# 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)
if (defined $ENV{PATH_TRANSLATED}) {
# SCRIPT_* points to handler script (Apache CGI)
@@
-57,6
+58,12
@@
sub init {
$PLP::code = PLP::source($file, 0, undef, $ENV{PLP_FILENAME});
}
$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();
# This is run by the CGI script. (#!perl \n use PLP::CGI; PLP::CGI::everything;)
sub everything {
PLP::clean();