use Moose::Util::ensure_all_roles instead of Moose::Util::does_role to apply to Catal...
Alexander Hartmaier [Wed, 16 May 2012 12:37:07 +0000 (14:37 +0200)]
lib/Catalyst/Controller/DBIC/API.pm

index 03b1f08..d45962b 100644 (file)
@@ -81,8 +81,7 @@ sub begin :Private
 {
     my ($self, $c) = @_;
 
-    Catalyst::Controller::DBIC::API::Request->meta->apply($c->req)
-        unless Moose::Util::does_role($c->req, 'Catalyst::Controller::DBIC::API::Request');
+    Moose::Util::ensure_all_roles($c->req, 'Catalyst::Controller::DBIC::API::Request');
 }
 
 =method_protected setup