/
module1.5.008001
104 lines (91 loc) · 4.04 KB
/
module1.5.008001
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Reading database from cover_db
------------------------------------------------- ------ ------ ------ ------
File stmt branch cond total
------------------------------------------------- ------ ------ ------ ------
tests/Module1.pm 25.00 n/a n/a 25.00
tests/module1 85.71 50.00 n/a 77.78
Total 53.33 50.00 n/a 52.94
------------------------------------------------- ------ ------ ------ ------
tests/Module1.pm
line err stmt branch cond code
1 # Copyright 2002-2003, Paul Johnson (pjcj@cpan.org)
2
3 # This software is free. It is licensed under the same terms as Perl itself.
4
5 # The latest version of this software should be available from my homepage:
6 # http://www.pjcj.net
7
8 package Module1;
9
10 my $y = 7;
11 $y++;
12
13 sub _aa
14 {
15 *** 0 $y++;
16 *** 0 die;
17 *** 0 die;
18 }
19
20 sub _xx
21 {
22 *** 0 $y++;
23 *** 0 die;
24 }
25
26 sub yy
27 {
28 *** 0 $y++;
29 }
30
31 sub zz
32 {
33 11 my $x = shift;
34 11 $x++;
35 }
36
37 1
38
39 __END__
tests/module1
line err stmt branch cond code
1 #!/usr/local/bin/perl
2
3 # Copyright 2002-2003, Paul Johnson (pjcj@cpan.org)
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
7 # The latest version of this software should be available from my homepage:
8 # http://www.pjcj.net
9
10 use strict;
11 use warnings;
12
13 use lib "tests";
14
15 use Module1;
16
17 1 my @x;
18
19 sub xx
20 {
21 11 $x[shift]++;
22 11 Module1::zz(0);
23 }
24
25 1 for (0 .. 10)
26 {
27 *** 11 50 if (time)
28 {
29 11 xx(0);
30 }
31 else
32 {
33 *** 0 $x[1]++;
34 }
35 }
Branches
--------
line err % true false branch
----- --- ------ ------ ------ ------
27 *** 50 11 0 if (time) { }