controller_role => component_role 0.001
Robert 'phaylon' Sedlacek [Sat, 1 Aug 2009 00:47:14 +0000 (02:47 +0200)]
README
examples/MyApp-Web/lib/MyApp/Web/ControllerRole/RenderView.pm
lib/CatalystX/Declare.pm
lib/CatalystX/Declare/Keyword/Action.pm
lib/CatalystX/Declare/Keyword/Role.pm
t/lib/TestApp/Controller/Composed.pm
t/lib/TestApp/TestRole.pm

diff --git a/README b/README
index f2a12bf..4adecc2 100644 (file)
--- a/README
+++ b/README
@@ -43,7 +43,7 @@ SYNOPSIS
   Roles
         use CatalystX::Declare;
 
-        controller_role MyApp::Web::ControllerRole::Bar {
+        component_role MyApp::Web::ControllerRole::Bar {
 
             use MyApp::Types qw( Username );
 
index be42a91..71f5f86 100644 (file)
@@ -1,7 +1,7 @@
 use CatalystX::Declare;
 
 # almost like a normal Moose role
-controller_role MyApp::Web::ControllerRole::RenderView {
+component_role MyApp::Web::ControllerRole::RenderView {
 
     # we can use the whole Moose infrastructure
     use MooseX::Types::Moose qw( Str );
index 68009c8..7696729 100644 (file)
@@ -13,7 +13,7 @@ class CatalystX::Declare extends MooseX::Declare is dirty {
     around keywords {
         $self->$orig,
         ControllerKeyword->new(identifier => 'controller'),
-        RoleKeyword->new(identifier => 'controller_role'),
+        RoleKeyword->new(identifier => 'component_role'),
         ApplicationKeyword->new(identifier => 'application'),
     }
 }
@@ -69,7 +69,7 @@ CatalystX::Declare - EXPERIMENTAL Declarative Syntax for Catalyst Applications
 
     use CatalystX::Declare;
 
-    controller_role MyApp::Web::ControllerRole::Bar {
+    component_role MyApp::Web::ControllerRole::Bar {
 
         use MyApp::Types qw( Username );
 
index be45235..56d2874 100644 (file)
@@ -558,7 +558,7 @@ C<base> action:
 
     use CatalystX::Declare;
 
-    controller_role MyApp::Web::ControllerRole::RichBase {
+    component_role MyApp::Web::ControllerRole::RichBase {
 
         before base (Object $ctx) {
             $ctx->stash(something => $ctx->model('Item'));
index f53e23a..28b11f8 100644 (file)
@@ -39,7 +39,7 @@ CatalystX::Declare::Keyword::Role - Declare Catalyst Controller Roles
 
     use CatalystX::Declare;
 
-    controller_role MyApp::Web::ControllerRole::Foo {
+    component_role MyApp::Web::ControllerRole::Foo {
 
         method provided_method { ... }
 
@@ -50,7 +50,7 @@ CatalystX::Declare::Keyword::Role - Declare Catalyst Controller Roles
 
 =head1 DESCRIPTION
 
-This handler provides the C<controller_role> keyword. It is an extension of the
+This handler provides the C<component_role> keyword. It is an extension of the
 L<MooseX::Declare::Syntax::Keyword::Role> handler. Like with declared 
 controllers, the C<method> keyword and the modifiers are provided. For details
 on the syntax for action declarations have a look at
index 167a91e..6838066 100644 (file)
@@ -1,6 +1,6 @@
 use CatalystX::Declare;
 
-controller_role TestApp::ControllerRole::Composed {
+component_role TestApp::ControllerRole::Composed {
     method composed_method { }
     action composed_action;
 }
index dd2d0c5..d4ac13f 100644 (file)
@@ -1,6 +1,6 @@
 use CatalystX::Declare;
 
-controller_role TestApp::TestRole {
+component_role TestApp::TestRole {
 
     method something_from_the_role { 23 }