line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Double; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
104166
|
use strict; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
275
|
|
4
|
9
|
|
|
9
|
|
45
|
use warnings; |
|
9
|
|
|
|
|
35
|
|
|
9
|
|
|
|
|
256
|
|
5
|
9
|
|
|
9
|
|
37
|
use Exporter qw(import); |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
276
|
|
6
|
9
|
|
|
9
|
|
5528
|
use Test::Double::Stub; |
|
9
|
|
|
|
|
28
|
|
|
9
|
|
|
|
|
294
|
|
7
|
9
|
|
|
9
|
|
5046
|
use Test::Double::Mock; |
|
9
|
|
|
|
|
32
|
|
|
9
|
|
|
|
|
1795
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
10
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT = qw(stub mock); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub stub { |
15
|
8
|
|
|
8
|
1
|
12975
|
bless \$_[0], 'Test::Double::Stub'; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub mock { |
19
|
32
|
|
|
32
|
1
|
40626
|
Test::Double::Mock->wrap($_[0]); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub verify { |
23
|
15
|
|
|
15
|
1
|
27
|
my $class = shift; |
24
|
15
|
|
|
|
|
58
|
Test::Double::Mock->verify_all; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub verify_result { |
28
|
8
|
|
|
8
|
1
|
16
|
my $class = shift; |
29
|
8
|
|
|
|
|
29
|
Test::Double::Mock->verify_result_all; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub reset { |
33
|
15
|
|
|
15
|
1
|
1133
|
my $class = shift; |
34
|
15
|
|
|
|
|
55
|
Test::Double::Mock->reset_all; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |