Skip to content

Commit

Permalink
a few more controller examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 29, 2013
1 parent 3890c11 commit d226aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.42 2013-09-29
4.42 2013-09-30
- Added EXPERIMENTAL form validation support.
- Added EXPERIMENTAL modules Mojolicious::Validator and
Mojolicious::Validator::Validation.
Expand Down
5 changes: 5 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -497,6 +497,9 @@ defaults to a L<Mojolicious> object.
# Use application logger
$c->app->log->debug('Hello Mojo!');
# Generate path
my $path = $c->app->home->rel_file('templates/foo/bar.html.ep');
=head2 match
my $m = $c->match;
Expand All @@ -507,6 +510,7 @@ L<Mojolicious::Routes::Match> object.
# Introspect
my $foo = $c->match->endpoint->pattern->defaults->{foo};
my $bar = $c->match->stack->[-1]{bar};
=head2 tx
Expand All @@ -521,6 +525,7 @@ underlying connection might get closed early.
# Check peer information
my $address = $c->tx->remote_address;
my $port = $c->tx->remote_port;
=head1 METHODS
Expand Down

0 comments on commit d226aac

Please sign in to comment.