Fix pod spelling nit
[gitmo/Moose.git] / lib / Moose / Manual / Delta.pod
index 78b06d2..72e21ab 100644 (file)
@@ -16,26 +16,191 @@ feature.  If you encounter a problem and have a solution but don't see
 it documented here, or think we missed an important feature, please
 send us a patch.
 
-=head1 Version 0.76
+=head1 0.93
+
+=over 4
+
+=item Calling $object->new() is no longer deprecated
+
+We decided to undeprecate this. Now it just works.
+
+=back
+
+=head1 0.90
+
+=over 4
+
+=item Added Native delegation for Code refs
+
+See L<Moose::Meta::Attribute::Native::Trait::Code> for details.
+
+=item Calling $object->new() is deprecated
+
+Moose has long supported this, but it's never really been documented, and we
+don't think this is a good practice. If you want to construct an object from
+an existing object, you should provide some sort of alternate constructor like
+C<< $object->clone >>.
+
+Calling C<< $object->new >> now issues a warning, and will be an error in a
+future release.
+
+=item Moose no longer warns if you call C<make_immutable> for a class with mutable ancestors
+
+While in theory this is a good thing to warn about, we found so many
+exceptions to this that doing this properly became quite problematic.
+
+=back
+
+=head1 Version 0.89_02
+
+=over 4
+
+=item New Native delegation methods from L<List::Util> and L<List::MoreUtils>
+
+In particular, we now have C<reduce>, C<shuffle>, C<uniq>, and C<natatime>.
+
+=item The Moose::Exporter with_caller feature is now deprecated
+
+Use C<with_meta> instead. The C<with_caller> option will start warning in a
+future release.
+
+=item Moose now warns if you call C<make_immutable> for a class with mutable ancestors
+
+This is dangerous because modifying a class after a subclass has been
+immutabilized will lead to incorrect results in the subclass, due to inlining,
+caching, etc. This occasionally happens accidentally, when a class loads one
+of its subclasses in the middle of its class definition, so pointing out that
+this may cause issues should be helpful. Metaclasses (classes that inherit
+from L<Class::MOP::Object>) are currently exempt from this check, since at the
+moment we aren't very consistent about which metaclasses we immutabilize.
+
+=item C<enum> and C<duck_type> now take arrayrefs for all forms
+
+Previously, calling these functions with a list would take the first element of
+the list as the type constraint name, and use the remainder as the enum values
+or method names. This makes the interface inconsistent with the anon-type forms
+of these functions (which must take an arrayref), and a free-form list where
+the first value is sometimes special is hard to validate (and harder to give
+reasonable error messages for). These functions have been changed to take
+arrayrefs in all their forms - so, C<< enum 'My::Type' => [qw(foo bar)] >> is
+now the preferred way to create an enum type constraint. The old syntax still
+works for now, but it will hopefully be deprecated and removed in a future
+release.
+
+=back
+
+=head1 Version 0.89_01
+
+L<Moose::Meta::Attribute::Native> has been moved into the Moose core from
+L<MooseX::AttributeHelpers>.  Major changes include:
+
+=over 4
+
+=item C<traits>, not C<metaclass>
 
-L<Moose> now warns about a class overriding methods from roles it
-consumes. This warning is useful for discovering I<accidental> name
-collisions, which is part of why using roles is much less painful than
-multiple inheritance. You can silence this warning by explicitly
-excluding methods you override from roles. For example,
+Method providers are only available via traits.
 
-    package Role;
-    sub foo { "Default role implementation" }
+=item C<handles>, not C<provides> or C<curries>
 
