line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Types::Common; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
209140
|
use 5.008001; |
|
15
|
|
|
|
|
87
|
|
4
|
15
|
|
|
15
|
|
77
|
use strict; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
322
|
|
5
|
15
|
|
|
15
|
|
72
|
use warnings; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
1087
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
15
|
|
|
15
|
|
50
|
eval { require re }; |
|
15
|
|
|
|
|
94
|
|
9
|
15
|
50
|
|
|
|
605
|
if ( $] < 5.010 ) { require Devel::TypeTiny::Perl58Compat } |
|
0
|
|
|
|
|
0
|
|
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
BEGIN { |
13
|
15
|
|
|
15
|
|
49
|
$Types::Common::AUTHORITY = 'cpan:TOBYINK'; |
14
|
15
|
|
|
|
|
983
|
$Types::Common::VERSION = '2.003_000'; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our ( @EXPORT, @EXPORT_OK, %EXPORT_TAGS ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use Type::Library |
20
|
15
|
|
|
|
|
169
|
-extends => [ qw( |
21
|
|
|
|
|
|
|
Types::Standard |
22
|
|
|
|
|
|
|
Types::Common::Numeric |
23
|
|
|
|
|
|
|
Types::Common::String |
24
|
|
|
|
|
|
|
Types::TypeTiny |
25
|
15
|
|
|
15
|
|
6977
|
) ]; |
|
15
|
|
|
|
|
40
|
|
26
|
|
|
|
|
|
|
|
27
|
15
|
|
|
15
|
|
9980
|
use Type::Params -sigs; |
|
15
|
|
|
|
|
43
|
|
|
15
|
|
|
|
|
166
|
|
28
|
|
|
|
|
|
|
$EXPORT_TAGS{sigs} = $Type::Params::EXPORT_TAGS{sigs}; |
29
|
|
|
|
|
|
|
push @EXPORT_OK, @{ $EXPORT_TAGS{sigs} }; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _generate_t { |
32
|
2
|
|
|
2
|
|
69
|
my $package = shift; |
33
|
2
|
|
|
|
|
1077
|
require Type::Registry; |
34
|
2
|
|
|
|
|
14
|
my $t = 'Type::Registry'->_generate_t( @_ ); |
35
|
2
|
|
|
|
|
8
|
$t->()->add_types( $package ); |
36
|
2
|
|
|
|
|
16
|
return $t; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
push @EXPORT_OK, 't'; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=pod |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=encoding utf-8 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=for stopwords arrayfication hashification |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Types::Common - the one stop shop |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 STATUS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This module is covered by the |
57
|
|
|
|
|
|
|
L<Type-Tiny stability policy|Type::Tiny::Manual::Policies/"STABILITY">. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 DESCRIPTION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Types::Common doesn't provide any types or functions of its own. |
62
|
|
|
|
|
|
|
Instead it's a single module that re-exports: |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=over |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item * |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
All the types from L<Types::Standard>. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item * |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
All the types from L<Types::Common::Numeric> and L<Types::Common::String>. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
All the types from L<Types::TypeTiny>. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The C<< -sigs >> tag from L<Type::Params>. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
The C<< t() >> function from L<Type::Registry>. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
If you import C<< t() >>, it will also be preloaded with all the type |
89
|
|
|
|
|
|
|
constraints offered by Types::Common. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 EXPORT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
C<< use Types::Common qw( -types -sigs t ) >> might be a sensible place |
94
|
|
|
|
|
|
|
to start. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
C<< use Types::Common -all >> gives you everything. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
If you have Perl 5.37.2+, then C<< use Types::Common qw( -lexical -all ) >> |
99
|
|
|
|
|
|
|
won't pollute your namespace. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 BUGS |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Please report any bugs to |
104
|
|
|
|
|
|
|
L<https://github.com/tobyink/p5-type-tiny/issues>. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 SEE ALSO |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L<Types::Standard>, |
109
|
|
|
|
|
|
|
L<Types::Common::Numeric>, |
110
|
|
|
|
|
|
|
L<Types::Common::String>; |
111
|
|
|
|
|
|
|
L<Type::Params>; |
112
|
|
|
|
|
|
|
L<Type::Registry>. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 AUTHOR |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Toby Inkster E<lt>tobyink@cpan.orgE<gt>. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This software is copyright (c) 2022-2023 by Toby Inkster. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
123
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
128
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
129
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |