diff options
Diffstat (limited to 'lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm')
-rw-r--r-- | lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm b/lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm new file mode 100644 index 0000000..a4c06bb --- /dev/null +++ b/lib/Moose/Exception/ClassDoesNotHaveInitMeta.pm @@ -0,0 +1,21 @@ +package Moose::Exception::ClassDoesNotHaveInitMeta; +our $VERSION = '2.1405'; + +use Moose; +extends 'Moose::Exception'; +with 'Moose::Exception::Role::Class'; + +has 'traits' => ( + is => 'ro', + isa => 'ArrayRef', + required => 1 +); + +sub _build_message { + my $self = shift; + my $class = $self->class_name; + + return "Cannot provide traits when $class does not have an init_meta() method"; +} + +1; |