File Coverage

blib/lib/Data/Sah/Compiler/human/TH/obj.pm
Criterion Covered Total %
statement 26 26 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 0 4 0.0
total 35 39 89.7


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