line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CodeGen::Protection::Types; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Keep our type tools orgnanized |
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
35
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
155
|
|
6
|
5
|
|
|
5
|
|
23
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
163
|
|
7
|
5
|
|
|
5
|
|
2889
|
use Type::Library -base; |
|
5
|
|
|
|
|
178813
|
|
|
5
|
|
|
|
|
72
|
|
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
5226
|
use Type::Utils -all; |
|
5
|
|
|
|
|
48992
|
|
|
5
|
|
|
|
|
57
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# this gets us compile and compile_named |
12
|
5
|
|
|
5
|
|
15449
|
use Type::Params; |
|
5
|
|
|
|
|
405939
|
|
|
5
|
|
|
|
|
61
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our @EXPORT_OK; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
BEGIN { |
19
|
5
|
|
|
5
|
|
2675
|
extends qw( |
20
|
|
|
|
|
|
|
Types::Standard |
21
|
|
|
|
|
|
|
Types::Common::Numeric |
22
|
|
|
|
|
|
|
Types::Common::String |
23
|
|
|
|
|
|
|
); |
24
|
5
|
|
|
|
|
576415
|
push @EXPORT_OK => ( |
25
|
|
|
|
|
|
|
'compile', # from Type::Params |
26
|
|
|
|
|
|
|
'compile_named', # from Type::Params |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
CodeGen::Protection::Types - Keep our type tools orgnanized |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 0.04 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
package CodeGen::Protection::Type::Foo; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
use CodeGen::Protection::Types qw( |
51
|
|
|
|
|
|
|
ArrayRef |
52
|
|
|
|
|
|
|
Dict |
53
|
|
|
|
|
|
|
Enum |
54
|
|
|
|
|
|
|
HashRef |
55
|
|
|
|
|
|
|
InstanceOf |
56
|
|
|
|
|
|
|
Str |
57
|
|
|
|
|
|
|
compile |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This is an internal package for L<CodeGen::Protection>. It's probably |
63
|
|
|
|
|
|
|
overkill, but if we want to be more strict later, this gives us the basics. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 TYPE LIBRARIES |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
We automatically include the types from the following: |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * L<Types::Standard> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * L<Types::Common::Numeric> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item * L<Types::Common::String> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=back |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 EXTRAS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The following extra functions are exported on demand or if use the C<:all> export tag. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=over |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item * C<compile> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
See L<Type::Params> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * C<compile_named> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
See L<Type::Params> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * C<slurpy> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
See L<Types::Standard> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=back |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 AUTHOR |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Curtis "Ovid" Poe <ovid@allaroundtheworld.fr> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Curtis "Ovid" Poe. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
108
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |