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