[erlang-questions] Start module

Adam Lindberg adam@REDACTED
Wed Apr 4 15:03:15 CEST 2007


Another thing you might want to look at is to make an OTP application
of your code. Then you can start and stop your project / application
and do special init stuff.

Check out applications under:
http://erlang.org/doc/doc-5.5.4/doc/design_principles/part_frame.html

Cheers!
Adam

On 4/1/07, Lennart Ohman <lennart.ohman@REDACTED> wrote:
> Hi Fredrik,
> I am not sure if I now answer something in the middle of a
> thread, but unless you have done something to your Erlang
> system, modules are automatically loaded on demand. The l/1
> shell function you are referring to is only necessary if you
> want to reload the module (like after you have a bew better
> version available).
>
> If reloading modules in runtime *is* what you want to do and
> you want it to be done in som "automagic" way, you need to
> look at the API of 'code'. What you will be doing in that case
> is actually building a kind of release handler, and requires
> understanding of the new/old code concepts.
>
> Best Regards
>
> Lennart
>
> -------------------------------------------------------------
> Lennart Ohman                   office  : +46-8-587 623 27
> Sjoland & Thyselius Telecom AB  cellular: +46-70-552 67 35
> Hälsingegatan 43, 10tr          fax     : +46-8-667 82 30
> SE-113 31, STOCKHOLM, SWEDEN    email   : lennart.ohman@REDACTED
> > -----Original Message-----
> > From: erlang-questions-bounces@REDACTED [mailto:erlang-questions-
> > bounces@REDACTED] On Behalf Of Fredrik Hoback
> > Sent: Sunday, April 01, 2007 11:21 AM
> > To: erlang-questions@REDACTED
> > Subject: [erlang-questions] Start module
> >
> > Hi, I have a project that I'm working on which consists of several
> > modules. These has to be loaded ( l(my_module). ) and started in a special
> > order. Since I have 5 modules it is cumbersome to do this every time. Is
> > it possible to construct a new module that does this? It should first load
> > some modules then start them?
> > ------------------------------------
> > Fredrik Hoback
> > fredrik.hoback@REDACTED
> >
> >
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
--
Adam Lindberg
Software Developer

Erlang Training and Consulting Ltd
401 Fruit and Wool Exchange,
Brushfield Street, London,
E1 6EL, United Kingdom
Company Registration 3893360 VAT Number GB 752 1091 57
Tel +44 207 456 1020
Fax +44 870 1390 779
Mobile +44 7960 726 016
Email adam@REDACTED




More information about the erlang-questions mailing list