comparison http/src/luan/modules/http/Shell_mod.luan @ 554:18504c41b0be

move debug() to Io and remove Debug module; Io.print() now doesn't print newline if there is nothing to be printed;
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 18 Jun 2015 03:30:18 -0600
parents 342964519194
children 2f39468680be
comparison
equal deleted inserted replaced
553:b1256e2d19a3 554:18504c41b0be
1 local Luan = require "luan:Luan" 1 local Luan = require "luan:Luan"
2 local ipairs = Luan.ipairs 2 local error = Luan.error
3 local load = Luan.load 3 local ipairs = Luan.ipairs or error()
4 local try = Luan.try 4 local load = Luan.load or error()
5 local try = Luan.try or error()
5 local Io = require "luan:Io" 6 local Io = require "luan:Io"
6 local print = Io.print 7 local print = Io.print or error()
7 local Debug = require "luan:Debug"
8 local Http = require "luan:http/Http" 8 local Http = require "luan:http/Http"
9 local Html = require "luan:Html" 9 local Html = require "luan:Html"
10 10
11 local M = {} 11 local M = {}
12 12
27 end 27 end
28 print( "% "..cmd ) 28 print( "% "..cmd )
29 try { 29 try {
30 function() 30 function()
31 local line = load(cmd,"<web_shell>",M.env,true) 31 local line = load(cmd,"<web_shell>",M.env,true)
32 Debug.print_if_something( line() ) 32 print( line() )
33 end; 33 end;
34 catch = function(e) 34 catch = function(e)
35 Io.print_to(Io.stderr,e) 35 Io.print_to(Io.stderr,e)
36 print(e) 36 print(e)
37 end; 37 end;