Skip to content

Commit

Permalink
more links
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 16, 2013
1 parent 4018007 commit 9a48256
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -880,7 +880,7 @@ might not work perfectly in all deployment environments.
=head2 Encoding

Templates stored in files are expected to be C<UTF-8> by default, but that can
be easily changed.
be easily changed with L<Mojolicious::Renderer/"encoding">.

# Application
package MyApp;
Expand Down
7 changes: 5 additions & 2 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -775,8 +775,9 @@ unescaped and decoded from bytes to characters.
=head2 Rearranging routes

Until the first request has been handled, all routes can still be moved around
or even removed. Especially for rearranging routes created by plugins this can
be very useful.
or even removed with methods like L<Mojolicious::Routes::Route/"add_child">
and L<Mojolicious::Routes::Route/"remove">. Especially for rearranging routes
created by plugins this can be very useful.

# GET /example/show -> {controller => 'example', action => 'show'}
my $show = $r->get('/show')->to('example#show');
Expand All @@ -786,6 +787,8 @@ be very useful.
$r->get('/secrets/show')->to('secrets#show')->name('show_secrets');
$r->find('show_secrets')->remove;

To find routes by their name you can use L<Mojolicious::Routes::Route/"find">.

=head2 Conditions

Sometimes you might need a little more power, for example to check the
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -289,6 +289,9 @@ L<Mojolicious::Plugin::DefaultHelpers/"content">.
<body><%= content %></body>
</html>
The stash or helpers like L<Mojolicious::Plugin::DefaultHelpers/"title"> can
be used to pass additional information to the layout.
=head2 Blocks
Template blocks can be used like normal Perl functions and are always
Expand Down
4 changes: 3 additions & 1 deletion lib/Mojolicious/Renderer.pm
Expand Up @@ -271,7 +271,9 @@ detection doesn't work, like for C<inline> templates.
my $encoding = $renderer->encoding;
$renderer = $renderer->encoding('koi8-r');
Will encode the content if set, defaults to C<UTF-8>.
Will encode generated content if set, defaults to C<UTF-8>. Note that many
renderers such as L<Mojolicious::Plugin::EPRenderer> also use this value to
determine if template files should be decoded before processing.
=head2 handlers
Expand Down

0 comments on commit 9a48256

Please sign in to comment.