typo fix
[gitmo/Moo.git] / lib / Moo.pm
index 2e9ff7a..0ee8274 100644 (file)
@@ -5,7 +5,7 @@ use Moo::_Utils;
 use B 'perlstring';
 use Sub::Defer ();
 
-our $VERSION = '1.000008'; # 1.0.8
+our $VERSION = '1.001000'; # 1.1.0
 $VERSION = eval $VERSION;
 
 require Moo::sification;
@@ -188,7 +188,7 @@ sub _constructor_maker_for {
 
 =head1 NAME
 
-Moo - Minimalist Object Orientation (with Moose compatiblity)
+Moo - Minimalist Object Orientation (with Moose compatibility)
 
 =head1 SYNOPSIS
 
@@ -281,6 +281,10 @@ metaclasses for your L<Moo> and L<Moo::Role> packages, so you should be able
 to use them in L<Moose> code without anybody ever noticing you aren't using
 L<Moose> everywhere.
 
+L<Moo> will also create L<Moose type constraints|Moose::Manual::Types> for
+classes and roles, so that C<< isa => 'MyClass' >> and C<< isa => 'MyRole' >>
+work the same as for L<Moose> classes and roles.
+
 Extending a L<Moose> class or consuming a L<Moose::Role> will also work.
 
 So will extending a L<Mouse> class or consuming a L<Mouse::Role> - but note
@@ -467,6 +471,9 @@ one should do
    die "$_[0] is not a number!" unless looks_like_number $_[0]
  },
 
+Note that the return value is ignored, only whether the sub lives or
+dies matters.
+
 L<Sub::Quote aware|/SUB QUOTE AWARE>
 
 Since L<Moo> does B<not> run the C<isa> check before C<coerce> if a coercion
@@ -548,6 +555,10 @@ to populate an attribute if no value is supplied to the constructor - or
 if the attribute is lazy, when the attribute is first retrieved if no
 value has yet been provided.
 
+If a simple scalar is provided, it will be inlined as a string. Any non-code
+reference (hash, array) will result in an error - for that case instead use
+a code reference that returns the desired value.
+
 Note that if your default is fired during new() there is no guarantee that
 other attributes have been populated yet so you should not rely on their
 existence.
@@ -560,7 +571,7 @@ Takes a method name which will return true if an attribute has a value.
 
 If you set this to just C<1>, the predicate is automatically named
 C<has_${attr_name}> if your attribute's name does not start with an
-underscore, or <_has_${attr_name_without_the_underscore}> if it does.
+underscore, or C<_has_${attr_name_without_the_underscore}> if it does.
 This feature comes from L<MooseX::AttributeShortcuts>.
 
 =item * C<builder>
@@ -704,7 +715,7 @@ API will encourage the use of other type systems as well, since it's
 probably the weakest part of Moose design-wise.
 
 C<initializer> is not supported in core since the author considers it to be a
-bad idea but may be supported by an extension in future. Meanwhile C<trigger> or
+bad idea and Moose best practices recommend avoiding it. Meanwhile C<trigger> or
 C<coerce> are more likely to be able to fulfill your needs.
 
 There is no meta object.  If you need this level of complexity you wanted
@@ -735,13 +746,15 @@ The C<dump> method is not provided by default. The author suggests loading
 L<Devel::Dwarn> into C<main::> (via C<perl -MDevel::Dwarn ...> for example) and
 using C<$obj-E<gt>$::Dwarn()> instead.
 
-L</default> only supports coderefs, because doing otherwise is usually a
-mistake anyway.
+L</default> only supports coderefs and plain scalars, because passing a hash
+or array reference as a default is almost always incorrect since the value is
+then shared between all objects using that default.
 
 C<lazy_build> is not supported; you are instead encouraged to use the
 C<< is => 'lazy' >> option supported by L<Moo> and L<MooseX::AttributeShortcuts>.
 
-C<auto_deref> is not supported since the author considers it a bad idea.
+C<auto_deref> is not supported since the author considers it a bad idea and
+it has been considered best practice to avoid it for some time.
 
 C<documentation> will show up in a L<Moose> metaclass created from your class
 but is otherwise ignored. Then again, L<Moose> ignores it as well, so this
@@ -787,7 +800,7 @@ Finally, Moose requires you to call
 
 at the end of your class to get an inlined (i.e. not horribly slow)
 constructor. Moo does it automatically the first time ->new is called
-on your class.
+on your class. (C<make_immutable> is a no-op in Moo to ease migration.)
 
 An extension L<MooX::late> exists to ease translating Moose packages
 to Moo by providing a more Moose-like interface.