line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Mocha::Types; |
2
|
|
|
|
|
|
|
# ABSTRACT: Internal type constraints |
3
|
|
|
|
|
|
|
$Test::Mocha::Types::VERSION = '0.66'; |
4
|
|
|
|
|
|
|
use Type::Library |
5
|
13
|
|
|
|
|
165
|
-base, |
6
|
|
|
|
|
|
|
-declare => qw( |
7
|
|
|
|
|
|
|
Matcher |
8
|
|
|
|
|
|
|
NumRange |
9
|
|
|
|
|
|
|
Slurpy |
10
|
13
|
|
|
13
|
|
4039
|
); |
|
13
|
|
|
|
|
195539
|
|
11
|
|
|
|
|
|
|
|
12
|
13
|
|
|
13
|
|
16063
|
use Type::Utils -all; |
|
13
|
|
|
|
|
55917
|
|
|
13
|
|
|
|
|
140
|
|
13
|
13
|
|
|
13
|
|
49845
|
use Types::Standard 0.008 qw( Dict InstanceOf Num Tuple ); |
|
13
|
|
|
|
|
450069
|
|
|
13
|
|
|
|
|
128
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
union Matcher, |
16
|
|
|
|
|
|
|
[ |
17
|
|
|
|
|
|
|
class_type( { class => 'Type::Tiny' } ), |
18
|
|
|
|
|
|
|
class_type( { class => 'Moose::Meta::TypeConstraint' } ), |
19
|
|
|
|
|
|
|
]; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
declare NumRange, as Tuple [ Num, Num ], where { $_->[0] < $_->[1] }; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# this hash structure is created by Types::Standard::slurpy() |
24
|
|
|
|
|
|
|
declare Slurpy, as Dict [ slurpy => InstanceOf ['Type::Tiny'] ]; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |