line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Exception::MethodExpectsFewerArgs; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
13734
|
use Moose; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
56
|
|
5
|
|
|
|
|
|
|
extends 'Moose::Exception'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'method_name' => ( |
8
|
|
|
|
|
|
|
is => 'ro', |
9
|
|
|
|
|
|
|
isa => 'Str', |
10
|
|
|
|
|
|
|
required => 1, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has 'maximum_args' => ( |
14
|
|
|
|
|
|
|
is => 'ro', |
15
|
|
|
|
|
|
|
isa => 'Int', |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _build_message { |
20
|
649
|
|
|
649
|
|
1206
|
my $self = shift; |
21
|
649
|
|
|
|
|
21565
|
my $max = $self->maximum_args; |
22
|
649
|
100
|
|
|
|
20360
|
"Cannot call ".$self->method_name." with ". |
|
|
100
|
|
|
|
|
|
23
|
|
|
|
|
|
|
( $max ? "more than $max" : 'any'). " argument".( $max == 1 ? '' : 's' ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
27
|
|
|
|
|
|
|
1; |