line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mock::Quick::Method; |
2
|
9
|
|
|
9
|
|
96270
|
use strict; |
|
9
|
|
|
|
|
11
|
|
|
9
|
|
|
|
|
198
|
|
3
|
9
|
|
|
9
|
|
29
|
use warnings; |
|
9
|
|
|
|
|
10
|
|
|
9
|
|
|
|
|
162
|
|
4
|
|
|
|
|
|
|
|
5
|
9
|
|
|
9
|
|
34
|
use Carp (); |
|
9
|
|
|
|
|
12
|
|
|
9
|
|
|
|
|
88
|
|
6
|
9
|
|
|
9
|
|
24
|
use Scalar::Util (); |
|
9
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
751
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
15
|
|
|
15
|
0
|
1649
|
my $class = shift; |
10
|
15
|
|
|
|
|
20
|
my ($sub) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Fixes #11 |
13
|
15
|
100
|
66
|
|
|
118
|
return $sub |
|
|
|
66
|
|
|
|
|
14
|
|
|
|
|
|
|
if $sub |
15
|
|
|
|
|
|
|
&& Scalar::Util::blessed($sub) |
16
|
|
|
|
|
|
|
&& $sub->isa($class); |
17
|
|
|
|
|
|
|
|
18
|
14
|
100
|
|
|
|
68
|
Carp::croak "Constructor to $class takes a single codeblock" |
19
|
|
|
|
|
|
|
unless ref $sub eq 'CODE'; |
20
|
13
|
|
|
|
|
42
|
return bless $sub, $class; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |