Calling internal functions - foo::bar() ?

Sean Hinde <>
Mon Feb 28 23:48:07 CET 2005


On 28 Feb 2005, at 22:13, Luke Gorrie wrote:

> Hi,
>
> I have an Erlang feature request: I'd like to be able to call
> unexported functions of modules from the Erlang shell.
>
> For example, if I have a module like:
>
>   -module(foo).
>   -export([a/0]).
>   a() -> a.
>   b() -> b.
>
> Then I would like to be able to do this /just/ in the Erlang shell:
>
>   1> foo::b().
>   b
>
> This is intended to /avoid/ seedy bad-software-engineering hacks.

Seconded.

> P.S., who can beat this?
>
>      $ find . -name "*.erl" | wc -l
>      813
>
> $ find . -name "*.erl" | xargs grep '^-compile(export_all)' | wc -l
>      323
>      $ echo $[ 323 * 100 / 813 ]
>      39

$ find . -name "*.erl" | wc -l
      857
$ find . -name "*.erl" | xargs grep '^-compile(export_all)' | wc -l
      175
$ echo $[175 * 100 / 857]
      20

I'm shocked.

Sean




More information about the erlang-questions mailing list