summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/CallingMethodOnAnImmutableInstance.pm
blob: 6ac2d37c9c7de46902756dc8271bcad160ca07b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package Moose::Exception::CallingMethodOnAnImmutableInstance;
our $VERSION = '2.1405';

use Moose;
extends 'Moose::Exception';

has 'method_name' => (
    is       => 'ro',
    isa      => 'Str',
    required => 1
);

sub _build_message {
    my $self = shift;
    "The '".$self->method_name."' method cannot be called on an immutable instance";
}

1;