[erlang-questions] Question about parametrized modules
Mon Aug 9 13:08:41 CEST 2010
On Sun, Aug 8, 2010 at 2:47 PM, Filipe David Manana <>wrote:
> I have a function_clause error when calling some functions of a
> module which use one of the module parameters.
> The module in question (from mochiweb) is like:
> -module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]).
> % ...
> get(socket) ->
> get(scheme) ->
> case mochiweb_socket:type(Socket) of
> plain ->
> ssl ->
> get(method) ->
> get(raw_path) ->
> get(version) ->
> get(headers) ->
> Then, from another module, which has an instance of that parametrized
> (mochiweb_request) I have:
> 1) a call like MochiReq:get(socket) - this one succeeds
> 2) a call like MochiReq:get(scheme) - it fails with the stack trace bellow:
Stupid question, sorry, but you did recompile and are running your new
Because that error looks like the mochiweb_request:get function simply
doesn't understand you arguments. And my first guess would be that it
doesn't understand 'scheme'.
More information about the erlang-questions