| 1 | package Data::Sah::Compiler::human::TH::Comparable; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 36 | ▶ | use 5.010; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 36 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 36 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | #use Log::Any '$log'; | ||||||||||||||
| 7 | |||||||||||||||
| 8 | 36 | ▶ | use Mo qw(build default); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 9 | 36 | ▶ | use Role::Tiny; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 10 | 36 | ▶ | use Role::Tiny::With; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | |||||||||||||||
| 12 | 36 | with 'Data::Sah::Type::Comparable'; | |||||||||||||
| 13 | |||||||||||||||
| 14 | 36 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||||||
| 15 | 36 | our $DATE = '2024-02-16'; # DATE | |||||||||||||
| 16 | 36 | our $DIST = 'Data-Sah'; # DIST | |||||||||||||
| 17 | 36 | our $VERSION = '0.917'; # VERSION | |||||||||||||
| 18 | |||||||||||||||
| 19 | 1753 | ▶ | sub superclause_comparable { | ||||||||||||
|
Subroutine
superclause_comparable: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||
| 20 | 1753 | my ($self, $which, $cd) = @_; | |||||||||||||
| 21 | 1753 | my $c = $self->compiler; | |||||||||||||
| 22 | |||||||||||||||
| 23 | 1753 | my $fmt; | |||||||||||||
| 24 | 1753 | ▶ | if ($which eq 'is') { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 25 | 909 | $c->add_ccl($cd, {expr=>1, multi=>1, | |||||||||||||
| 26 | fmt => '%(modal_verb)s have the value %s'}); | ||||||||||||||
| 27 | } elsif ($which eq 'in') { | ||||||||||||||
| 28 | 844 | $c->add_ccl($cd, {expr=>1, multi=>1, | |||||||||||||
| 29 | fmt => '%(modal_verb)s be one of %s'}); | ||||||||||||||
| 30 | } | ||||||||||||||
| 31 | } | ||||||||||||||
| 32 | 36 | 1; | |||||||||||||
| 33 | # ABSTRACT: human's type handler for role "Comparable" | ||||||||||||||
| 34 | |||||||||||||||
| 35 | __END__ | ||||||||||||||