summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/LazyAttributeNeedsADefault.pm
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
commit5ac2026f7eed78958d69d051e7a8e993dcf51205 (patch)
tree298c3d2f08bdfe5689998b11892d72a897985be1 /lib/Moose/Exception/LazyAttributeNeedsADefault.pm
downloadMoose-tarball-5ac2026f7eed78958d69d051e7a8e993dcf51205.tar.gz
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;