line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IPC::Simple::Message; |
2
|
|
|
|
|
|
|
# ABSTRACT: a message received from an IPC::Simple process |
3
|
|
|
|
|
|
|
$IPC::Simple::Message::VERSION = '0.09'; |
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
27
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
117
|
|
6
|
4
|
|
|
4
|
|
26
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
150
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
|
|
29
|
use overload fallback => 1, |
9
|
4
|
|
|
4
|
|
4877
|
'""' => \&message; |
|
4
|
|
|
|
|
4061
|
|
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
427
|
use constant IPC_STDIN => 'stdin'; |
|
4
|
|
|
|
|
26
|
|
|
4
|
|
|
|
|
255
|
|
12
|
4
|
|
|
4
|
|
26
|
use constant IPC_STDOUT => 'stdout'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
188
|
|
13
|
4
|
|
|
4
|
|
21
|
use constant IPC_STDERR => 'stderr'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
167
|
|
14
|
4
|
|
|
4
|
|
24
|
use constant IPC_ERROR => 'errors'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
229
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
BEGIN{ |
17
|
4
|
|
|
4
|
|
25
|
use base 'Exporter'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
574
|
|
18
|
|
|
|
|
|
|
|
19
|
4
|
|
|
4
|
|
866
|
our @EXPORT = qw( |
20
|
|
|
|
|
|
|
IPC_STDIN |
21
|
|
|
|
|
|
|
IPC_STDOUT |
22
|
|
|
|
|
|
|
IPC_STDERR |
23
|
|
|
|
|
|
|
IPC_ERROR |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
6
|
|
|
6
|
0
|
46
|
my ($class, %param) = @_; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
bless{ |
31
|
|
|
|
|
|
|
source => $param{source}, |
32
|
|
|
|
|
|
|
type => $param{type}, |
33
|
|
|
|
|
|
|
message => $param{message}, |
34
|
6
|
|
|
|
|
56
|
}, $class; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
12
|
|
|
12
|
0
|
35
|
sub type { $_[0]->{type} } |
38
|
6
|
|
|
6
|
1
|
27
|
sub source { $_[0]->{source} } |
39
|
10
|
|
|
10
|
1
|
320
|
sub message { $_[0]->{message} } |
40
|
6
|
|
|
6
|
1
|
23
|
sub stdout { $_[0]->type eq IPC_STDOUT } |
41
|
2
|
|
|
2
|
1
|
7
|
sub stderr { $_[0]->type eq IPC_STDERR } |
42
|
4
|
|
|
4
|
1
|
19
|
sub error { $_[0]->type eq IPC_ERROR } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |