[erlang-questions] Alternative Default Webmachine Functions

Tristan Sloughter tristan.sloughter@REDACTED
Mon Sep 5 19:52:42 CEST 2011


This should be a generic Erlang question even though its being used for
writing Webmachine resources.

Basically my problem stems from extends not adding the base modules exports
to the exports of the module extending it, as far as I can tell at least
form module_info(functions). So something like:

-model(resource_user).
-extends(resource_base).

Where resource_base exports some Webmachine functions like:

-exports([init/1]).

init([]) ->
    {ok, #ctx{}}.

Does not work becase Webmachine does not see a resource_user:init/1.

Does anyone have a suggestion on an alternative way to achieve this? I want
to be able to override the function in resource_user so it does not use the
resource_base or default Webmachine function.

Thanks,
Tristan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110905/129a64b8/attachment.htm>


More information about the erlang-questions mailing list