[erlang-questions] I need to call unexported functions from the erlang shell

Christian S chsu79@REDACTED
Thu Jun 7 11:51:12 CEST 2007


You dont provide any suggestion on how to accomplish this without
changing the distinction between exported/unexported drastically.

One immediate thought I had was if module_info(unexported) could
return a {Name, Fun} list, and the shell had some shorthand hack to
turn
Mod::Fun(...) into a call to one of these. (Then people will begin to
ask why one
cant do this in non-shell.)



On 6/7/07, Luke Gorrie <luke.gorrie@REDACTED> wrote:
> Howdy,
>
> Just a friendly reminder -
>
> I need to be able to call unexported functions from the Erlang shell.
> I need to do this in lots of contexts - simple experimenting,
> late-night troubleshooting on live networks, etc. This is not a
> personal quirk, it's the nature of the work that we do at Synapse.
>
> I would very much like a better way to accomplish this than adding
> -compile(export_all) to all the modules, which is what we do today.
> I hope one day Erlang adds a better option.
>
> I have previously posted a parse_transform that creates a "back door"
> for calling unexported functions and a patch to R9's erl_eval to use
> it for the shell. This would be perfectly adequate except that I don't
> like to use parse_transforms and interpreter hacks in production
> systems and so we don't deploy this code on customer installations.
>
> I know that there are implications for the compiler etc but these are
> implementation details separate from the real-life requirement.
>
> Cheers,
> -Luke
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list