[erlang-bugs] odd rr behaivor
Hans Bolinder
hans.bolinder@REDACTED
Mon Nov 12 13:39:22 CET 2007
[Matthew O'Gorman:]
> I wouldn't necessarily call this a bug, but it seems rr does not allow
> for passing an atom to it in the same way, for example
>
> 1> ls().
> mog.hrl
> ok
> 2> rr(mog).
> {error, nofile}
> 3>rr("mog").
> []
> 4>rr("mog.hrl").
> [test]
> ...
Hi,
Sorry for not answering sooner.
rr(Atom) is essentially the same as rr(code:which(Atom)).
Instead of 'rr("long_path_to_a_header_file")' it is often convenient to
call 'rr(Module)' (Module an atom) where Module includes the header file.
An example: instead of
rr("/usr/local/lib/erlang/lib/xmerl-1.1.5/include/xmerl.hrl").
one can do
rr(xmerl).
Best regards,
Hans Bolinder, Erlang/OTP
More information about the erlang-bugs
mailing list