Using references from the shell?

Massimo Cesaro massimo.cesaro@REDACTED
Wed Aug 20 09:08:39 CEST 2003


Hi,
this is my first post on this list, but we studying/learning/using
Erlang since June. 
We are developing a softswitch application using Erlang and OTP and me
and my team are really amazed of what we can accomplish using this
wonderful middleware in record time. 
Several of modules in the application have functions taking references
(created with make_ref()) as parameters. I'd like to test those
functions manually, using the Erlang shell, but the shell parser balks
when I try to input a reference by hand. I.e.

153> otr:connect(Source, Dest, #Ref<0.0.0.4363>, bridge).
** 1: syntax error before: Ref **

I tried several variations on the theme, with the same result.

In this case, the reference value I'm using was generated internally by
another module (using make_ref()), and stored in an ets table. I should
check for reference value equality.
I understand that what I see in the shell is just  a "rendering" of the
real reference (I read a former thread in this list about the real
format of references, courtesy of Rickard Green).
The question is, can I handle references from the shell, or am I
supposed to write a test module and pass references as opaque values?

Thanks,
Massimo Cesaro - Eidetix





More information about the erlang-questions mailing list