blob: 25ab235e61ba5bcb015fce8e22ad0d00371dda75 [file] [log] [blame]
package TestModperl::getc;
use strict;
use warnings FATAL => 'all';
use Apache2::RequestIO ();
use Apache::Test;
use Apache2::Const -compile => 'OK';
sub handler {
my $r = shift;
untie *STDIN;
tie *STDIN, $r;
while (my $c = getc) {
die "got more than 1 char" unless length($c) == 1;
$r->puts($c);
}
untie *STDIN;
Apache2::Const::OK;
}
1;