« blib/lib/Moose/Exception/CanOnlyWrapBlessedCode.pm
↑ Summary
blib/lib/Moose/Exception/CanReblessOnlyIntoASuperclass.pm »
| 1 | package Moose::Exception::CanReblessOnlyIntoASubclass; | ||
| 2 | 2 | our $VERSION = '2.4001'; | |
| 3 | |||
| 4 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | extends 'Moose::Exception'; | |
| 6 | 2 | with 'Moose::Exception::Role::ParamsHash', 'Moose::Exception::Role::Class', 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::InstanceClass'; | |
| 7 | |||
| 8 | 3 | ▶ | sub _build_message { |
|
Subroutine
_build_message: called CC=1 SCAR=0.0
| |||
| 9 | 3 | my $self = shift; | |
| 10 | 3 | my $instance_class = $self->instance_class; | |
| 11 | 3 | "You may rebless only into a subclass of ($instance_class), of which (". $self->class_name .") isn't." | |
| 12 | } | ||
| 13 | |||
| 14 | 2 | __PACKAGE__->meta->make_immutable; | |
| 15 | 2 | 1; | |