X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/072e8bc0a42031722a1c5005ebc6aa304e43c0a8..4565100c67dd7b0344e9eb332296d5fa64e7611b:/PLP/Apache.pm diff --git a/PLP/Apache.pm b/PLP/Apache.pm index c388095..bc78881 100644 --- a/PLP/Apache.pm +++ b/PLP/Apache.pm @@ -26,6 +26,7 @@ sub init { our $r = shift; $PLP::print = 'PLP::Apache::print'; + $PLP::read = \&read; $ENV{PLP_FILENAME} = my $filename = $r->filename; @@ -49,6 +50,12 @@ sub init { return 0; # OK } +sub read ($) { + my ($bytes) = @_; + $r->read(my $data, $bytes); + return $data; +} + # FAST printing under mod_perl sub print { return unless grep length, @_;