line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Hotline::Task; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## Copyright(c) 1998-2002 by John C. Siracusa. All rights reserved. This |
4
|
|
|
|
|
|
|
## program is free software; you can redistribute it and/or modify it under |
5
|
|
|
|
|
|
|
## the same terms as Perl itself. |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
597
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.80'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
1
|
|
my($class, @args) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my($self); |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
if(@args >= 3) |
20
|
|
|
|
|
|
|
{ |
21
|
0
|
|
|
|
|
|
$self = |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
'NUM' => $args[0], |
24
|
|
|
|
|
|
|
'TYPE' => $args[1], |
25
|
|
|
|
|
|
|
'START' => $args[2], |
26
|
|
|
|
|
|
|
'SOCKET' => $args[3], |
27
|
|
|
|
|
|
|
'PATH' => $args[4], |
28
|
|
|
|
|
|
|
'FINISH' => undef, |
29
|
|
|
|
|
|
|
'ERROR' => undef, |
30
|
|
|
|
|
|
|
'ERRTXT' => undef, |
31
|
|
|
|
|
|
|
'MISC' => $args[5], |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
else |
35
|
|
|
|
|
|
|
{ |
36
|
0
|
|
|
|
|
|
$self = |
37
|
|
|
|
|
|
|
{ |
38
|
|
|
|
|
|
|
'NUM' => undef, |
39
|
|
|
|
|
|
|
'TYPE' => undef, |
40
|
|
|
|
|
|
|
'SOCKET' => undef, |
41
|
|
|
|
|
|
|
'PATH' => undef, |
42
|
|
|
|
|
|
|
'START' => undef, |
43
|
|
|
|
|
|
|
'FINISH' => undef, |
44
|
|
|
|
|
|
|
'ERROR' => undef, |
45
|
|
|
|
|
|
|
'ERRTXT' => undef, |
46
|
|
|
|
|
|
|
'MISC' => undef, |
47
|
|
|
|
|
|
|
}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
bless $self, $class; |
51
|
0
|
|
|
|
|
|
return $self; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub num |
55
|
|
|
|
|
|
|
{ |
56
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'NUM'} = $_[1] if($_[1] =~ /^\d+$/); |
57
|
0
|
|
|
|
|
|
return $_[0]->{'NUM'}; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub type |
61
|
|
|
|
|
|
|
{ |
62
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'TYPE'} = $_[1] if(defined($_[1])); |
63
|
0
|
|
|
|
|
|
return $_[0]->{'TYPE'}; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub path |
67
|
|
|
|
|
|
|
{ |
68
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'PATH'} = $_[1] if(defined($_[1])); |
69
|
0
|
|
|
|
|
|
return $_[0]->{'PATH'}; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub socket |
73
|
|
|
|
|
|
|
{ |
74
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'SOCKET'} = $_[1] if($_[1] =~ /^\d+$/); |
75
|
0
|
|
|
|
|
|
return $_[0]->{'SOCKET'}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub start |
79
|
|
|
|
|
|
|
{ |
80
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'START'} = $_[1] if($_[1] =~ /^\d+$/); |
81
|
0
|
|
|
|
|
|
return $_[0]->{'START'}; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub finish |
85
|
|
|
|
|
|
|
{ |
86
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'FINISH'} = $_[1] if($_[1] =~ /^\d+$/); |
87
|
0
|
|
|
|
|
|
return $_[0]->{'FINISH'}; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub error |
91
|
|
|
|
|
|
|
{ |
92
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'ERROR'} = $_[1] if(@_ == 2); |
93
|
0
|
|
|
|
|
|
return $_[0]->{'ERROR'}; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub error_text |
97
|
|
|
|
|
|
|
{ |
98
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'ERRTXT'} = $_[1] if(@_ == 2); |
99
|
0
|
|
|
|
|
|
return $_[0]->{'ERRTXT'}; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub misc |
103
|
|
|
|
|
|
|
{ |
104
|
0
|
0
|
|
0
|
0
|
|
$_[0]->{'MISC'} = $_[1] if(@_ == 2); |
105
|
0
|
|
|
|
|
|
return $_[0]->{'MISC'}; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
1; |