File Coverage

blib/lib/Moose/Exception/MethodExpectsMoreArgs.pm
Criterion Covered Total %
statement 5 5 100.0
branch 2 2 100.0
condition n/a
subroutine 2 2 100.0
pod n/a
total 9 9 100.0


line stmt bran cond sub pod time code
1             package Moose::Exception::MethodExpectsMoreArgs;
2             our $VERSION = '2.2206';
3              
4 5     5   21270 use Moose;
  5         15  
  5         43  
5             extends 'Moose::Exception';
6              
7             has 'method_name' => (
8             is => 'ro',
9             isa => 'Str',
10             required => 1
11             );
12              
13             has 'minimum_args' => (
14             is => 'ro',
15             isa => 'Int',
16             required => 1
17             );
18              
19             sub _build_message {
20 148     148   350 my $self = shift;
21 148 100       5019 "Cannot call ".$self->method_name." without at least ".$self->minimum_args." argument".($self->minimum_args == 1 ? '' : 's');
22             }
23              
24             __PACKAGE__->meta->make_immutable;
25             1;