finding exported clauses

Tom Whitcomb <>
Fri Dec 9 20:33:09 CET 2005


Thanks for the 'erlang:loaded/1' hint.  

I can now follow loaded/1 up with Module:module_info(exports) and get programmatic access to all the exported clauses. :-)

tom

Rohini V <> wrote:

>Can try erlang:loaded().
>It lists all loaded Erlang modules.
>
>To check the exported functions, try
>m(modulename).
>
>-----Original Message-----
>From: Michael McDaniel [mailto:]
>Sent: Thursday, December 08, 2005 10:12 PM
>To: 
>Subject: Re: finding exported clauses
>
>
>On Wed, Dec 07, 2005 at 12:44:04AM -0800, Michael McDaniel wrote:
>> On Tue, Dec 06, 2005 at 08:31:21PM -0500, Tom Whitcomb wrote:
>> > Hi,
>> >
>> > Is there a way I find the exported clauses and their modules in an
>erlang shell environment.  Maybe something like:
>> >
>> > getExportedClauses(Module) -> [clause]
>> > getExportedClauses() -> [{module,clause}]
>> >
>> > thanks for the help.
>> >
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> look at documentation for modules shell, code, c
>>
>> erl> rp(code:all_loaded()).
>>
>> erl> c:m(code).
>>
>>
>> ~Michael
>>
>>
>> <znip>
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>I never saw that my first reply came through to the list.
>It does include a bit of info I had not read in the other
>responses so I have sent it again.
>
>
>~Michael
>Portland, Oregon, USA
>
>
>
>
>

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp



More information about the erlang-questions mailing list