X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FAttribute.pm;fp=lib%2FMouse%2FAttribute.pm;h=de19f3c42ea304a857461f959830ec5012784bb9;hp=b5dfb1d109be8cef772d8ab91520bd7bcccbc522;hb=4eb1339a32ef811a7f9a8045261113588565162b;hpb=398327c34d5f6a94084b1dd6f7b439b771ef8b1b diff --git a/lib/Mouse/Attribute.pm b/lib/Mouse/Attribute.pm index b5dfb1d..de19f3c 100644 --- a/lib/Mouse/Attribute.pm +++ b/lib/Mouse/Attribute.pm @@ -140,7 +140,7 @@ sub generate_handles { sub create { my ($self, $class, $name, %args) = @_; - confess "You must specify a default for lazy attribute '$name'" + confess "You cannot have lazy attribute ($name) without specifying a default value for it" if $args{lazy} && !exists($args{default}) && !exists($args{builder}); confess "Trigger is not allowed on read-only attribute '$name'"