[erlang-bugs] Documentation of beam_lib:version/1 is inaccurate?
Rabbe Fogelholm
rabbe.fogelholm@REDACTED
Thu Sep 5 14:35:41 CEST 2013
According to the OTP documentation I should be able to do e. g.
beam_lib:version(lists).
However, it seems that an atom representing a module is not accepted
as argument. My workaround is
BeamFile = code:which(lists), beam_lib:version(BeamFile).
Console dump:
$ erl
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V5.10.2 (abort with ^G)
1> beam_lib:version(lists).
{error,beam_lib,{file_error,"lists.beam",enoent}}
2> BeamFile = code:which(lists), beam_lib:version(BeamFile).
{ok,{lists,[329984570326751442388870353176450263952]}}
____________________________________
Rabbe Fogelholm, Ericsson, Stockholm
More information about the erlang-bugs
mailing list