programming-examples/perl/CGI/Server push.pl

20 lines
384 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use CGI::Push;
$co = new CGI::Push;
$co->do_push(-next_page=>\&page);
sub page
{
my($obj, $counter) = @_;
return undef if $counter > 50;
return
$co->start_html,
$co->br,
$co->center($co->h1('Server Push Example')),
$co->br,
$co->center($co->h1('Counter: ', $counter)),
$co->end_html;
}