--- loncom/xml/run.pm 2006/03/16 15:47:37 1.58 +++ loncom/xml/run.pm 2012/12/18 18:27:43 1.61 @@ -1,6 +1,6 @@ package Apache::run; # -# $Id: run.pm,v 1.58 2006/03/16 15:47:37 albertel Exp $ +# $Id: run.pm,v 1.61 2012/12/18 18:27:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -135,7 +135,7 @@ sub run { } my $errormsg='
'.&HTML::Entities::encode($error,'<>&"').' '. &HTML::Entities::encode($innererror,'<>&"'). - 'occured while running
'; + 'occurred while running
'; $code=&HTML::Entities::encode($code,'<>&"'); if ($innererror=~/line (\d+)/) { my $linenumber=$1; @@ -168,11 +168,11 @@ sub dump { $line.='$'.$symname.'='.$safeeval->reval('$'.$symname)."\n"; } } - if ($safeeval->reval('defined(@'.$symname.')')) { + if ($safeeval->reval('@'.$symname)) { $line.='@'.$symname.'=('. $safeeval->reval('join(",",@'.$symname.')').")"."\n"; } - if ($safeeval->reval('defined(%'.$symname.')')) { + if ($safeeval->reval('%'.$symname)) { $line.='%'.$symname.'=('; $line.=$safeeval->reval('join(",",map { $_."=>".$'. $symname.'{$_} } sort keys %'. @@ -191,3 +191,29 @@ sub dump { 1; __END__; + +=pod + +=head1 NAME + +Apache::run.pm + +=head1 SYNOPSIS + +Used to prevent poorly written problems from +causing lingering after effects + +This is part of the LearningOnline Network with CAPA project +described at http://www.lon-capa.org. + + +=head1 NOTABLE SUBROUTINES + +=over + +=item run(), dump(), evaluate() + +=back + +=cut +