| 1 | package Data::Sah::Compiler::human::TH::obj; | ||
| 2 | |||
| 3 | 3 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | #use Log::Any '$log'; | ||
| 7 | |||
| 8 | 3 | ▶ | use Mo qw(build default); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 3 | ▶ | use Role::Tiny::With; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 3 | extends 'Data::Sah::Compiler::human::TH'; | |
| 12 | 3 | with 'Data::Sah::Type::obj'; | |
| 13 | |||
| 14 | 3 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 15 | 3 | our $DATE = '2024-02-16'; # DATE | |
| 16 | 3 | our $DIST = 'Data-Sah'; # DIST | |
| 17 | 3 | our $VERSION = '0.917'; # VERSION | |
| 18 | |||
| 19 | 17 | ▶ | sub name { "object" } |
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 20 | |||
| 21 | 17 | ▶ | sub handle_type { |
|
Subroutine
handle_type: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 22 | 17 | my ($self, $cd) = @_; | |
| 23 | 17 | my $c = $self->compiler; | |
| 24 | |||
| 25 | 17 | $c->add_ccl($cd, { | |
| 26 | fmt => ["object", "objects"], | ||
| 27 | type => 'noun', | ||
| 28 | }); | ||
| 29 | } | ||
| 30 | |||
| 31 | 7 | ▶ | sub clause_can { |
|
Subroutine
clause_can: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 32 | 7 | my ($self, $cd) = @_; | |
| 33 | 7 | my $c = $self->compiler; | |
| 34 | 7 | my $cv = $cd->{cl_value}; | |
| 35 | |||
| 36 | 7 | $c->add_ccl($cd, { | |
| 37 | fmt => q[%(modal_verb)s have method(s) %s], | ||
| 38 | #expr => 1, # weird | ||
| 39 | }); | ||
| 40 | } | ||
| 41 | |||
| 42 | 6 | ▶ | sub clause_isa { |
|
Subroutine
clause_isa: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 43 | 6 | my ($self, $cd) = @_; | |
| 44 | 6 | my $c = $self->compiler; | |
| 45 | 6 | my $cv = $cd->{cl_value}; | |
| 46 | |||
| 47 | 6 | $c->add_ccl($cd, { | |
| 48 | fmt => q[%(modal_verb)s be subclass of %s], | ||
| 49 | }); | ||
| 50 | } | ||
| 51 | |||
| 52 | 3 | 1; | |
| 53 | # ABSTRACT: perl's type handler for type "obj" | ||
| 54 | |||
| 55 | __END__ | ||