diff options
Diffstat (limited to 'lib/Moose/Exception/CannotOverrideALocalMethod.pm')
-rw-r--r-- | lib/Moose/Exception/CannotOverrideALocalMethod.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Moose/Exception/CannotOverrideALocalMethod.pm b/lib/Moose/Exception/CannotOverrideALocalMethod.pm new file mode 100644 index 0000000..0730185 --- /dev/null +++ b/lib/Moose/Exception/CannotOverrideALocalMethod.pm @@ -0,0 +1,19 @@ +package Moose::Exception::CannotOverrideALocalMethod; +our $VERSION = '2.1405'; + +use Moose; +extends 'Moose::Exception'; +with 'Moose::Exception::Role::Role'; + +has 'method_name' => ( + is => 'ro', + isa => 'Str', + required => 1, +); + +sub _build_message { + my $self = shift; + "Cannot add an override of method '".$self->method_name."' because there is a local version of '".$self->method_name."'"; +} + +1; |