[erlyweb] private component functions

1 view
Skip to first unread message

Alexander Dergachev

unread,
Dec 7, 2008, 6:50:16 PM12/7/08
to erl...@googlegroups.com
Hi all!

Actually I have a little experience with Erlyweb, and I`m going to make my first live project.

As far as I understand from documentation I can declare for private usage only whole module (component), but the question is - is it possible to have some private functions in the module instead of private module?


Thanks in advance!

--
With Best Regards,
Alexander Dergachev

Yariv Sadan

unread,
Dec 8, 2008, 10:51:07 PM12/8/08
to erl...@googlegroups.com
Yeah, sure, simply don't export the functions. In other words, use an
-export() directive at the top of the file with only the public
functions of a module.

Alexander Dergachev

unread,
Dec 9, 2008, 2:58:16 AM12/9/08
to erl...@googlegroups.com
Hm... I think it`s my fault, but actually I want to call some "private" function from another module by {ewc, ...}, but I woud like nobody can call these functions by site.domain/module/funcname... I hope I was clear... =)

Thanks in advance!

Alexander Dergachev

unread,
Dec 9, 2008, 4:13:13 PM12/9/08
to erlyweb
I guess I`ve found solution for my case...
I`ll make one component for the public access (for example /main or
something else, it depends of my future structure of the site), and
everything else will be private. By this way, the public component
will be used for containing all another components by {ewc...} way.
Nobody will access to any components except the main one.

I think it will be best solution for me :)

Any remarks? :)
Reply all
Reply to author
Forward
0 new messages