Sorry to ask such a newbie question, but I can't figure this out.
In a handler I want to process all requests and parse the document
requested and spit it out after marking it up.
I have put in place this code, but I don't see how to access the actual
requested document.
I'm hoping there's already an open filehandle to it somewhere?
###### a simple handler - but doesn't print the actual requested
document.
package _Parse;
sub handler {
my $r = shift;
my $symname;
$r->content_type("text/html");
$r->send_http_header;
$r->print("header text\n");
# this doesn't work ---
while (<>) {
$r->print;
$_->print;
}
# this prints the environment variables
foreach $key (keys %ENV) {
print "$key: $ENV{$key}";
print "<br>";
}
}
1;