From: adam Date: Thu, 24 May 2007 21:43:07 +0000 (+0000) Subject: Making the controller be an instance, not a class. X-Git-Tag: 0.67_01~44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=commitdiff_plain;h=28463ece18fecf94d353479a6d2b07fc0388fd42 Making the controller be an instance, not a class. --- diff --git a/Changelog b/Changelog index adaa38c..3997004 100644 --- 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) diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index 23b91ed..f3c99db 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -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 } );