Skip to content

Instantly share code, notes, and snippets.

@akiym
Created October 26, 2012 08:32
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 akiym/3957634 to your computer and use it in GitHub Desktop.
Save akiym/3957634 to your computer and use it in GitHub Desktop.
diff --git a/lib/Amon2/Lite.pm b/lib/Amon2/Lite.pm
index c3f3aa1..0f75201 100644
--- a/lib/Amon2/Lite.pm
+++ b/lib/Amon2/Lite.pm
@@ -119,11 +119,11 @@ sub import {
};
*{"$caller\::get"} = sub {
- $router->connect($_[0], {code => $_[1], method => ['GET', 'HEAD']});
+ $router->connect($_[0], {code => $_[1]}, {method => ['GET', 'HEAD']});
};
*{"$caller\::post"} = sub {
- $router->connect($_[0], {code => $_[1], method => ['POST']});
+ $router->connect($_[0], {code => $_[1]}, {method => ['POST']});
};
*{"${base_class}\::dispatch"} = sub {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment