Skip to content

Commit

Permalink
mention that actions should be kept small
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 3, 2014
1 parent 2b85923 commit bbd74e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -875,8 +875,9 @@ The token can also be submitted with the C<X-CSRF-Token> request header.

=head2 Adding helpers

Adding and redefining helpers is very easy, you can use them to do pretty much
anything.
You should always try to keep your actions small and reuse as much code as
possible. Helpers make this very easy, you can use them to do pretty much
anything an action could do.

use Mojolicious::Lite;

Expand Down Expand Up @@ -955,6 +956,9 @@ call the nested helpers.

app->start;

While helpers can also be redefined, this should only be done very carefully
to avoid conflicts.

=head2 Helper plugins

Some helpers might be useful enough for you to share them between multiple
Expand Down

0 comments on commit bbd74e8

Please sign in to comment.