From: Matt S Trout Date: Fri, 14 Feb 2014 21:20:12 +0000 (+0000) Subject: eval cage for the shell X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FDKit.git;a=commitdiff_plain;h=a57a26e3c34837c2439b8a294da00ee66c93527b eval cage for the shell --- diff --git a/bin/dx-shell b/bin/dx-shell index b320133..5a61588 100644 --- a/bin/dx-shell +++ b/bin/dx-shell @@ -99,7 +99,9 @@ my $cmd; while (defined(my $line = $rl->readline(length($cmd)?'> ':'$ '))) { $cmd .= "${line}\n"; if ($tcl->call(info => complete => $cmd)) { - $tcl->Eval($cmd); + unless (eval { $tcl->Eval($cmd); 1 }) { + warn $@; + } $cmd = ''; } }