line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Chai::Util::Type; |
2
|
2
|
|
|
2
|
|
983
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
46
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
4
|
2
|
|
|
2
|
|
10
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
54
|
use Exporter qw/import/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
91
|
|
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw/is_type/; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
1667
|
use Mouse::Util::TypeConstraints (); |
|
2
|
|
|
|
|
42571
|
|
|
2
|
|
|
|
|
168
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub is_type { |
12
|
165
|
|
|
165
|
0
|
284
|
my ($obj, $type) = @_; |
13
|
165
|
|
|
|
|
514
|
my $constraint = Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint($type); |
14
|
165
|
|
|
|
|
4183
|
return $constraint->check($obj); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |