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