Skip to content

Commit

Permalink
more consistent examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 20, 2013
1 parent 536f6ad commit 00c420b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo.pm
Expand Up @@ -132,7 +132,7 @@ plugins, since non-blocking requests that are already in progress will
interfere with new blocking ones.
# Perform blocking request
my $body = $app->ua->get('example.com')->res->body;
say $app->ua->get('example.com')->res->body;
=head1 METHODS
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Message.pm
Expand Up @@ -190,9 +190,9 @@ sub start_line_size { length shift->build_start_line }

sub text {
my $self = shift;
my $content = $self->body;
my $body = $self->body;
my $charset = $self->content->charset;
return $charset ? decode($charset, $content) // $content : $content;
return $charset ? decode($charset, $body) // $body : $body;
}

sub to_string {
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Controller.pm
Expand Up @@ -734,7 +734,7 @@ Get L<Mojo::Message::Request> object from L<Mojo::Transaction/"req">.
my $userinfo = $c->req->url->to_abs->userinfo;
my $host = $c->req->url->to_abs->host;
my $agent = $c->req->headers->user_agent;
my $body = $c->req->body;
my $bytes = $c->req->body;
my $str = $c->req->text;
my $hash = $c->req->json;
my $foo = $c->req->json('/23/foo');
Expand Down

0 comments on commit 00c420b

Please sign in to comment.