Any/OS/_Base/DPipe.pm untested

filter: Statementstmt 0.0% 0 / 44 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 69 CC 1 SCAR 6.9
CC
1
Cov
0%
_any
2.0
_proc
2.0
_upgrade_fh_to_dpipe
2.0
CRAP 2.0
1 package Net::SSH::Any::OS::_Base::DPipe;
2  
3 use strict;
4 use warnings;
5  
6 use Net::SSH::Any::Constants ();
7 use Net::SSH::Any::Util qw($debug _debug _debug_hexdump);
8  
9 require Net::SSH::Any::DPipe;
10 require IO::Handle;
11 our @ISA = qw(Net::SSH::Any::DPipe
12 IO::Handle);
13  
14 sub _any { ${*{shift()}}{_ssha_os_any} }
15 sub _proc { ${*{shift()}}{_ssha_os_proc} }
16  
17 sub _upgrade_fh_to_dpipe {
18 my ($class, $dpipe, $any, $proc) = @_;
19 bless $dpipe, $class;
20 ${*$dpipe}{_ssha_os_any} = $any;
21 ${*$dpipe}{_ssha_os_proc} = $proc;
22 $dpipe
23 }
24  
25 sub close {
26 my $dpipe = shift;
27 my $ok = 1;
28 $dpipe->_close_fhs or undef $ok;
29 my $any = $dpipe->_any;
30 my $proc = delete ${*$dpipe}{_ssha_os_proc};
31 $any->_wait_ssh_proc($proc) or undef $ok;
32 $any->_remap_child_error($proc);
33 $? = $proc->{rc};
34 $any->_check_child_error or undef $ok;
35 return $ok;
36 }
37  
38 sub error { shift->_any->error }
39  
40 1;