[erlang-questions] New module syntax and semantics?
Pablo Polvorin
pablo.polvorin@REDACTED
Sun Jun 29 23:21:53 CEST 2008
seems to be using parameterized modules
http://www.erlang.se/workshop/2003/paper/p29-carlsson.pdf
2008/6/29, Tom Ayerst <tom.ayerst@REDACTED>:
> Is was looking at the mochiweb code and I saw some oddities.
>
> firstly the module statement:
> -module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]).
>
> In the use of mochiweb I can see things like Req:get(method).
>
> This looks more like an object method call, is this new? I cannot see an
> docs about it.
>
> Thanks for any info.
>
> Tom Ayerst
>
> In the example Req ={mochiweb_request,#Port<0.142>,'GET',
> "/",
> {1,1},
> {9,
> {"host",
> {'Host',"127.0.0.1:8888"},
> {"accept",
> {'Accept',
>
> "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
> nil,
> {"accept-language",
> {'Accept-Language',
> "en-gb,en;q=0.5"},
> {"accept-encoding",
> {'Accept-Encoding',
> "gzip,deflate"},
> {"accept-charset",
> {'Accept-Charset',
>
> "ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
> nil,nil},
> nil},
> {"connection",
> {'Connection',"keep-alive"},
> {"cache-control",
>
> {'Cache-Control',"max-age=0"},
> nil,nil},
> nil}}},
> {"user-agent",
> {'User-Agent',
> "Mozilla/5.0 (Windows; U;
> Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0"},
> {"keep-alive",
> {'Keep-Alive',"300"},
> nil,nil},
> nil}}}}
>
--
--
pablo
http://ppolv.wordpress.com
----
More information about the erlang-questions
mailing list