Jmespath/ArityException.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.8
CC
2
Cov
0%
_pluralize
6.0
to_string
2.0
BEGIN
2.0
CRAP 3.6
1 package Jmespath::ArityException;
2 use Moose;
3 with 'Throwable';
4  
5 has expected_arity => ( is => 'ro' );
6 has actual_arity => ( is => 'ro' );
7 has function_name => ( is => 'ro' );
8 has expression => ( is => 'ro' );
9  
10 sub to_string {
11 my ( $self ) = @_;
12 return 'Expected ' . $self->expected_arity . ' ' . $self->pluralize('argument', $self->{expected_arity} ). ' for function ' . $self->{ function_name } . '(), received ' . $self->{ actual_arity };
13  
14 }
15  
16 sub _pluralize {
17 my ( $self, $word, $count ) = @_;
18 if ( $count == 1 ) {
19 return $word;
20 }
21 else {
22 return $word . 's';
23 }
24 }
25  
26 no Moose;
27 1;