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