line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Mocha::Types; |
2
|
|
|
|
|
|
|
# ABSTRACT: Internal type constraints |
3
|
|
|
|
|
|
|
$Test::Mocha::Types::VERSION = '0.61'; |
4
|
|
|
|
|
|
|
use Type::Library |
5
|
21
|
|
|
|
|
192
|
-base, |
6
|
|
|
|
|
|
|
-declare => qw( |
7
|
|
|
|
|
|
|
Matcher |
8
|
|
|
|
|
|
|
Mock |
9
|
|
|
|
|
|
|
NumRange |
10
|
|
|
|
|
|
|
Slurpy |
11
|
21
|
|
|
21
|
|
4921
|
); |
|
21
|
|
|
|
|
231369
|
|
12
|
|
|
|
|
|
|
|
13
|
21
|
|
|
21
|
|
20060
|
use Type::Utils -all; |
|
21
|
|
|
|
|
53722
|
|
|
21
|
|
|
|
|
158
|
|
14
|
21
|
|
|
21
|
|
47642
|
use Types::Standard 0.008 qw( Dict InstanceOf Num Tuple ); |
|
21
|
|
|
|
|
357004
|
|
|
21
|
|
|
|
|
155
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
union Matcher, |
17
|
|
|
|
|
|
|
[ |
18
|
|
|
|
|
|
|
class_type( { class => 'Type::Tiny' } ), |
19
|
|
|
|
|
|
|
class_type( { class => 'Moose::Meta::TypeConstraint' } ), |
20
|
|
|
|
|
|
|
]; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
class_type Mock, { class => 'Test::Mocha::Mock' }; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
declare NumRange, as Tuple [ Num, Num ], where { $_->[0] < $_->[1] }; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# this hash structure is created by Types::Standard::slurpy() |
27
|
|
|
|
|
|
|
declare Slurpy, as Dict [ slurpy => InstanceOf ['Type::Tiny'] ]; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |