/
alias1.5.008
116 lines (96 loc) · 4.46 KB
/
alias1.5.008
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
103
104
105
106
107
108
109
110
111
112
113
114
Reading database from ...
------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/Alias1.pm 100.0 100.0 n/a 100.0 100.0
tests/alias1 100.0 n/a n/a 100.0 100.0
Total 100.0 100.0 n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...
tests/Alias1.pm
line err stmt bran cond sub code
1 # Copyright 2004-2010, 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 Alias1;
9
10 1 1 use strict;
1
1
11 1 1 use warnings;
1
1
12
13 1 1 use Exporter;
1
1
14
15 our @ISA = qw(Exporter);
16 our @EXPORT = qw(is_3digits);
17
18 sub is_3digits {
19 2 2 my $val = shift;
20 2 my $retval = undef;
21 2 100 $retval=1 if $val =~ /^\d{3}$/;
22 2 return $retval;
23 }
24
25 1;
Branches
--------
line err % true false branch
----- --- ------ ------ ------ ------
21 100 1 1 if $val =~ /^\d{3}$/
Covered Subroutines
-------------------
Subroutine Count Location
---------- ----- ------------------
BEGIN 1 tests/Alias1.pm:10
BEGIN 1 tests/Alias1.pm:11
BEGIN 1 tests/Alias1.pm:13
is_3digits 2 tests/Alias1.pm:19
tests/alias1
line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2004-2010, 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 1 1 use strict;
1
1
11 1 1 use warnings;
1
1
12 1 1 use lib "tests";
1
1
13
14 1 1 use Alias1;
1
1
15
16 1 is_3digits(1234);
17 1 is_3digits(123);
18
19 1 exit;
Covered Subroutines
-------------------
Subroutine Count Location
---------- ----- ---------------
BEGIN 1 tests/alias1:10
BEGIN 1 tests/alias1:11
BEGIN 1 tests/alias1:12
BEGIN 1 tests/alias1:14