[erlang-questions] (no subject)

Kirill Zaborski qrilka@REDACTED
Fri Jun 15 08:21:24 CEST 2007

Has anyone tried to create a behavior based on some standard one?
What I try to do is to 'subclass' gen_server, so the resulting module
implementing sub_gen_server behavior will act like gen_server and
react on some particular  messages (and call methods declared in
The question is - how do I call those messages? How can I get module
name implementing my behavior to call that module functions from
In standard behaviors I see that we pass module name to
start/start_link which then spawn a loop with a module name as a
parameter. But in handle_call/3 in sub_gen_server I do not get that
parameter and that is where I need to call functions implementing
sub_gen_server behavior.
The only workaround I see at the moment is to pass the module name in
gen_server State.
Are there some other ways to do the same?


More information about the erlang-questions mailing list