Blow up rather than failing to call ->can if everything is totally screwed
Tomas Doran [Wed, 12 Aug 2009 01:11:07 +0000 (01:11 +0000)]
lib/Catalyst/Controller.pm

index a086eb2..3c313c7 100644 (file)
@@ -179,7 +179,7 @@ around path_prefix => sub {
 
 sub get_action_methods {
     my $self = shift;
-    my $meta = find_meta($self);
+    my $meta = find_meta($self) || confess("No metaclass setup for $self");
     confess("Metaclass "
           . ref($meta) . " for "
           . $meta->name