File Coverage

blib/lib/Data/Sah/Compiler/human/TH/date.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 0 2 0.0
total 25 27 92.5


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