version 1.13, 2000/11/20 17:34:05
|
version 1.14, 2001/01/04 19:14:10
|
Line 53 sub run {
|
Line 53 sub run {
|
my ($code,$safeeval) = @_; |
my ($code,$safeeval) = @_; |
# print "inside run\n"; |
# print "inside run\n"; |
$@=''; |
$@=''; |
my $result=$safeeval->reval($code); |
my (@result)=$safeeval->reval($code); |
if ($@ ne '') { |
if ($@ ne '') { |
&Apache::lonxml::error(":$code:caused"); |
&Apache::lonxml::error(":$code:caused"); |
&Apache::lonxml::error($@); |
&Apache::lonxml::error($@); |
} |
} |
return $result; |
if ( $#result < '1') { |
|
return $result[0]; |
|
} else { |
|
&Apache::lonxml::debug("<b>Got lots results</b>:$#result:"); |
|
return (@result); |
|
} |
} |
} |
|
|
1; |
1; |