Hehe, yeah, that is my backup solution. When I go to reach for a parse transform or writing my own behaviour I always try to just assume I'm missing something simple. And not until I'm sure of no other option I go with those.<div>
<br></div><div>Tristan<br><br><div class="gmail_quote">On Mon, Sep 5, 2011 at 1:27 PM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@dev-extend.eu">essen@dev-extend.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On 09/05/2011 07:52 PM, Tristan Sloughter wrote:<br>
> This should be a generic Erlang question even though its being used for<br>
> writing Webmachine resources.<br>
><br>
> Basically my problem stems from extends not adding the base modules<br>
> exports to the exports of the module extending it, as far as I can tell<br>
> at least form module_info(functions). So something like:<br>
><br>
> -model(resource_user).<br>
> -extends(resource_base).<br>
><br>
> Where resource_base exports some Webmachine functions like:<br>
><br>
> -exports([init/1]).<br>
><br>
> init([]) -><br>
> {ok, #ctx{}}.<br>
><br>
> Does not work becase Webmachine does not see a resource_user:init/1.<br>
><br>
> Does anyone have a suggestion on an alternative way to achieve this? I<br>
> want to be able to override the function in resource_user so it does not<br>
> use the resource_base or default Webmachine function.<br>
<br>
</div></div>Not answering your question directly, but can't you solve that using a<br>
parse_transform instead? Add the missing functions at compile time with it.<br>
<font color="#888888"><br>
--<br>
Loďc Hoguin<br>
Dev:Extend<br>
</font></blockquote></div><br></div>