[Catalyst-commits] r12989 -
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual
u-foka at dev.catalyst.perl.org
u-foka at dev.catalyst.perl.org
Sun Feb 28 20:36:17 GMT 2010
Author: u-foka
Date: 2010-02-28 20:36:17 +0000 (Sun, 28 Feb 2010)
New Revision: 12989
Modified:
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/CatalystAndMoose.pod
Log:
Indention fixes in CatalystAndMoose.pod
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/CatalystAndMoose.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/CatalystAndMoose.pod 2010-02-28 20:29:58 UTC (rev 12988)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/CatalystAndMoose.pod 2010-02-28 20:36:17 UTC (rev 12989)
@@ -122,39 +122,39 @@
from 5.80003 onwards, or use modifiers in your controller classes
themselves. For example
- package MyApp::Controller::Foo;
- use Moose;
- use namespace::autoclean;
- BEGIN { extends 'Catalyst::Controller' };
-
+ package MyApp::Controller::Foo;
+ use Moose;
+ use namespace::autoclean;
+ BEGIN { extends 'Catalyst::Controller' };
+
sub foo : Local {
- my ($self, $c) = @_;
- $c->res->body('Hello ');
- }
- after foo => sub {
- my ($self, $c) = @_;
- $c->res->body($c->res->body . 'World');
- };
-
+ my ($self, $c) = @_;
+ $c->res->body('Hello ');
+ }
+ after foo => sub {
+ my ($self, $c) = @_;
+ $c->res->body($c->res->body . 'World');
+ };
+
It is possible to have action methods with attributes inside Moose roles, using
L<MooseX::MethodAttributes>, example:
package MyApp::ControllerRole;
use MooseX::MethodAttributes::Role;
use namespace::autoclean;
-
+
sub foo : Local {
my ($self, $c) = @_;
...
}
+
+ package MyApp::Controller::Foo;
+ use Moose;
+ use namespace::autoclean;
+ BEGIN { extends 'Catalyst::Controller' };
+
+ with 'MyApp::ControllerRole';
- package MyApp::Controller::Foo;
- use Moose;
- use namespace::autoclean;
- BEGIN { extends 'Catalyst::Controller' };
-
- with 'MyApp::ControllerRole';
-
=head1 AUTHORS
Catalyst Contributors, see Catalyst.pm
More information about the Catalyst-commits
mailing list