Navigation Menu

Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 14, 2012
1 parent c340713 commit 7295e49
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/Mojo/Transaction.pm
Expand Up @@ -152,6 +152,7 @@ Local interface port.
Previous transaction that triggered this followup transaction.
# Path of previous request
say $tx->previous->req->url->path;
=head2 C<remote_address>
Expand Down Expand Up @@ -269,6 +270,7 @@ Returns the L<Mojo::Message::Response> object (C<res>) if transaction was
successful or C<undef> otherwise. Connection and parser errors have only a
message in C<error>, 400 and 500 responses also a code.
# Sensible exception handling
if (my $res = $tx->success) {
say $res->body;
}
Expand Down
3 changes: 0 additions & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -665,9 +665,6 @@ controller, defaults to a L<Mojolicious> object.
Router results for the current request, defaults to a
L<Mojolicious::Routes::Match> object.
# Introspect router results
my $name = $c->match->endpoint->name;
=head2 C<tx>
my $tx = $c->tx;
Expand Down
5 changes: 2 additions & 3 deletions lib/Mojolicious/Routes.pm
Expand Up @@ -63,9 +63,8 @@ sub any { shift->_generate_route(ref $_[0] eq 'ARRAY' ? shift : [], @_) }
sub auto_render {
my ($self, $c) = @_;
my $stash = $c->stash;
$c->render
or ($stash->{'mojo.routed'} or $c->render_not_found)
unless $stash->{'mojo.rendered'} || $c->tx->is_websocket;
return if $stash->{'mojo.rendered'} || $c->tx->is_websocket;
$c->render or ($stash->{'mojo.routed'} or $c->render_not_found);
}

sub bridge { shift->route(@_)->inline(1) }
Expand Down

0 comments on commit 7295e49

Please sign in to comment.