[Catalyst-commits] r11046 -
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/lib/Catalyst
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Aug 6 23:42:30 GMT 2009
Author: t0m
Date: 2009-08-06 23:42:29 +0000 (Thu, 06 Aug 2009)
New Revision: 11046
Modified:
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/lib/Catalyst/Controller.pm
Log:
Fix error message
Modified: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/lib/Catalyst/Controller.pm 2009-08-06 23:07:07 UTC (rev 11045)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/lib/Catalyst/Controller.pm 2009-08-06 23:42:29 UTC (rev 11046)
@@ -211,8 +211,12 @@
#this is still not correct for some reason.
my $namespace = $self->action_namespace($c);
+ # FIXME - fugly
if (!blessed($self) && $self eq $c && scalar(@methods)) {
- $c->log->warn("Action methods found defined in your application class, $self. This is deprecated, please move them into a Root controller.");
+ my @really_bad_methods = grep { ! /^_(DISPATCH|BEGIN|AUTO|ACTION|END)$/ } map { $_->name } @methods;
+ if (scalar(@really_bad_methods)) {
+ $c->log->warn("Action methods (" . join(', ', @really_bad_methods) . ") found defined in your application class, $self. This is deprecated, please move them into a Root controller.");
+ }
}
foreach my $method (@methods) {
More information about the Catalyst-commits
mailing list