| 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.08'; | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 4 |  |  | 4 |  | 27 | use strict; | 
|  | 4 |  |  |  |  | 9 |  | 
|  | 4 |  |  |  |  | 117 |  | 
| 6 | 4 |  |  | 4 |  | 30 | use warnings; | 
|  | 4 |  |  |  |  | 8 |  | 
|  | 4 |  |  |  |  | 150 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 | 4 |  |  |  |  | 32 | use overload fallback => 1, | 
| 9 | 4 |  |  | 4 |  | 4960 | '""' => \&message; | 
|  | 4 |  |  |  |  | 3997 |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 4 |  |  | 4 |  | 477 | use constant IPC_STDIN  => 'stdin'; | 
|  | 4 |  |  |  |  | 12 |  | 
|  | 4 |  |  |  |  | 287 |  | 
| 12 | 4 |  |  | 4 |  | 29 | use constant IPC_STDOUT => 'stdout'; | 
|  | 4 |  |  |  |  | 8 |  | 
|  | 4 |  |  |  |  | 177 |  | 
| 13 | 4 |  |  | 4 |  | 20 | use constant IPC_STDERR => 'stderr'; | 
|  | 4 |  |  |  |  | 13 |  | 
|  | 4 |  |  |  |  | 158 |  | 
| 14 | 4 |  |  | 4 |  | 22 | use constant IPC_ERROR  => 'errors'; | 
|  | 4 |  |  |  |  | 5 |  | 
|  | 4 |  |  |  |  | 208 |  | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | BEGIN{ | 
| 17 | 4 |  |  | 4 |  | 25 | use base 'Exporter'; | 
|  | 4 |  |  |  |  | 18 |  | 
|  | 4 |  |  |  |  | 676 |  | 
| 18 |  |  |  |  |  |  |  | 
| 19 | 4 |  |  | 4 |  | 855 | 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 | 75 | my ($class, %param) = @_; | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | bless{ | 
| 31 |  |  |  |  |  |  | source  => $param{source}, | 
| 32 |  |  |  |  |  |  | type    => $param{type}, | 
| 33 |  |  |  |  |  |  | message => $param{message}, | 
| 34 | 6 |  |  |  |  | 55 | }, $class; | 
| 35 |  |  |  |  |  |  | } | 
| 36 |  |  |  |  |  |  |  | 
| 37 | 12 |  |  | 12 | 0 | 37 | sub type    { $_[0]->{type} } | 
| 38 | 6 |  |  | 6 | 1 | 32 | sub source  { $_[0]->{source} } | 
| 39 | 10 |  |  | 10 | 1 | 292 | sub message { $_[0]->{message} } | 
| 40 | 6 |  |  | 6 | 1 | 24 | sub stdout  { $_[0]->type eq IPC_STDOUT } | 
| 41 | 2 |  |  | 2 | 1 | 8 | sub stderr  { $_[0]->type eq IPC_STDERR } | 
| 42 | 4 |  |  | 4 | 1 | 27 | sub error   { $_[0]->type eq IPC_ERROR } | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | 1; | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | __END__ |