#!./perl -wT
# test the simple_counter() method
# test do_sleep, except we don't want to bog down the tests
# there's also a potential timing-related failure lurking here
# change this variable at your own risk
my $sleep_in_tests = 0;
SKIP: {
my $time = time;
}
# test push_delay()
# next_page() to be called twice, last_page() once, no delay
my %vars = (
-delay => 0,
);
# this seems to appear on every page
# these should appear correctly
# send a fake content type (header capitalization varies in CGI, CGI::Push)
# use our own counter, as $COUNTER in CGI::Push is now off
my $i;
# no delay, custom headers from callback, only call callback once
$q->do_push(
-delay => 0,
-type => 'dynamic',
-next_page => sub {
return if $i++;
},
);
# header capitalization again, our word should appear only once
sub TIEHANDLE {
}
sub PRINT {
my $self = shift;
}