« blib/lib/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm
↑ Summary
blib/lib/Moose/Exception/InitMetaRequiresClass.pm »
| 1 | package Moose::Exception::IncompatibleMetaclassOfSuperclass; | ||
| 2 | 3 | our $VERSION = '2.4001'; | |
| 3 | |||
| 4 | 3 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | extends 'Moose::Exception'; | |
| 6 | 3 | with 'Moose::Exception::Role::Class'; | |
| 7 | |||
| 8 | 3 | has [qw/superclass_name superclass_meta_type class_meta_type/] => ( | |
| 9 | is => 'ro', | ||
| 10 | isa => 'Str', | ||
| 11 | required => 1, | ||
| 12 | ); | ||
| 13 | |||
| 14 | 6 | ▶ | sub _build_message { |
|
Subroutine
_build_message: called CC=1 SCAR=0.0
| |||
| 15 | 6 | my $self = shift; | |
| 16 | 6 | my $class_name = $self->class_name; | |
| 17 | 6 | my $class_meta_type = $self->class_meta_type; | |
| 18 | 6 | my $superclass_name = $self->superclass_name; | |
| 19 | 6 | my $supermeta_type = $self->superclass_meta_type; | |
| 20 | |||
| 21 | 6 | return "The metaclass of $class_name ($class_meta_type)" . | |
| 22 | " is not compatible with the metaclass of its superclass, " . | ||
| 23 | "$superclass_name ($supermeta_type)"; | ||
| 24 | } | ||
| 25 | |||
| 26 | 3 | __PACKAGE__->meta->make_immutable; | |
| 27 | 3 | 1; | |