« blib/lib/Moose/Exception/EnumValuesMustBeString.pm
↑ Summary
blib/lib/Moose/Exception/OverrideConflictInComposition.pm »
| 1 | package Moose::Exception::MethodExpectsMoreArgs; | ||||||||||
| 2 | 5 | our $VERSION = '2.4001'; | |||||||||
| 3 | |||||||||||
| 4 | 5 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | extends 'Moose::Exception'; | |||||||||
| 6 | |||||||||||
| 7 | 5 | has 'method_name' => ( | |||||||||
| 8 | is => 'ro', | ||||||||||
| 9 | isa => 'Str', | ||||||||||
| 10 | required => 1 | ||||||||||
| 11 | ); | ||||||||||
| 12 | |||||||||||
| 13 | 5 | has 'minimum_args' => ( | |||||||||
| 14 | is => 'ro', | ||||||||||
| 15 | isa => 'Int', | ||||||||||
| 16 | required => 1 | ||||||||||
| 17 | ); | ||||||||||
| 18 | |||||||||||
| 19 | 148 | ▶ | sub _build_message { | ||||||||
|
Subroutine
_build_message: called CC=2 SCAR=6.9
| |||||||||||
| 20 | 148 | my $self = shift; | |||||||||
| 21 | 148 | ▶ | "Cannot call ".$self->method_name." without at least ".$self->minimum_args." argument".($self->minimum_args == 1 ? '' : 's'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 5 | __PACKAGE__->meta->make_immutable; | |||||||||
| 25 | 5 | 1; | |||||||||