Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 00f2ec9ba3920ca90d481f724a78add206d7f41a 1 parent 245734e
@DrHyde authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/Dancer.pm
View
12 lib/Dancer.pm
@@ -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 {
...
};
Please sign in to comment.
Something went wrong with that request. Please try again.