Skip to content

Commit

Permalink
characters vs bytes documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 1, 2013
1 parent 4daf3ae commit 0c63d4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -678,8 +678,8 @@ generated, all additional values get merged into the C<stash>.
$c->render_data($bytes);
$c->render_data($bytes, format => 'png');
Render the given content as raw bytes, similar to C<render_text> but data will
not be encoded. All additional values get merged into the C<stash>.
Render the given content as bytes, similar to C<render_text> but data will not
be encoded. All additional values get merged into the C<stash>.
# Longer version
$c->render(data => $bytes);
Expand Down Expand Up @@ -748,8 +748,8 @@ method does not protect from traversing to parent directories.
$c->render_text('Hello World!');
$c->render_text('Hello World!', layout => 'green');
Render the given content as Perl characters, which will be encoded to bytes.
All additional values get merged into the C<stash>. See C<render_data> for an
Render the given content as characters, which will be encoded to bytes. All
additional values get merged into the C<stash>. See C<render_data> for an
alternative without encoding. Note that this does not change the content type
of the response, which is C<text/html;charset=UTF-8> by default.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -196,14 +196,14 @@ too.

=head2 Rendering text

Perl characters can be rendered with the C<text> stash value, the given
Characters can be rendered to bytes with the C<text> stash value, the given
content will be automatically encoded to bytes.

$self->render(text => 'Hello Wörld!');

=head2 Rendering data

Raw bytes can be rendered with the C<data> stash value, no encoding will be
Bytes can be rendered with the C<data> stash value, no encoding will be
performed.

$self->render(data => $octets);
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -682,7 +682,7 @@ Less commonly used and more powerful features.
=head2 IRIs

IRIs are handled transparently, that means paths are guaranteed to be
unescaped and decoded to Perl characters.
unescaped and decoded from bytes to characters.

# GET /☃ (unicode snowman) -> {controller => 'foo', action => 'snowman'}
$r->get('/☃')->to('foo#snowman');
Expand Down

0 comments on commit 0c63d4e

Please sign in to comment.