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

Thomas Lindgren thomasl_erlang@REDACTED
Thu Jun 7 13:59:10 CEST 2007


--- Luke Gorrie <luke.gorrie@REDACTED> wrote:

> 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'm not sure about what you are trying to accomplish
here, but a simple way to export all functions without
showing it in the source code is to pass +export_all
to erlc. That way, you can keep the source pristine,
disable the option for various static checking, and so
on, and still get to call the nominally hidden stuff.

If you're looking for something more clever, then I
think it could be a good idea to permit multiple
exported interfaces. In some cases, I have services
with multiple kinds of clients, which should use
different facets. But it could also be used for
troubleshooting; for instance, a hypothetical "debug"
interface could provide 'all functions'.

Best,
Thomas



       
____________________________________________________________________________________
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php



More information about the erlang-questions mailing list