line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MultiProcFactory::Generic; |
2
|
|
|
|
|
|
|
# @(#) $Name: $ $Id: Generic.pm,v 1.3 2004/09/14 18:44:16 aaron Exp $ |
3
|
|
|
|
|
|
|
## Aaron Dancygier |
4
|
|
|
|
|
|
|
|
5
|
26
|
|
|
26
|
|
131
|
use strict; |
|
26
|
|
|
|
|
27
|
|
|
26
|
|
|
|
|
1099
|
|
6
|
26
|
|
|
26
|
|
156
|
use vars qw(@ISA $VERSION); |
|
26
|
|
|
|
|
52
|
|
|
26
|
|
|
|
|
5426
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
@ISA = qw(MultiProcFactory); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
52
|
|
|
52
|
1
|
95
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
52
|
50
|
|
|
|
78
|
unless (@{$self->{partition_list}} - 0) { |
|
52
|
|
|
|
|
416
|
|
15
|
0
|
|
|
|
|
0
|
croak("must pass partition_list\n"); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
52
|
|
|
|
|
120
|
foreach my $url (@{$self->{partition_list}}) { |
|
52
|
|
|
|
|
276
|
|
19
|
416
|
|
|
|
|
1226
|
$self->{partition_hash}{$url} = 1; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
52
|
|
50
|
|
|
630
|
$self->{timeout} ||= 30; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub do_child_init { |
26
|
24
|
|
|
24
|
1
|
155
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
24
|
|
|
|
|
341
|
return 1; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub work { |
32
|
24
|
|
|
24
|
1
|
201
|
my $self = shift; |
33
|
|
|
|
|
|
|
|
34
|
24
|
|
|
|
|
1284
|
$self->do_child(); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |