defining default functions for a module
Wed Nov 11 00:25:29 CET 2009
I have a module that acts as a router.
It gets requests and pass them to callback modules.
Callback modules should have a function for each case unless they need to do something specific.
Is it ok to use erlang:function_exported/3 to check if the callback module defined the needed function
and if not to execute the default defined in the router?
Will it cost me in performance or is it against the way I should do things in erlang?
I thought a behavior will solve my need but it only recommend a module structure for the compiler.
More information about the erlang-questions