Message from discussion
Copy function from one Module to another
Received: by 10.205.130.14 with SMTP id hk14mr1905674bkc.5.1344958122040;
Tue, 14 Aug 2012 08:28:42 -0700 (PDT)
X-BeenThere: erlang-programming@googlegroups.com
Received: by 10.204.7.203 with SMTP id e11ls444082bke.8.gmail; Tue, 14 Aug
2012 08:28:41 -0700 (PDT)
Received: by 10.204.10.88 with SMTP id o24mr1905726bko.0.1344958121666;
Tue, 14 Aug 2012 08:28:41 -0700 (PDT)
Received: by 10.204.10.88 with SMTP id o24mr1905725bko.0.1344958121640;
Tue, 14 Aug 2012 08:28:41 -0700 (PDT)
Return-Path: <erlang-questions-boun...@erlang.org>
Received: from hades.cslab.ericsson.net (hades.cslab.ericsson.net. [192.121.151.104])
by gmr-mx.google.com with ESMTP id k7si665116bks.2.2012.08.14.08.28.41;
Tue, 14 Aug 2012 08:28:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) client-ip=192.121.151.104;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) smtp.mail=erlang-questions-boun...@erlang.org; dkim=neutral (body hash did not verify) header...@gmail.com
Received: from hades.cslab.ericsson.net (hades [192.121.151.104])
by hades.cslab.ericsson.net (Postfix) with ESMTP id 3A06A5C0E1;
Tue, 14 Aug 2012 17:28:36 +0200 (CEST)
X-Original-To: erlang-questi...@erlang.org
Delivered-To: erlang-questi...@erlang.org
Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com
[209.85.160.181])
by hades.cslab.ericsson.net (Postfix) with ESMTP id 2078E5C011
for <erlang-questi...@erlang.org>; Tue, 14 Aug 2012 17:28:34 +0200 (CEST)
Received: by ghz3 with SMTP id 3so676638ghz.40
for <erlang-questi...@erlang.org>; Tue, 14 Aug 2012 08:28:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:cc:content-type;
bh=pdgditD92sa7/F7XVsZC+iibc4TWxAdtaN0I4NkHl18=;
b=I8rX8DyECyWP4QwZCXpZtDkpkvtdzqYVSifrZPf8FG6SY5WovDG+LZdRWsnxKckHpV
Q/6fZW4YxJg8UJUZVav+BA2Y+yKf2ozUNNlTTZWQUukhRWTxsG2oqaJm7Imu71mAI/HP
KiDB0MxhKKYjsUq5Z2KKtfbzXrG+o86CB2fp4hRoPqxf/GuabvopXBp7pKE7NiqYW5O1
a8pIP/GwaRiMoM4104NlZ31CjcjfXMQyZWzHS36AHn9EGf3jcgxBfN20RdcsF4BMExfV
G6zIfsbGWCDft9cL4sRV6ccVWAetj/SFRWLnsuyJfHBelP6TjD2twtiwtFlX6GljIjFL
GXcQ==
MIME-Version: 1.0
Received: by 10.50.100.129 with SMTP id ey1mr12174711igb.35.1344958112750;
Tue, 14 Aug 2012 08:28:32 -0700 (PDT)
Received: by 10.42.224.4 with HTTP; Tue, 14 Aug 2012 08:28:32 -0700 (PDT)
In-Reply-To: <CABSD_pYe_=YBwtspYFeTrXwWhTKd_7pV6-iTRba6j-3fML2...@mail.gmail.com>
References: <CALGEZ2dp5MwLJofaFvJqf0L3pxgJDS6jSz=dZMTpj1nFqbA...@mail.gmail.com>
<CAPTXyXdKrd3CBxP5WdD9L2f+bGjX7TM4Gx2e=tOnpthaLNy...@mail.gmail.com>
<CALGEZ2ci+GsK20GMgSAZiRbfoW=PuvwbwBxtUPvJU-Ew+fv...@mail.gmail.com>
<CABSD_pYe_=YBwtspYFeTrXwWhTKd_7pV6-iTRba6j-3fML2...@mail.gmail.com>
Date: Tue, 14 Aug 2012 17:28:32 +0200
Message-ID: <CALGEZ2dwsfxUJV0aiVTJc-wOSGQ-eDS900Ab_gfwcbRciqF...@mail.gmail.com>
From: Tyron Zerafa <tyron.zer...@gmail.com>
To: Siraaj Khandkar <sir...@khandkar.net>
Cc: erlang-questi...@erlang.org, Jesse Gumm <g...@sigma-star.com>
Subject: Re: [erlang-questions] Copy function from one Module to another
X-BeenThere: erlang-questi...@erlang.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: General Erlang/OTP discussions <erlang-questions.erlang.org>
List-Unsubscribe: <http://erlang.org/mailman/options/erlang-questions>,
<mailto:erlang-questions-requ...@erlang.org?subject=unsubscribe>
List-Archive: <http://erlang.org/pipermail/erlang-questions>
List-Post: <mailto:erlang-questi...@erlang.org>
List-Help: <mailto:erlang-questions-requ...@erlang.org?subject=help>
List-Subscribe: <http://erlang.org/mailman/listinfo/erlang-questions>,
<mailto:erlang-questions-requ...@erlang.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============7134800602711546598=="
Errors-To: erlang-questions-boun...@erlang.org
Sender: erlang-questions-boun...@erlang.org
--===============7134800602711546598==
Content-Type: multipart/alternative; boundary=e89a8f3b9c118c5bdb04c73b7611
--e89a8f3b9c118c5bdb04c73b7611
Content-Type: text/plain; charset=ISO-8859-1
I was thinking about the latter where I will collect all functions in a
record and send that.
The problem is that I will have to come up with a way to extract a function
form a module, that is why I was checking out whether there is anything
already implemented in Erlang.
On Tue, Aug 14, 2012 at 5:25 PM, Siraaj Khandkar <sir...@khandkar.net>wrote:
> How about sending a message with a fun? Or collecting desired funs in
> a record and sending that?
>
>
> On Tue, Aug 14, 2012 at 11:15 AM, Tyron Zerafa <tyron.zer...@gmail.com>
> wrote:
> >
> > Hey Jesse
> > I need something stronger than just import. I need to put a bunch of
> > functions from different modules into a single one and transfer this to a
> > remote node. Then I want to be able to use these functions from the
> remote
> > node.
> > If I simply use import, I will not be able to use them on the remote node
> > without explicitly transferring all the modules to which the functions
> > belong to.
> >
> >
> > On Tue, Aug 14, 2012 at 5:10 PM, Jesse Gumm <g...@sigma-star.com> wrote:
> >>
> >> That sounds like you're looking for
> >>
> >> -import(Module, Functions).
> >>
> >> http://www.erlang.org/doc/reference_manual/modules.html
> >>
> >> --
> >> Jesse Gumm
> >> Owner, Sigma Star Systems
> >> 414.940.4866 || sigma-star.com || @jessegumm
> >>
> >> On Aug 14, 2012 9:56 AM, "Tyron Zerafa" <tyron.zer...@gmail.com> wrote:
> >>>
> >>> Hey all,
> >>> Is there any mechanism in Erlang which I can use to copy functions
> >>> from one module to another? So, if I have module A containing
> functions a, b
> >>> and c, is there any way in which I can copy a to module B?
>
--
Best Regards,
Tyron Zerafa
--e89a8f3b9c118c5bdb04c73b7611
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I was thinking about the latter where I will collect all functions in a rec=
ord and send that.<div>The problem is that I will have to come up with a wa=
y to extract a function form a module, that is why I was checking out wheth=
er there is anything already implemented in Erlang.=A0<br>
<br><div class=3D"gmail_quote">On Tue, Aug 14, 2012 at 5:25 PM, Siraaj Khan=
dkar <span dir=3D"ltr"><<a href=3D"mailto:sir...@khandkar.net" target=3D=
"_blank">sir...@khandkar.net</a>></span> wrote:<br><blockquote class=3D"=
gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-=
left:1ex">
How about sending a message with a fun? Or collecting desired funs in<br>
a record and sending that?<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
<br>
On Tue, Aug 14, 2012 at 11:15 AM, Tyron Zerafa <<a href=3D"mailto:tyron.=
zer...@gmail.com">tyron.zer...@gmail.com</a>> wrote:<br>
><br>
> Hey Jesse<br>
> =A0 =A0 I need something stronger than just import. I need to put a bu=
nch of<br>
> functions from different modules into a single one and transfer this t=
o a<br>
> remote node. Then I want to be able to use these functions from the re=
mote<br>
> node.<br>
> If I simply use import, I will not be able to use them on the remote n=
ode<br>
> without explicitly transferring all the modules to which the functions=
<br>
> belong to.<br>
><br>
><br>
> On Tue, Aug 14, 2012 at 5:10 PM, Jesse Gumm <<a href=3D"mailto:gumm=
@sigma-star.com">g...@sigma-star.com</a>> wrote:<br>
>><br>
>> That sounds like you're looking for<br>
>><br>
>> -import(Module, Functions).<br>
>><br>
>> <a href=3D"http://www.erlang.org/doc/reference_manual/modules.html=
" target=3D"_blank">http://www.erlang.org/doc/reference_manual/modules.html=
</a><br>
>><br>
>> --<br>
>> Jesse Gumm<br>
>> Owner, Sigma Star Systems<br>
>> <a href=3D"tel:414.940.4866" value=3D"+14149404866">414.940.4866</=
a> || <a href=3D"http://sigma-star.com" target=3D"_blank">sigma-star.com</a=
> || @jessegumm<br>
>><br>
>> On Aug 14, 2012 9:56 AM, "Tyron Zerafa" <<a href=3D"m=
ailto:tyron.zer...@gmail.com">tyron.zer...@gmail.com</a>> wrote:<br>
>>><br>
>>> Hey all,<br>
>>> =A0 =A0 Is there any mechanism in Erlang which I can use to co=
py functions<br>
>>> from one module to another? So, if I have module A containing =
functions a, b<br>
>>> and c, is there any way in which I can copy a to module B?<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
Best Regards,<div>Tyron Zerafa</div><br>
</div>
--e89a8f3b9c118c5bdb04c73b7611--
--===============7134800602711546598==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
--===============7134800602711546598==--