Tidy error, remove debug, tidy warn.
Tomas Doran [Thu, 2 Apr 2009 00:49:35 +0000 (00:49 +0000)]
Changes
lib/Catalyst.pm
lib/Catalyst/Controller.pm

diff --git a/Changes b/Changes
index f5d21d8..462377d 100644 (file)
--- 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
index 282b71f..8805134 100644 (file)
@@ -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;
     }
index 3b5ce45..a080f84 100644 (file)
@@ -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;