|
|
| Author |
Message |
< Erlyweb mailing list ~ Sharing controller files across multiple apps |
| colm |
Posted: Tue Oct 14, 2008 7:25 pm |
|
|
|
User
Joined: 19 May 2008
Posts: 33
|
Hi,
If I have 2 apps, "foo" and "bar" which differ in many ways but both
have the same login_controller.erl (although different login_views)
then I'd like to not duplicate the source file in both apps, however
as I understand it erlyweb needs source files to live in an explicit
directory structure ($appname/src/components) so (AIUI) I can't just
move login_controller.erl out to a common location and add the ebin to
the path because then the erlyweb:compile won't find it. Is that
correct? Or am I missing something.
If that is correct, then is there a good way to get around this? I
don't want to use symlinks for reasons I won't go into. I thought
about having login_controller.erl just be a thin wrapper around some
common functions but I would still have to remember to update the
wrapper if I added any new methods.
I guess what I'm asking is: is there any way to tell erlyweb compile
to consider files in multiple directories as belonging to a given
app. Or more generally: is there another way around this?
Thanks,
Colm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Oct 15, 2008 4:28 am |
|
|
|
Guest
|
There's no way to do this now. I don't think would be too hard to tell
erlyweb:compile() to look in additional directories besides the source
directory. Feel like implementing it?
On Tue, Oct 14, 2008 at 12:24 PM, Colm <colm.dougan@gmail.com> wrote:
>
> Hi,
>
> If I have 2 apps, "foo" and "bar" which differ in many ways but both
> have the same login_controller.erl (although different login_views)
> then I'd like to not duplicate the source file in both apps, however
> as I understand it erlyweb needs source files to live in an explicit
> directory structure ($appname/src/components) so (AIUI) I can't just
> move login_controller.erl out to a common location and add the ebin to
> the path because then the erlyweb:compile won't find it. Is that
> correct? Or am I missing something.
>
> If that is correct, then is there a good way to get around this? I
> don't want to use symlinks for reasons I won't go into. I thought
> about having login_controller.erl just be a thin wrapper around some
> common functions but I would still have to remember to update the
> wrapper if I added any new methods.
>
> I guess what I'm asking is: is there any way to tell erlyweb compile
> to consider files in multiple directories as belonging to a given
> app. Or more generally: is there another way around this?
>
> Thanks,
> Colm
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post received from mailinglist |
|
|
| 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 cannot download files in this forum
|
|
|