comparison http/src/luan/modules/http/Shell_mod.luan @ 694:b620b8e1010f

remove Luan.load() allow_expression param and add Luan.eval()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 20 Apr 2016 20:56:08 -0600
parents ca169567ce07
children
comparison
equal deleted inserted replaced
693:ca169567ce07 694:b620b8e1010f
28 end 28 end
29 end 29 end
30 print( "% "..cmd ) 30 print( "% "..cmd )
31 try { 31 try {
32 function() 32 function()
33 local line = load(cmd,"<web_shell>",M.env,true) 33 local line
34 try {
35 function()
36 line = load("return "..cmd,"<web_shell>",M.env)
37 end
38 catch = function(e)
39 line = load(cmd,"<web_shell>",M.env)
40 end
41 }
34 print( line() ) 42 print( line() )
35 end; 43 end
36 catch = function(e) 44 catch = function(e)
37 Io.print_to(Io.stderr,e) 45 Io.print_to(Io.stderr,e)
38 print(e) 46 print(e)
39 end; 47 end
40 } 48 }
41 end 49 end
42 end 50 end
43 51
44 Io.stdout = Http.response.text_writer() 52 Io.stdout = Http.response.text_writer()