line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package t::Utils; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
4215
|
use warnings; |
|
3
|
|
|
|
|
17
|
|
|
3
|
|
|
|
|
77
|
|
4
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
45
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
1629
|
use Test::More; |
|
3
|
|
|
|
|
167445
|
|
|
3
|
|
|
|
|
21
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
|
|
|
|
|
|
our @ISA = qw/Exporter/; |
10
|
|
|
|
|
|
|
our @EXPORT = ( |
11
|
|
|
|
|
|
|
@Test::More::EXPORT, |
12
|
|
|
|
|
|
|
qw/does_ok/, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub does_ok { |
16
|
87
|
|
|
87
|
0
|
38754
|
my ($obj, $role, $ver, $name) = @_; |
17
|
87
|
|
|
|
|
216
|
my $B = Test::More->builder; |
18
|
|
|
|
|
|
|
|
19
|
87
|
|
100
|
|
|
732
|
$ver ||= 1; |
20
|
87
|
|
66
|
|
|
292
|
$name ||= "$obj DOES $role"; |
21
|
|
|
|
|
|
|
|
22
|
87
|
|
|
|
|
86
|
my $does = eval { $obj->DOES($role) }; |
|
87
|
|
|
|
|
181
|
|
23
|
87
|
50
|
|
|
|
183
|
$B->is_eq($does, $ver, $name) |
24
|
|
|
|
|
|
|
or $B->diag("\$\@: $@"); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|