File Coverage

blib/lib/Child/Link.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 2 0.0
total 28 30 93.3


line stmt bran cond sub pod time code
1             package Child::Link;
2 20     20   89 use strict;
  20         20  
  20         485  
3 20     20   73 use warnings;
  20         176  
  20         398  
4              
5 20     20   75 use Child::Util;
  20         32  
  20         962  
6 20     20   86 use Carp qw/croak/;
  20         15  
  20         2361  
7              
8             add_accessors qw/pid/;
9              
10 2     2 0 200 sub ipc { undef }
11              
12 4     4   1848 sub _no_ipc { croak "Child was created without IPC support" }
13              
14             sub new {
15 51     51 0 143 my $class = shift;
16 51         172 my ( $pid ) = @_;
17 51         789 return bless( { _pid => $pid }, $class );
18             }
19              
20             {
21 20     20   72 no strict 'refs';
  20         20  
  20         1202  
22             *{__PACKAGE__ . '::' . $_} = \&_no_ipc
23             for qw/autoflush flush read say write/;
24             }
25              
26             1;
27              
28             =head1 NAME
29              
30             Child::Link - Base class for objects that link child and parent processes.
31              
32             =head1 HISTORY
33              
34             Most of this was part of L intended for use in the L
35             project. Fennec is being broken into multiple parts, this is one such part.
36              
37             =head1 FENNEC PROJECT
38              
39             This module is part of the Fennec project. See L for more details.
40             Fennec is a project to develop an extendable and powerful testing framework.
41             Together the tools that make up the Fennec framework provide a potent testing
42             environment.
43              
44             The tools provided by Fennec are also useful on their own. Sometimes a tool
45             created for Fennec is useful outside the greater framework. Such tools are
46             turned into their own projects. This is one such project.
47              
48             =over 2
49              
50             =item L - The core framework
51              
52             The primary Fennec project that ties them all together.
53              
54             =back
55              
56             =head1 AUTHORS
57              
58             Chad Granum L
59              
60             =head1 COPYRIGHT
61              
62             Copyright (C) 2010 Chad Granum
63              
64             Child is free software; Standard perl licence.
65              
66             Child is distributed in the hope that it will be useful, but WITHOUT
67             ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
68             FOR A PARTICULAR PURPOSE. See the license for more details.