File Coverage

blib/lib/Child/Link/IPC/Pipe.pm
Criterion Covered Total %
statement 19 19 100.0
branch 2 2 100.0
condition n/a
subroutine 7 7 100.0
pod 3 3 100.0
total 31 31 100.0


line stmt bran cond sub pod time code
1             package Child::Link::IPC::Pipe;
2 10     10   43 use strict;
  10         12  
  10         287  
3 10     10   49 use warnings;
  10         10  
  10         176  
4              
5 10     10   30 use Child::Util;
  10         7  
  10         409  
6              
7 10     10   33 use base 'Child::Link::IPC';
  10         10  
  10         3960  
8              
9             add_abstract qw/cross_pipes/;
10              
11 23     23 1 97 sub read_handle { shift->ipc->[0] }
12 43     43 1 257 sub write_handle { shift->ipc->[1] }
13              
14             sub init {
15 21     21 1 46 my $self = shift;
16 21         56 my ($pipes) = @_;
17              
18 21 100       183 $pipes = [
19             $pipes->[1],
20             $pipes->[0],
21             ] if $self->cross_pipes;
22              
23 21         367 $self->_ipc([
24             $pipes->[0]->[0],
25             $pipes->[1]->[1],
26             ]);
27 21         233 $self->autoflush(1);
28             }
29              
30             1;
31              
32             =head1 NAME
33              
34             Child::Link::IPC::Pipe - Base class for link objects used by the
35             L plugin.
36              
37             =head1 SEE ALSO
38              
39             This class inherits from:
40              
41             =over 4
42              
43             =item L
44              
45             =back
46              
47             =head1 HISTORY
48              
49             Most of this was part of L intended for use in the L
50             project. Fennec is being broken into multiple parts, this is one such part.
51              
52             =head1 FENNEC PROJECT
53              
54             This module is part of the Fennec project. See L for more details.
55             Fennec is a project to develop an extendable and powerful testing framework.
56             Together the tools that make up the Fennec framework provide a potent testing
57             environment.
58              
59             The tools provided by Fennec are also useful on their own. Sometimes a tool
60             created for Fennec is useful outside the greater framework. Such tools are
61             turned into their own projects. This is one such project.
62              
63             =over 2
64              
65             =item L - The core framework
66              
67             The primary Fennec project that ties them all together.
68              
69             =back
70              
71             =head1 AUTHORS
72              
73             Chad Granum L
74              
75             =head1 COPYRIGHT
76              
77             Copyright (C) 2010 Chad Granum
78              
79             Child is free software; Standard perl licence.
80              
81             Child is distributed in the hope that it will be useful, but WITHOUT
82             ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
83             FOR A PARTICULAR PURPOSE. See the license for more details.