Mercurial Hosting > luan
comparison core/src/luan/modules/Hosting.luan @ 321:7f7708e8fdd4
remove import statement
git-svn-id: https://luan-java.googlecode.com/svn/trunk@322 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sun, 08 Feb 2015 07:26:20 +0000 |
parents | 38bd29e59a6e |
children |
comparison
equal
deleted
inserted
replaced
320:fed1893821bf | 321:7f7708e8fdd4 |
---|---|
1 -- Hosting | 1 -- Hosting |
2 | 2 |
3 import "luan:Io" | 3 local Io = require "luan:Io" |
4 | 4 |
5 port = 9101 | 5 port = 9101 |
6 | 6 |
7 function put_site(domain,password,dir) | 7 function put_site(domain,password,dir) |
8 local socket = "socket:" .. domain .. ":" .. port | 8 local socket = "socket:" .. domain .. ":" .. port |
9 local pc = Io.Uri(socket).Pickle_client() | 9 local pc = Io.Uri(socket).Pickle_client() |
10 local pickle = pc.pickle | 10 local pickle = pc.pickle |
11 pc.call(%> | 11 pc.call(%> |
12 import "luan:Hosting" | 12 local Hosting = require "luan:Hosting" |
13 Hosting.do_put_site(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) | 13 Hosting.do_put_site(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) |
14 <%) | 14 <%) |
15 pc.close() | 15 pc.close() |
16 end | 16 end |
17 | 17 |
18 function delete_site(domain,password) | 18 function delete_site(domain,password) |
19 local socket = "socket:" .. domain .. ":" .. port | 19 local socket = "socket:" .. domain .. ":" .. port |
20 local pc = Io.Uri(socket).Pickle_client() | 20 local pc = Io.Uri(socket).Pickle_client() |
21 local pickle = pc.pickle | 21 local pickle = pc.pickle |
22 pc.call(%> | 22 pc.call(%> |
23 import "luan:Hosting" | 23 local Hosting = require "luan:Hosting" |
24 Hosting.do_delete_site(<%=pickle(domain)%>,<%=pickle(password)%>) | 24 Hosting.do_delete_site(<%=pickle(domain)%>,<%=pickle(password)%>) |
25 <%) | 25 <%) |
26 pc.close() | 26 pc.close() |
27 end | 27 end |