[LON-CAPA-cvs] cvs: loncom /xml run.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 24 May 2002 16:48:51 -0000
albertel Fri May 24 12:48:51 2002 EDT
Modified files:
/loncom/xml run.pm
Log:
- local variable declations override the global ones, don't use $i as a local counter.BUG#471
Index: loncom/xml/run.pm
diff -u loncom/xml/run.pm:1.29 loncom/xml/run.pm:1.30
--- loncom/xml/run.pm:1.29 Thu May 23 17:15:34 2002
+++ loncom/xml/run.pm Fri May 24 12:48:50 2002
@@ -1,6 +1,6 @@
package Apache::run;
#
-# $Id: run.pm,v 1.29 2002/05/23 21:15:34 albertel Exp $
+# $Id: run.pm,v 1.30 2002/05/24 16:48:50 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,11 +29,10 @@
$Apache::run::EVALUATE_STRING=<<'ENDEVALUATE';
my %_LONCAPA_INTERNAL_oldexpressions=();
- my $i=0;
while (!$_LONCAPA_INTERNAL_oldexpressions{$_}) {
$_LONCAPA_INTERNAL_oldexpressions{$_}=1;
$_ =~s/((?:\$|\&)(?:[\#|\$]*[A-Za-z][\w]*|\{[A-Za-z][\w]*\}))([\[\{][^\$\&\]\}]+[\]\}])*?(\([^\$\&\)]+\))*?(?=[^\[\{\(]|$)/eval(defined(eval($1.$2))?eval('$1.$2.$3'):'$1.$2.$3')/seg;
- if ($i++ > 10 ) { last; }
+ if (scalar(values(%_LONCAPA_INTERNAL_oldexpressions))>10) {last;}
}
ENDEVALUATE