-    package Class;
-    with 'Role' => { excludes => 'foo' };
-    sub foo { "Overriding class implementation" }
+The C<provides> syntax was like core Moose C<< handles => HASHREF >>
+syntax, but with the keys and values reversed.  This was confusing,
+and AttributeHelpers now uses C<< handles => HASHREF >> in a way that
+should be intuitive to anyone already familiar with how it is used for
+other attributes.
+
+The C<curries> functionality provided by AttributeHelpers has been
+generalized to apply to all cases of C<< handles => HASHREF >>, though
+not every piece of functionality has been ported (currying with a
+CODEREF is not supported).
+
+=item C<empty> is now C<is_empty>, and means empty, not non-empty
+
+Previously, the C<empty> method provided by Arrays and Hashes returned true if
+the attribute was B<not> empty (no elements).  Now it returns true if the
+attribute B<is> empty. It was also renamed to C<is_empty>, to reflect this.
+
+=item C<find> was renamed to C<first>, and C<first> and C<last> were removed
+
+L<List::Util> refers to the functionality that we used to provide under C<find>
+as L<first|List::Util/first>, so that will likely be more familiar (and will
+fit in better if we decide to add more List::Util functions). C<first> and
+C<last> were removed, since their functionality is easily duplicated with
+curries of C<get>.
+
+=item Helpers that take a coderef of one argument now use C<$_>
+
+Subroutines passed as the first argument to C<first>, C<map>, and C<grep> now
+receive their argument in C<$_> rather than as a parameter to the subroutine.
+Helpers that take a coderef of two or more arguments remain using the argument
+list (there are technical limitations to using C<$a> and C<$b> like C<sort>
+does).
+
+See L<Moose::Meta::Attribute::Native> for the new documentation.
+
+=back
+
+The C<alias> and C<excludes> role parameters have been renamed to C<-alias>
+and C<-excludes>. The old names still work, but new code should use the new
+names, and eventually the old ones will be deprecated and removed.
+
+=head1 Version 0.89
+
+C<< use Moose -metaclass => 'Foo' >> now does alias resolution, just like
+C<-traits> (and the C<metaclass> and C<traits> options to C<has>).
+
+Added two functions C<meta_class_alias> and C<meta_attribute_alias> to
+L<Moose::Util>, to simplify aliasing metaclasses and metatraits. This is
+a wrapper around the old
+
+  package Moose::Meta::Class::Custom::Trait::FooTrait;
+  sub register_implementation { 'My::Meta::Trait' }
+
+way of doing this.
+
+=head1 Version 0.84
+
+When an attribute generates I<no> accessors, we now warn. This is to help
+users who forget the C<is> option. If you really do not want any accessors,
+you can use C<< is => 'bare' >>. You can maintain back compat with older
+versions of Moose by using something like:
+
+    ($Moose::VERSION >= 0.84 ? is => 'bare' : ())
+
+When an accessor overwrites an existing method, we now warn. To work around
+this warning (if you really must have this behavior), you can explicitly
+remove the method before creating it as an accessor:
+
+    sub foo {}
+
+    __PACKAGE__->meta->remove_method('foo');
+
+    has foo => (
+        is => 'ro',
+    );
+
+When an unknown option is passed to C<has>, we now warn. You can silence
+the warning by fixing your code. :)
+
+The C<Role> type has been deprecated. On its own, it was useless,
+since it just checked C<< $object->can('does') >>. If you were using
+it as a parent type, just call C<role_type('Role::Name')> to create an
+appropriate type instead.
+
+=head1 Version 0.78
+
+C<use Moose::Exporter;> now imports C<strict> and C<warnings> into packages
+that use it.
+
+=head1 Version 0.77
+
+C<DEMOLISHALL> and C<DEMOLISH> now receive an argument indicating whether or
+not we are in global destruction.
+
+=head1 Version 0.76
 
-Since this warning has been decried by some (such as chromatic in
-L<http://www.modernperlbooks.com/mt/2009/04/the-value-of-a-warning.html>),
-we ask that you provide feedback about whether this warning has helped or
-hindered you. If it turns out to have been a bad idea, we will not
-hesitate to remove it from future versions.
+Type constraints no longer run coercions for a value that already matches the
+constraint.  This may affect some (arguably buggy) edge case coercions that
+rely on side effects in the C<via> clause.
 
 =head1 Version 0.75
 
@@ -187,10 +352,10 @@ just the first missing method.
 Moose will no longer inline a constructor for your class unless it
 inherits its constructor from Moose::Object, and will warn when it
 doesn't inline. If you want to force inlining anyway, pass
-C<< "replace_constructor => 1 >> to C<make_immutable>.
+C<< replace_constructor => 1 >> to C<make_immutable>.
 
 If you want to get rid of the warning, pass C<< inline_constructor =>
-1 >>.
+0 >>.
 
 =head1 Version 0.62