line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GRID::Machine::IOHandle; |
2
|
20
|
|
|
20
|
|
292
|
use strict; |
|
20
|
|
|
|
|
35
|
|
|
20
|
|
|
|
|
940
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
## Class methods |
5
|
|
|
|
|
|
|
|
6
|
20
|
|
|
20
|
|
113
|
use overload '<>' => \⋄ |
|
20
|
|
|
|
|
37
|
|
|
20
|
|
|
|
|
204
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# diamond works only in scalar context |
9
|
|
|
|
|
|
|
sub diamond { |
10
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
11
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $r = $m->diamond($self->{index}, @_); |
14
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
15
|
0
|
|
|
|
|
|
return $r->result; |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub print { |
19
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
20
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
$m->print($self->{index}, @_); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub printf { |
27
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
28
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
$m->printf($self->{index}, @_); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub flush { |
35
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
36
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
$m->flush($self->{index}, @_)->result; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub autoflush { |
42
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
43
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
$m->autoflush($self->{index}, @_)->result; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub blocking { |
49
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
50
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
$m->blocking($self->{index}, @_)->result; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub close { |
56
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
57
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
$m->close($self->{index}, @_)->result; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub getc { |
63
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
64
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
my $r = $m->getc($self->{index}, @_); |
67
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
68
|
0
|
|
|
|
|
|
return $r->result; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub getline { |
72
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
73
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
my $r = $m->getline($self->{index}, @_); |
76
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
77
|
0
|
|
|
|
|
|
return $r->result; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub getlines { |
81
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
82
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
my $r = $m->getlines($self->{index}, @_); |
85
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
86
|
0
|
|
|
|
|
|
return $r->Results; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub read { |
90
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
91
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
92
|
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
|
my $r = $m->read($self->{index}, @_); |
94
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
95
|
0
|
|
|
|
|
|
return $r->result; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub sysread { |
99
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
100
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
my $r = $m->sysread($self->{index}, @_); |
103
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
104
|
0
|
|
|
|
|
|
return $r->result; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub stat { |
108
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
109
|
0
|
|
|
|
|
|
my $m = $self->{server}; |
110
|
|
|
|
|
|
|
|
111
|
0
|
|
|
|
|
|
my $r = $m->stat($self->{index}, @_); |
112
|
0
|
0
|
|
|
|
|
die $r unless $r->ok; |
113
|
0
|
|
|
|
|
|
return $r->Results; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
1; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
__END__ |