Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use hook keyword rather than deprecated before/after

  • Loading branch information...
commit f70bbb375d1151df343966edf9d2d1e8c324596e 1 parent 939047a
David Precious authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Dancer/Plugin/TimeRequests.pm
4 lib/Dancer/Plugin/TimeRequests.pm
View
@@ -33,11 +33,11 @@ showing how logn each request took:
=cut
-before sub {
+hook before => sub {
var request_start_time => Time::HiRes::time();
};
-after sub {
+hook after => sub {
Dancer::Logger::debug(sprintf "Request to %s completed in %.4f seconds",
request->path,
Time::HiRes::time() - vars->{request_start_time}
Please sign in to comment.
Something went wrong with that request. Please try again.