Skip to content
Mix in functions from other modules
Erlang Makefile
Find file
Latest commit 0d13224 @seth seth Merge pull request #9 from spiegela/master
Increase function arity limit to 26
Failed to load latest commit information.
include Adding license boilerplate and cleaning up readme
test Add new syntax for <mixin all, except>
Makefile Adding dialyzer to standard build




-export([doit/0, doit/1, doit/2]).

doit() ->

doit(A) ->
    [doit, A].

doit(A, B) ->
    [doit, A, B].

Module bar.erl which 'mixes in' foo:


or all except specific functions from foo:

-mixin([{foo, except, [doit/0, doit/2]}]).

or only specific functions from foo:

-mixin([{foo, [doit/0, doit/2]}]).

Another version of bar.erl which mixes in all functions from foo and select functions from baz:

-mixin([foo, {baz, [doit/0, doit/1]}]).

One more version of bar.erl which mixes in foo:doit/0 and renames it to do_it_now/0:

-mixin([{foo, [{doit/0, do_it_now}]}]).

The original motivation for this parse transform was to permit reuse of functions implementing common logic for tasks such as signature verification and authorization across multiple webmachine resources.

Something went wrong with that request. Please try again.