Created
July 6, 2015 11:11
-
-
Save augensalat/4903218000b4a4d2f286 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Mojolicious/Plugin/MethodOverride.pm b/lib/Mojolicious/Plugin/MethodOverride.pm | |
index 3a09501..e9a7f27 100644 | |
--- a/lib/Mojolicious/Plugin/MethodOverride.pm | |
+++ b/lib/Mojolicious/Plugin/MethodOverride.pm | |
@@ -9,6 +9,9 @@ our $VERSION = '0.053'; | |
sub register { | |
my ($self, $app, $conf) = @_; | |
+ my $log = $app->log; | |
+ | |
+ weaken $log; | |
my $header = | |
exists $conf->{header} ? $conf->{header} : 'X-HTTP-Method-Override'; | |
@@ -35,7 +38,7 @@ sub register { | |
} | |
if ($method and $method =~ /^[A-Za-z]+$/) { | |
- $app->log->debug(($header // $param) . ': ' . $method); | |
+ $log->debug(($header // $param) . ': ' . $method); | |
$req->method($method); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment