summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/CallingReadOnlyMethodOnAnImmutableInstance.pm
blob: e8809352a8ab79f38bfe8c8512e5c8c501dd5575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance;
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 is read-only when called on an immutable instance";
}

1;