Thread CGI::Push (10 answers)
Opened by quad at 2012-03-15 14:40

Gast quad
 2012-03-15 14:40
#156875 #156875
Hallo,

hat jemand schon Erfahrung mit das Modul 'CGI::Push'?
Ich möchte ein Skript erstellen, das den Prozess-Status ausgibt.
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use CGI::Push qw(:standard);

my $min = 1;
my $max = 10;
while($min <= $max){
   do_push(-next_page=>\&status($min,$max)-delay=>1);
   $min++;
}

sub status{
   my $min = shift;
   my $max = shift;
   return start_html('Status'),
             div({-align=>CENTER},
             h1('Virtual Status'),
             h2($min/$max*100)),
             end_html();
}

Könnt jemand vielleicht das Skript korrigieren?
Last edited: 2012-03-15 14:43:20 +0100 (CET)

View full thread CGI::Push