X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FManual%2FDelta.pod;h=72e21ab1c2319f10fc3eec65a7a40406811ccd2e;hb=76c890567fd0f02cde934f5199736b447fc72a58;hp=a3b59517880e885d5b767c8ddb67a752916726e4;hpb=e925c3e0729699c52e8d97c22f4f25a964c2e4f1;p=gitmo%2FMoose.git diff --git a/lib/Moose/Manual/Delta.pod b/lib/Moose/Manual/Delta.pod index a3b5951..72e21ab 100644 --- a/lib/Moose/Manual/Delta.pod +++ b/lib/Moose/Manual/Delta.pod @@ -16,12 +16,85 @@ 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.85 +=head1 0.93 -L has been moved into the Moose core from +=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 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 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 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. + +=item C and C 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 has been moved into the Moose core from L. Major changes include: -=over +=over 4 =item C, not C @@ -40,15 +113,58 @@ 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 -See L for the new documentation. +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.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. =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 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