Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: bigpresh/Dancer-Plugin-TimeRequests
base: 939047a41c
...
head fork: bigpresh/Dancer-Plugin-TimeRequests
compare: dddea613af
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 3 deletions.
  1. +4 −0 Changes
  2. +3 −3 lib/Dancer/Plugin/TimeRequests.pm
View
4 Changes
@@ -1,5 +1,9 @@
Revision history for Dancer-Plugin-TimeRequests
+0.03 2012-03-07
+ Use hook keyword rather than deprecated before/after keywords.
+ Thanks to melmothX on IRC for reporting.
+
0.02 2011-05-31
Adding Dancer as a prereq would likely be helpful. (D'oh!)
View
6 lib/Dancer/Plugin/TimeRequests.pm
@@ -5,7 +5,7 @@ use Dancer::Plugin;
use Dancer qw(:syntax);
use Time::HiRes;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
=head1 NAME
@@ -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}

No commit comments for this range

Something went wrong with that request. Please try again.