# Need help understanding some Mox source code

**URL:** <https://forum.elixirforum.com/t/need-help-understanding-some-mox-source-code/49139>\
**Category:** Questions\
**Tags:** metaprogramming, mox\
**Created:** [July 25, 2022, 3:36pm UTC](https://forum.elixirforum.com/t/need-help-understanding-some-mox-source-code/49139 "2022-07-25T15:36:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![al2o3cr](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/32/3457_2.png) [@al2o3cr](https://forum.elixirforum.com/u/al2o3cr)\
**Post date:** [July 25, 2022, 5:48pm UTC](https://forum.elixirforum.com/t/need-help-understanding-some-mox-source-code/49139/4 "2022-07-25T17:48:54Z")

</div>

Digging through the source history, that generated call to `module_info` predates the use of `@behaviour` and was originally introduced to ensure that the generated module recompiled at the correct times:

[https://github.com/dashbitco/mox/issues/23](https://github.com/dashbitco/mox/issues/23)

A generated `@behaviour` line was added later, and without disturbing the existing line:

[https://github.com/dashbitco/mox/pull/90](https://github.com/dashbitco/mox/pull/90)

---

_[View the full topic](https://forum.elixirforum.com/t/need-help-understanding-some-mox-source-code/49139)._
