From: Tomas Doran Date: Thu, 2 Apr 2009 00:49:35 +0000 (+0000) Subject: Tidy error, remove debug, tidy warn. X-Git-Tag: 5.80001~40^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=56e19078d7169c3c969468f8730d48e12271adb6;p=catagits%2FCatalyst-Runtime.git Tidy error, remove debug, tidy warn. --- diff --git a/Changes b/Changes index f5d21d8..462377d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ # This file documents the revision history for Perl extension Catalyst. + - Tidy up Catalyst::ClassData to ensure that all components get + the correct metaclass (t0m) - Make MyApp.pm restartable by unsetting setup_finished in the restarter process (t0m) - Non-naive implementation of making mutable on restart using diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 282b71f..8805134 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2085,8 +2085,6 @@ sub setup_components { sub setup_component { my( $class, $component ) = @_; - - #warn("Component $component has meta " . $component->meta); unless ( $component->can( 'COMPONENT' ) ) { return $component; } diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 3b5ce45..a080f84 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -181,7 +181,8 @@ sub register_actions { #this is still not correct for some reason. my $namespace = $self->action_namespace($c); my $meta = find_meta($self); - confess("Wrong metaclass $meta for $self - " . $meta->name) + confess("Metaclass for " . ref($meta) ." for " . $meta->name + . " cannot support register_actions.") unless $meta->can('get_all_methods_with_attributes'); my @methods = $meta->get_all_methods_with_attributes;