|
|
| Author |
Message |
< User Contributions ~ lfun - evaluates non-exported functions |
| uwiger |
Posted: Fri Jun 15, 2007 8:49 pm |
|
|
|
User
Joined: 03 Jul 2006
Posts: 604
Location: Sweden
|
This module allows for evaluation of local functions in any module as long as there is 'debug_info' present in the corresponding beam file.
For those times when you really want to test a local function from the shell, and cannot recompile the module.
Example:
Code:
Eshell V5.5.4.3 (abort with ^G)
1> lfun:eval(lists,sublist_2, [[1,2,3,4,5],2]).
[1,2]
2> erlang:function_exported(lists,sublist_2,2).
false
3> Abst = lfun:load_abstract(lists).
{lfun,
lists,
{dict,
...}}
4> lfun:eval(lists,sublist_2, [[1,2,3,4,5],2], Abst).
[1,2]
[/code] |
| Description: |
|
 Download |
| Filename: |
lfun.erl |
| Filesize: |
3.55 KB |
| Downloaded: |
1240 Time(s) |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
|