t/test62-tie-b.p

filter: Statementstmt 83.3% 5 / 6 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 81.8% 9 / 11 CC 1 SCAR 0.0
CC
1
Cov
75%
TIESCALAR
1.0
FETCH
1.0
STORE
1.0
CRAP 1.0
« t/test20-streval.p ↑ Summary blib/lib/Devel/NYTProf/Test.pm »
1 # test determination of subroutine caller in tie calls
2  
3  
4 # calls to TIESCALAR aren't seen by perl < 5.8.9 and 5.10.1
5 16 ▶sub MyTie::TIESCALAR { bless {}, shift; }
Subroutine TIESCALAR: called CC=1 SCAR=0.0
6 8 ▶sub MyTie::FETCH { }
Subroutine FETCH: called CC=1 SCAR=0.0
7 8 ▶sub MyTie::STORE { }
Subroutine STORE: called CC=1 SCAR=0.0
8  
9  
10 16 tie my $tied, 'MyTie', 42; # TIESCALAR
11 16 $tied = 1; # STORE
12 0 ▶if ($tied) { 1 } # FETCH
Branch: 1 branch
BranchTrueFalseTotal
if ($tied) 0 16 16
13  
14 16 exit 0;
« t/test20-streval.p ↑ Summary blib/lib/Devel/NYTProf/Test.pm »