File Coverage

blib/lib/Child/IPC/Pipe.pm
Criterion Covered Total %
statement 22 22 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 1 4 25.0
total 32 35 91.4


line stmt bran cond sub pod time code
1             package Child::IPC::Pipe;
2 10     10   35 use strict;
  10         13  
  10         252  
3 10     10   31 use warnings;
  10         8  
  10         311  
4              
5 10     10   4595 use Child::Link::IPC::Pipe::Proc;
  10         15  
  10         228  
6 10     10   4645 use Child::Link::IPC::Pipe::Parent;
  10         18  
  10         232  
7              
8 10     10   39 use base 'Child';
  10         13  
  10         1566  
9              
10 14     14 0 761 sub child_class { 'Child::Link::IPC::Pipe::Proc' }
11 7     7 0 575 sub parent_class { 'Child::Link::IPC::Pipe::Parent' }
12              
13             sub shared_data {
14 21     21 0 563 pipe( my ( $ain, $aout ));
15 21         295 pipe( my ( $bin, $bout ));
16             return [
17 21         106 [ $ain, $aout ],
18             [ $bin, $bout ],
19             ];
20             }
21              
22             sub new {
23 19     19 1 30 my ( $class, $code ) = @_;
24 19         104 return bless( { _code => $code }, $class );
25             }
26              
27             1;
28              
29             =head1 NAME
30              
31             Child::IPC::Pipe - Pipe based IPC plugin for L
32              
33             =head1 DESCRIPTION
34              
35             Creates 2 pipes just before forking.
36              
37             =head1 HISTORY
38              
39             Most of this was part of L intended for use in the L
40             project. Fennec is being broken into multiple parts, this is one such part.
41              
42             =head1 FENNEC PROJECT
43              
44             This module is part of the Fennec project. See L for more details.
45             Fennec is a project to develop an extendable and powerful testing framework.
46             Together the tools that make up the Fennec framework provide a potent testing
47             environment.
48              
49             The tools provided by Fennec are also useful on their own. Sometimes a tool
50             created for Fennec is useful outside the greater framework. Such tools are
51             turned into their own projects. This is one such project.
52              
53             =over 2
54              
55             =item L - The core framework
56              
57             The primary Fennec project that ties them all together.
58              
59             =back
60              
61             =head1 AUTHORS
62              
63             Chad Granum L
64              
65             =head1 COPYRIGHT
66              
67             Copyright (C) 2010 Chad Granum
68              
69             Child is free software; Standard perl licence.
70              
71             Child is distributed in the hope that it will be useful, but WITHOUT
72             ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
73             FOR A PARTICULAR PURPOSE. See the license for more details.