Skip to content

Commit

Permalink
mention how to list all helpers with a one-liner
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 19, 2015
1 parent 2df1437 commit 45dc0e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious.pm
Expand Up @@ -581,8 +581,8 @@ every request.
$app->helper(foo => sub {...});
Add a new helper that will be available as a method of the controller object
and the application object, as well as a function in C<ep> templates.
Add or replace a helper that will be available as a method of the controller
object and the application object, as well as a function in C<ep> templates.
# Helper
$app->helper(cache => sub { state $cache = {} });
Expand Down
1 change: 1 addition & 0 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -1388,6 +1388,7 @@ itself can be accessed via C<app>.

$ mojo generate lite_app myapp.pl
$ ./myapp.pl eval 'say for @{app->static->paths}'
$ ./myapp.pl eval 'say for sort keys %{app->renderer->helpers}'

The C<verbose> options will automatically print the return value or returned
data structure to C<STDOUT>.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Routes.pm
Expand Up @@ -288,13 +288,13 @@ and implements the following new ones.
$r = $r->add_condition(foo => sub {...});
Add a new condition.
Register a new condition.
=head2 add_shortcut
$r = $r->add_shortcut(foo => sub {...});
Add a new shortcut.
Register a new shortcut.
=head2 continue
Expand Down

0 comments on commit 45dc0e4

Please sign in to comment.