line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
8
|
|
|
8
|
|
3033
|
|
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
234
|
|
4
|
|
|
|
|
|
|
use Data::Sah::Util::Role 'has_clause', 'has_clause_alias'; |
5
|
8
|
|
|
8
|
|
1865
|
use Role::Tiny; |
|
8
|
|
|
|
|
190
|
|
|
8
|
|
|
|
|
402
|
|
6
|
8
|
|
|
8
|
|
68
|
use Role::Tiny::With; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
72
|
|
7
|
8
|
|
|
8
|
|
966
|
|
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
1285
|
|
8
|
|
|
|
|
|
|
with 'Data::Sah::Type::BaseType'; |
9
|
|
|
|
|
|
|
with 'Data::Sah::Type::Comparable'; |
10
|
|
|
|
|
|
|
with 'Data::Sah::Type::HasElems'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has_clause 'elems', |
13
|
|
|
|
|
|
|
v => 2, |
14
|
|
|
|
|
|
|
tags => ['constraint'], |
15
|
|
|
|
|
|
|
schema => ['array' => {req=>1, of=>['sah::schema', {req=>1}, {}]}], |
16
|
|
|
|
|
|
|
inspect_elem => 1, |
17
|
|
|
|
|
|
|
allow_expr => 0, |
18
|
|
|
|
|
|
|
subschema => sub { @{ $_[0] } }, |
19
|
|
|
|
|
|
|
attrs => { |
20
|
|
|
|
|
|
|
create_default => { |
21
|
|
|
|
|
|
|
schema => [bool => {default=>1}], |
22
|
|
|
|
|
|
|
allow_expr => 0, # TODO |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
; |
26
|
|
|
|
|
|
|
has_clause_alias each_elem => 'of'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
29
|
|
|
|
|
|
|
our $DATE = '2022-08-20'; # DATE |
30
|
|
|
|
|
|
|
our $DIST = 'Data-Sah'; # DIST |
31
|
|
|
|
|
|
|
our $VERSION = '0.912'; # VERSION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
# ABSTRACT: array type |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Data::Sah::Type::array - array type |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This document describes version 0.912 of Data::Sah::Type::array (from Perl distribution Data-Sah), released on 2022-08-20. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=for Pod::Coverage ^(clause_.+|clausemeta_.+)$ |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 HOMEPAGE |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Please visit the project's homepage at L<https://metacpan.org/release/Data-Sah>. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SOURCE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Source repository is at L<https://github.com/perlancar/perl-Data-Sah>. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
perlancar <perlancar@cpan.org> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 CONTRIBUTING |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
To contribute, you can send patches by email/via RT, or send pull requests on |
67
|
|
|
|
|
|
|
GitHub. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Most of the time, you don't need to build the distribution yourself. You can |
70
|
|
|
|
|
|
|
simply modify the code, then test via: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
% prove -l |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
If you want to build the distribution (e.g. to try to install it locally on your |
75
|
|
|
|
|
|
|
system), you can install L<Dist::Zilla>, |
76
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, |
77
|
|
|
|
|
|
|
L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other |
78
|
|
|
|
|
|
|
Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond |
79
|
|
|
|
|
|
|
that are considered a bug and can be reported to me. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This software is copyright (c) 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012 by perlancar <perlancar@cpan.org>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
86
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 BUGS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
93
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
94
|
|
|
|
|
|
|
feature. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |