summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/LazyAttributeNeedsADefault.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Moose/Exception/LazyAttributeNeedsADefault.pm')
-rw-r--r--lib/Moose/Exception/LazyAttributeNeedsADefault.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Moose/Exception/LazyAttributeNeedsADefault.pm b/lib/Moose/Exception/LazyAttributeNeedsADefault.pm
new file mode 100644
index 0000000..0ba36fa
--- /dev/null
+++ b/lib/Moose/Exception/LazyAttributeNeedsADefault.pm
@@ -0,0 +1,13 @@
+package Moose::Exception::LazyAttributeNeedsADefault;
+our $VERSION = '2.1405';
+
+use Moose;
+extends 'Moose::Exception';
+with 'Moose::Exception::Role::EitherAttributeOrAttributeName';
+
+sub _build_message {
+ my $self = shift;
+ "You cannot have a lazy attribute (".$self->attribute_name.") without specifying a default value for it";
+}
+
+1;