Parameterized module and behaviour undefined warning.

Kenny MacDermid <>
Sun Jun 28 14:55:33 CEST 2009


Hello,

I tried to post this through the google interface, but perhaps that  
doesn't work. Hopefully this won't double-post.

I wondering if I should be using '-behaviour()' differently for a  
parameterized module. I'm getting "Warning: behaviour ____ undefined".

Here's the module that I'm using as the behaviour:

-----
-module(prmmodule, [Param1, Param2]).

-export([behaviour_info/1]).

behaviour_info(callbacks) ->
   [{a, 1}, {b, 1}].
-----

and here's the module using it:

-----
-module(prm).
-behaviour(prmmodule).

-export([a/1, b/1]).

a(_) ->
   true.

b(_) ->
   true.
-----

This only happens if the module is parameterized (so it shouldn't be a  
-pz issue). Any ideas?

Thanks,

Kenny



More information about the erlang-questions mailing list