Mock/Win32CORE.pm

filter: Statementstmt 100% 16 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 95.4% 21 / 22 CC 2 SCAR 3.4
CC
2
Cov
94%
AUTOLOAD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Mock/Win32/Process.pm ↑ Summary Mock/Win32/Service.pm »
1 package # hide from PAUSE
2 Win32;
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=2 SCAR=6.9
7 2 ▶ no strict "vars";
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # save the value of these variables
10 1 my @save = (0+$!, 0+$^E);
11  
12 # if what is asked is a Win32 function, load the real module
13 1 ▶ if (index($AUTOLOAD, "Win32::") >= 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (index($AUTOLOAD, "Win32::") != -1) 1 0 1
14 1 require Win32;
15 1 Win32->import;
16 }
17  
18 # restore the values
19 1 ($!, $^E) = @save;
20  
21 # jump to the actual function
22 1 goto &$AUTOLOAD
23 }
24  
25 2 1
26  
27 __END__
« Mock/Win32/Process.pm ↑ Summary Mock/Win32/Service.pm »