Browse files

Use hook keyword rather than deprecated before/after

  • Loading branch information...
1 parent 939047a commit f70bbb375d1151df343966edf9d2d1e8c324596e @bigpresh committed Mar 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Dancer/Plugin/TimeRequests.pm
View
4 lib/Dancer/Plugin/TimeRequests.pm
@@ -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}

0 comments on commit f70bbb3

Please sign in to comment.