Remote/GlobProxy.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod n/a totaltotal 80.6% 25 / 31 CC 2 SCAR 2.9
CC
2
Cov
83%
__ANON__
2.1
TIEHANDLE
1.1
TIEHANDLE
1.1
CRAP 1.3
« Remote/FromData.pm ↑ Summary Remote.pm »
1 11 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Object::Remote::GlobProxy;
4 11 require Tie::Handle;
5 11 our @ISA = qw( Tie::Handle );
6  
7 4 ▶sub TIEHANDLE {
Subroutine TIEHANDLE: called CC=1 SCAR=1.2
8 0 ▶ my ($class, $glob_container) = @_;
Subroutine TIEHANDLE: not called CC=1 SCAR=1.2
9 0 return bless { container => $glob_container }, $class;
10 }
11  
12 my @_delegate = (
13 1 ▶ [READLINE => sub { wantarray ? $_[0]->getlines : $_[0]->getline }],
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 1 0 1
14 11 (map { [uc($_), lc($_)] } qw(
15 write
16 print
17 printf
18 read
19 getc
20 close
21 open
22 binmode
23 eof
24 tell
25 seek
26 )),
27 );
28  
29 11 for my $delegation (@_delegate) {
30 132 my ($from, $to) = @$delegation;
31 11 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
32 132 ▶ *{join '::', __PACKAGE__, $from} = sub {
Subroutine __ANON__: called CC=1 SCAR=0.4
33 0 ▶ $_[0]->{container}->$to(@_[1 .. $#_]);
Subroutine __ANON__: not called CC=1 SCAR=1.2
34 132 };
35 }
36  
37 11 1;
« Remote/FromData.pm ↑ Summary Remote.pm »