finding exported clauses

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

finding exported clauses

Tom Whitcomb
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.

__________________________________________________________________
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


Reply | Threaded
Open this post in threaded view
|

finding exported clauses

Raimo Niskanen-3

Module:module_info().
Module:module_info(exports).


thomaswhitcomb (Tom Whitcomb) writes:

> 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.
>
> __________________________________________________________________
> 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

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


Reply | Threaded
Open this post in threaded view
|

finding exported clauses

Matthias Lang-2
In reply to this post by Tom Whitcomb
Tom Whitcomb writes:

 > getExportedClauses(Module) -> [clause]
 > getExportedClauses() -> [{module,clause}]

try

  Module:module_info()
  Module:module_info(exports)

e.g.

  io:module_info(exports).

see also

  code:all_loaded()

Matthias


Reply | Threaded
Open this post in threaded view
|

finding exported clauses

Michał Ptaszek
In reply to this post by Tom Whitcomb
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>


Reply | Threaded
Open this post in threaded view
|

finding exported clauses

Michał Ptaszek
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