summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-06-07 17:07:50 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-06-07 17:07:50 +0100
commitf80e8f46183ba3afdd0d966861fcb3cb1b4b2f58 (patch)
tree4a88513c3a952ca0b754fae14ce9cb61aacdc390
parentf74fb5f2f21f19dcce7c73e296f8027380c82e22 (diff)
downloadrabbitmq-server-bug24013.tar.gz
Use magical new features. Arguably in the wrong place, but I'm not going to have this bug branch outside serverbug24013
-rw-r--r--src/rabbit_misc.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index b6b97f6d..121de635 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -15,6 +15,10 @@
%%
-module(rabbit_misc).
+
+-compile({parse_transform, import_as}).
+-import_as({proplists, [{get_value/2, pget}, {get_value/3, pget}]}).
+
-include("rabbit.hrl").
-include("rabbit_framing.hrl").
@@ -911,9 +915,6 @@ is_process_alive(Pid) ->
_ -> false
end.
-pget(K, P) -> proplists:get_value(K, P).
-pget(K, P, D) -> proplists:get_value(K, P, D).
-
pget_or_die(K, P) ->
case proplists:get_value(K, P) of
undefined -> exit({error, key_missing, K});