Skip to content

Commit

Permalink
better hook descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 31, 2011
1 parent 6827e18 commit 1cfb69a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.20 2011-10-31 00:00:00
- Documentation improvements.

2.19 2011-10-31 00:00:00
- Deprecated Mojolicious::Plugins->add_hook in favor of
Mojolicious::Plugins->on.
Expand Down
19 changes: 8 additions & 11 deletions lib/Mojolicious.pm
Expand Up @@ -35,7 +35,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.19';
our $VERSION = '2.20';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down Expand Up @@ -462,14 +462,14 @@ and the application object, as well as a function in C<ep> templates.
Extend L<Mojolicious> by adding hooks.
These hooks are currently available and run in the listed order:
These hooks are currently available and are emitted in the listed order:
=over 2
=item after_build_tx
Triggered right after the transaction is built and before the HTTP request
gets parsed, the callbacks of this hook run in the order they were added.
Emitted in reverse order right after the transaction is built and before the
HTTP request gets parsed.
$app->hook(after_build_tx => sub {
my ($tx, $app) = @_;
Expand All @@ -480,8 +480,7 @@ One use case would be upload progress bars.
=item before_dispatch
Triggered right before the static and routes dispatchers start their work,
the callbacks of this hook run in the order they were added.
Emitted right before the static and routes dispatchers start their work.
$app->hook(before_dispatch => sub {
my $self = shift;
Expand All @@ -492,9 +491,8 @@ Very useful for rewriting incoming requests and other preprocessing tasks.
=item after_static_dispatch
Triggered after the static dispatcher determined if a static file should be
served and before the routes dispatcher starts its work, the callbacks of
this hook run in reverse order.
Emitted in reverse order after the static dispatcher determined if a static
file should be served and before the routes dispatcher starts its work.
$app->hook(after_static_dispatch => sub {
my $self = shift;
Expand All @@ -505,8 +503,7 @@ Mostly used for custom dispatchers and postprocessing static file responses.
=item after_dispatch
Triggered after a response has been rendered, the callbacks of this hook run
in reverse order.
Emitted in reverse order after a response has been rendered.
Note that this hook can trigger before C<after_static_dispatch> due to its
dynamic nature.
Expand Down

0 comments on commit 1cfb69a

Please sign in to comment.