summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm')
-rw-r--r--lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm b/lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm
new file mode 100644
index 0000000..6e96c80
--- /dev/null
+++ b/lib/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm
@@ -0,0 +1,19 @@
+package Moose::Exception::DelegationToAClassWhichIsNotLoaded;
+our $VERSION = '2.1405';
+
+use Moose;
+extends 'Moose::Exception';
+with 'Moose::Exception::Role::Attribute';
+
+has 'class_name' => (
+ is => 'ro',
+ isa => 'Str',
+ required => 1,
+);
+
+sub _build_message {
+ my $self = shift;
+ "The ".$self->attribute->name." attribute is trying to delegate to a class which has not been loaded - ".$self->class_name;
+}
+
+1;