Making the controller be an instance, not a class.
adam [Thu, 24 May 2007 21:43:07 +0000 (21:43 +0000)]
Changelog
lib/Catalyst/Action/REST.pm

index adaa38c..3997004 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,6 @@
+Thu May 24 14:01:06 PDT 2007 (adam) - Release 0.41
+  Moved a bogus $self->class to $c->component($self->class)
+
 Fri Mar  9 14:13:29 PST 2007 (adam) - Release 0.40
   Refactored the Content-Type negotiation to live in Catalyst::Request::REST. 
     (drolsky)
index 23b91ed..f3c99db 100644 (file)
@@ -16,7 +16,7 @@ use Catalyst::Request::REST;
 use 5.8.1;
 
 our
-    $VERSION = '0.40';
+    $VERSION = '0.41';
 
 # This is wrong in several ways. First, there's no guarantee that
 # Catalyst.pm has not been subclassed. Two, there's no guarantee that
@@ -86,7 +86,7 @@ sub dispatch {
     my $self = shift;
     my $c    = shift;
 
-    my $controller = $self->class;
+    my $controller = $c->component($self->class);
     my $method     = $self->name . "_" . uc( $c->request->method );
     if ( $controller->can($method) ) {
         $c->execute( $self->class, $self, @{ $c->req->args } );