[Catalyst-commits] r9025 - in Catalyst-Runtime/5.80/trunk: .
lib/Catalyst
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Jan 7 03:46:35 GMT 2009
Author: t0m
Date: 2009-01-07 03:46:35 +0000 (Wed, 07 Jan 2009)
New Revision: 9025
Added:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod
Modified:
Catalyst-Runtime/5.80/trunk/TODO
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component.pm
Log:
Sod back-compat on the insane cases, start the upgrading documentation
Modified: Catalyst-Runtime/5.80/trunk/TODO
===================================================================
--- Catalyst-Runtime/5.80/trunk/TODO 2009-01-07 03:46:25 UTC (rev 9024)
+++ Catalyst-Runtime/5.80/trunk/TODO 2009-01-07 03:46:35 UTC (rev 9025)
@@ -31,27 +31,11 @@
- Catalyst::Plugin::DebugCookie
- Conflict with each other: $c->config->{debug}->{foo} = 'bar'
now breaks, unsure why..
-
- - Catalyst::Component::ACCEPT_CONTEXT - Having a COMPONENT method
- after Catalyst::Component::COMPONENT used to work, and will still
- delegate (and warn), but then NEXT::COMPONENT will not dtrt if you
- re-dispatch again (NEXT would seemingly go back to the start?)..
- See Reaction test suite for example of this happening.
- FIXME - Also don't think this correctly delegates - $c appears
- missing.
- Fix memory leaks (I already tried Devel::Leak::Object, but no joy).
- - In 5.70, you can have a component which doesn't inherit from ::Component,
- and has no new method, and it'll do the right thing for you. We should
- still support that, but warn for/deprecate it so it can go for 5.9X...
- This obviously needs better tests :/
-
Cleanups:
- - Allow turning deprecated warnings off with use Catalyst
- qw/-NoDeprecationWarnings/
-
- Update Test suite to not assume MyApp ISA Controller
- After that set up attr handlers that will output helpful error messages
when you do it as well as how to fix it.
@@ -65,21 +49,19 @@
Documentation:
- - extends in components with attributes must be inside a BEGIN block.
+ - Manual / Tutorial updates
- - How to write Moosified Catalyst components.
+ - extends in components with attributes must be inside a BEGIN block.
- - Manual / Tutorial updates
+ - How to write Moosified Catalyst components.
- Fix the Roadmap to be less full of lies.
-
- - With 5.7 people did extends qw/Moose::Object Catalyst::Component/, now
- Catalyst::Component isa Moose::Object so now isa doesn't linearize
- anymore, docs of what doesn't work and why (rafl)
- Document all other known failure cases / upgrade issues.
- Tidy up / finish off incompatibility warnings etc.
+
+ - Catalyst/Upgrading.pod
Reported bugs:
@@ -94,7 +76,7 @@
- Moosified test application?
- - Test warning from back-compat methods in Catalyst::Dispatcher
+ - Test & document warnings from back-compat methods in Catalyst::Dispatcher
- - Test warnings from plugin method on Catalyst
+ - Test & document warnings from plugin method on Catalyst
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component.pm 2009-01-07 03:46:25 UTC (rev 9024)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component.pm 2009-01-07 03:46:35 UTC (rev 9025)
@@ -77,8 +77,10 @@
if( my $next = $self->next::can ){
my $class = blessed $self || $self;
my ($next_package) = Class::MOP::get_code_info($next);
- warn "There is a COMPONENT method resolving after Catalyst::Component in ${next_package}. This behavior is deprecated and will stop working in future releases.";
- return $next->($self, $arguments);
+ warn "There is a COMPONENT method resolving after Catalyst::Component in ${next_package}.\n";
+ warn "This behavior can no longer be supported, and so your application is probably broken.\n";
+ warn "Your linearised isa hierarchy is: " . join(', ', mro::get_linear_isa($class)) . "\n";
+ warn "Please see perldoc Catalyst::Upgrading for more information about this issue.\n";
}
return $self->new($c, $arguments);
}
Added: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod (rev 0)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod 2009-01-07 03:46:35 UTC (rev 9025)
@@ -0,0 +1,84 @@
+=head1 Upgrading to Catalyst 5.80
+
+Work in progress
+
+=head1 Known backwards compatibility breakages.
+
+=head2 Catalyst::Plugin::Authentication
+
+You need at least version FIXME of Catalyst::Plugin::Authentication.
+
+=head2 Moose applications
+
+Applications made by early adopters, which say:
+
+ extends qw/Moose::Object Catalyst::Component/
+
+need the C<Moose::Object> removing to run with Catalyst 5.80, otherwise
+your Class' @ISA will not linearise with C3.
+
+rafl to fix this bit :)
+
+=head2 Components without new methods
+
+FIXME
+
+=head2 Components without COMPONENT methods
+
+FIXME
+
+=head2 __PACKAGE__->mk_accessor('meta');
+
+Won't work due to a limitation of L<MooseX::Emulate::Class::Accessor::Fast>
+
+FIXME
+
+=head2 Class::Data::Inheritable side effects
+
+FIXME
+
+=head2 Extending Catalyst::Request or other classes in an ad-hoc manor using mk_accessor
+
+FIXME
+
+=head2 require $class was successful but the package is not defined.
+
+FIXME Warning
+
+=head2 Components which inherit Catalyst::Component's COMPONENT method, who's new method does not return a true value.
+
+Previously if your new method returned a false value, then your class' configuration would be blessed into a hash on your behalf,
+and this would be returned from the COMPONENT method. This is no longer supported. You are not recommended to implement your own new method
+in components, instead, you should inherit the new method from Catalyst::Component, and use Moose's BUILD functionality
+to perform any construction work necessary for your sub-class.
+
+
+=head Methods in Catalyst::Dispatcher
+
+ Class $class is calling the deprecated method Catalyst::Dispatcher::$public_method_name,\n"
+ . "this will be removed in Catalyst 5.9X"
+
+FIXME
+
+=head2 Confused multiple inheritence with Catalyst::Component::COMPONENT
+
+Warning message:
+
+ There is a COMPONENT method resolving after Catalyst::Component
+ in ${next_package}.
+
+This means that one of the packages on the right hand side of
+Catalyst::Component in your Class' inheritance hierarchy defines
+a COMPONENT method.
+
+Previously, Catalyst's COMPONENT method would delegate to the
+method on the right hand side, which could then delegate back again
+with NEXT. This (as it is insane), is no longer supported, as it
+makes no sense with C3 method dispatch order.
+
+Therefore the correct fix is to re-arrange your class' inheritance
+hierarchy so that the COMPONENT method you would like to inherit is
+the first COMPONENT method in your @ISA.
+
+
+=cut
More information about the Catalyst-commits
mailing list