Skip to content

Instantly share code, notes, and snippets.

/dev.diff Secret

Created February 11, 2016 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c372c84bbba92bed96bf to your computer and use it in GitHub Desktop.
Save anonymous/c372c84bbba92bed96bf to your computer and use it in GitHub Desktop.
diff --git a/lib/Mojolicious.pm b/lib/Mojolicious.pm
index 4ad34e6..e6a2351 100644
--- a/lib/Mojolicious.pm
+++ b/lib/Mojolicious.pm
@@ -97,7 +97,8 @@ sub dispatch {
# Start timer (ignore static files)
my $stash = $c->stash;
- unless ($stash->{'mojo.static'} || $stash->{'mojo.started'}) {
+ my $dev = $self->mode eq 'development';
+ if ($dev && !$stash->{'mojo.static'} && !$stash->{'mojo.started'}) {
my $req = $c->req;
my $method = $req->method;
my $path = $req->url->path->to_abs_string;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment