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

Luke Gorrie luke.gorrie@REDACTED
Thu Jun 7 11:54:32 CEST 2007


"Christian S" <chsu79@REDACTED> writes:

> 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.)

I have posted a working implementation of this to the list a couple of
years ago: a parse_transform to return the {Name,Arity,Fun} list and
an update to erl_eval to use it automatically from the shell.

I was alluding to this here:

>> 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.




More information about the erlang-questions mailing list