summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/AttributeNamesDoNotMatch.pm
blob: 4510eedfa6d0c1ab060e9929af382f0fe38627ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package Moose::Exception::AttributeNamesDoNotMatch;
our $VERSION = '2.1405';

use Moose;
extends 'Moose::Exception';

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

has attribute => (
    is       => 'ro',
    isa      => 'Class::MOP::Attribute',
    required => 1,
);

sub _build_message {
    my $self = shift;
    "attribute_name (".$self-> attribute_name.") does not match attribute->name (".$self->attribute->name.")";
}

1;