Permalink
Browse files

Update 'before' hook doco

* BUGFIX: document that the hook gets a sub-ref argument
    commit 0366507 seems
    to have got lost somewhere
* clarify that a naked 'before' is deprecated
  • Loading branch information...
1 parent 245734e commit 00f2ec9ba3920ca90d481f724a78add206d7f41a @DrHyde committed Mar 5, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/Dancer.pm
View
@@ -925,17 +925,17 @@ This hook receives as argument a L<Dancer::Error> object.
=item before
-This is an alias to C<before>.
+This hook receives one argument, a reference to the subroutine that
+implements the route that is being intercepted by this hook.
-This hook receives no arguments.
-
- before sub {
+ hook before => sub {
+ my $route_handler = shift;
...
};
-is equivalent to
+it is equivalent to the deprecated
- hook before => sub {
+ before sub {
...
};

0 comments on commit 00f2ec9

Please sign in to comment.