X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FManual%2FDelta.pod;h=69b271a1aacd73f689755aca0ffc2b71a2a9ac33;hb=90b20bd60aaeefc2f19154e534abf4bfc1177d8c;hp=5b9b9aef2ce96ee4eb0d015f98ca4aeb2ec0eb9a;hpb=52da380a9111c74467177526f792a898b412591a;p=gitmo%2FMoose.git diff --git a/lib/Moose/Manual/Delta.pod b/lib/Moose/Manual/Delta.pod index 5b9b9ae..69b271a 100644 --- a/lib/Moose/Manual/Delta.pod +++ b/lib/Moose/Manual/Delta.pod @@ -16,6 +16,164 @@ 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.89_02 + +=over 4 + +=item New Native delegation methods from L and L + +In particular, we now have C, C, C, and C. + +=item The Moose::Exporter with_caller feature is now deprecated + +Use C instead. The C option will start warning in a +future release. + +=item Moose now warns if you call C 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) are currently exempt from this check, since at the +moment we aren't very consistent about which metaclasses we immutabilize. + +=back + + +=head1 Version 0.89_01 + +L has been moved into the Moose core from +L. Major changes include: + +=over 4 + +=item C, not C + +Method providers are only available via traits. + +=item C, not C or C + +The C 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 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 is now C, and means empty, not non-empty + +Previously, the C method provided by Arrays and Hashes returned true if +the attribute was B empty (no elements). Now it returns true if the +attribute B empty. It was also renamed to C, to reflect this. + +=item C was renamed to C, and C and C were removed + +L refers to the functionality that we used to provide under C +as L, so that will likely be more familiar (and will +fit in better if we decide to add more List::Util functions). C and +C were removed, since their functionality is easily duplicated with +curries of C. + +=item Helpers that take a coderef of one argument now use C<$_> + +Subroutines passed as the first argument to C, C, and C 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 +does). + +See L for the new documentation. + +=back + +=head1 Version 0.89 + +C<< use Moose -metaclass => 'Foo' >> now does alias resolution, just like +C<-traits> (and the C and C options to C). + +Added two functions C and C to +L, 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. + +The C and C 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.84 + +When an attribute generates I accessors, we now warn. This is to help +users who forget the C 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, we now warn. You can silence +the warning by fixing your code. :) + +The C 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 to create an +appropriate type instead. + +=head1 Version 0.78 + +C now imports C and C into packages +that use it. + +=head1 Version 0.77 + +C and C now receive an argument indicating whether or +not we are in global destruction. + +=head1 Version 0.76 + +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 clause. + +=head1 Version 0.75 + +L now accepts the C<-metaclass> option for easily +overriding the metaclass (without L). This works for classes +and roles. + +=head1 Version 0.74 + +Added a C sugar function to L +to make integration with non-Moose classes easier. It simply checks if +C<< $obj->can() >> a list of methods. + +A number of methods (mostly inherited from L) have been +renamed with a leading underscore to indicate their internal-ness. The +old method names will still work for a while, but will warn that the +method has been renamed. In a few cases, the method will be removed +entirely in the future. This may affect MooseX authors who were using +these methods. + =head1 Version 0.73 Calling C with a name as the only argument now throws an @@ -25,6 +183,16 @@ exception. If you want an anonymous subtype do: This is related to the changes in version 0.71_01. +The C method in L is now +only usable as a class method. Previously, it worked as a class or +object method, with a different internal implementation for each +version. + +The internals of making a class immutable changed a lot in Class::MOP +0.78_02, and Moose's internals have changed along with it. The +external C<< $metaclass->make_immutable >> method still works the same +way. + =head1 Version 0.72 A mutable class accepted C<< Foo->new(undef) >> without complaint, @@ -135,12 +303,12 @@ error thrown now mentions all of the missing methods, as opposed to just the first missing method. Moose will no longer inline a constructor for your class unless it -inherits its constructor is inherited 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. +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. If you want to get rid of the warning, pass C<< inline_constructor => -1 >>. +0 >>. =head1 Version 0.62 @@ -246,8 +414,8 @@ just officially support it. The C<< Moose::Meta::Class->create >> method now supports roles. -It is now possible to make anononymous enum types by passing C -an array reference instead of the C<< enum $name => @values >>. +It is now possible to make anonymous enum types by passing C an +array reference instead of the C<< enum $name => @values >>. =head1 Version 0.37