[Catalyst-commits] r6430 - in trunk/Catalyst-Action-REST: . lib/Catalyst/Action

adam at dev.catalyst.perl.org adam at dev.catalyst.perl.org
Thu May 24 22:43:08 GMT 2007


Author: adam
Date: 2007-05-24 22:43:07 +0100 (Thu, 24 May 2007)
New Revision: 6430

Modified:
   trunk/Catalyst-Action-REST/Changelog
   trunk/Catalyst-Action-REST/lib/Catalyst/Action/REST.pm
Log:
Making the controller be an instance, not a class.

Modified: trunk/Catalyst-Action-REST/Changelog
===================================================================
--- trunk/Catalyst-Action-REST/Changelog	2007-05-24 15:46:44 UTC (rev 6429)
+++ trunk/Catalyst-Action-REST/Changelog	2007-05-24 21:43:07 UTC (rev 6430)
@@ -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)

Modified: trunk/Catalyst-Action-REST/lib/Catalyst/Action/REST.pm
===================================================================
--- trunk/Catalyst-Action-REST/lib/Catalyst/Action/REST.pm	2007-05-24 15:46:44 UTC (rev 6429)
+++ trunk/Catalyst-Action-REST/lib/Catalyst/Action/REST.pm	2007-05-24 21:43:07 UTC (rev 6430)
@@ -16,7 +16,7 @@
 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 @@
     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 } );




More information about the Catalyst-commits mailing list