throw an error on invalid builder names as well (RT#78479)
[gitmo/Moo.git] / lib / Moo.pm
index 35f72b5..43f826d 100644 (file)
@@ -5,7 +5,7 @@ use Moo::_Utils;
 use B 'perlstring';
 use Sub::Defer ();
 
-our $VERSION = '1.000000'; # 1.0.0
+our $VERSION = '1.000001'; # 1.0.1
 $VERSION = eval $VERSION;
 
 require Moo::sification;
@@ -629,7 +629,8 @@ To do this, you can write
   use Sub::Quote;
 
   has foo => (
-    is => quote_sub(q{ die "Not <3" unless $_[0] < 3 })
+    is => 'ro',
+    isa => quote_sub(q{ die "Not <3" unless $_[0] < 3 })
   );
 
 which will be inlined as
@@ -642,7 +643,8 @@ which will be inlined as
 or to avoid localizing @_,
 
   has foo => (
-    is => quote_sub(q{ my ($val) = @_; die "Not <3" unless $val < 3 })
+    is => 'ro',
+    isa => quote_sub(q{ my ($val) = @_; die "Not <3" unless $val < 3 })
   );
 
 which will be inlined as