line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Double::Stub; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
41
|
use strict; |
|
9
|
|
|
|
|
15
|
|
|
9
|
|
|
|
|
259
|
|
4
|
9
|
|
|
9
|
|
40
|
use warnings; |
|
9
|
|
|
|
|
13
|
|
|
9
|
|
|
|
|
262
|
|
5
|
9
|
|
|
9
|
|
7685
|
use Class::Monadic (); |
|
9
|
|
|
|
|
69157
|
|
|
9
|
|
|
|
|
1466
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTOLOAD; |
8
|
|
|
|
|
|
|
sub AUTOLOAD { |
9
|
9
|
|
|
9
|
|
52
|
my $name = [ split /::/, $AUTOLOAD ]->[-1]; |
10
|
9
|
50
|
|
|
|
38
|
return if $name eq 'DESTROY'; |
11
|
|
|
|
|
|
|
|
12
|
9
|
|
|
|
|
12
|
my $self = shift; |
13
|
9
|
|
50
|
0
|
|
21
|
my $stub = shift || sub {}; |
|
0
|
|
|
|
|
|
|
14
|
9
|
100
|
|
5
|
|
31
|
my $func = ref($stub) eq 'CODE' ? $stub : sub { $stub }; |
|
5
|
|
|
|
|
19
|
|
15
|
9
|
|
|
|
|
42
|
Class::Monadic->initialize($$self)->add_methods($name => $func); |
16
|
|
|
|
|
|
|
|
17
|
9
|
|
|
|
|
675
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
__END__ |