File:  [LON-CAPA] / loncom / xml / Attic / default_xml.lcpm
Revision 1.1: download - view: text, annotated - select for diffs
Tue Nov 14 22:24:38 2000 UTC (23 years, 7 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
- new Apache::run::evaluate() still has quoting problems.

These probably can be gotten around by safe->share()ing a var?

sub evaluate {
  ($_)=@_;  
  my %oldexpressions=();
  while (!$oldexpressions{$_}) {
    $oldexpressions{$_}=1;
    $_ =~s/((?:\$|\&)(?:[\#|\$]*[A-Za-z][\w]*|\{[A-Za-z][\w]*\}))([\[|\{][\w\'\"]+[\]\}])*?(\([\w\'\"]+\))*?(?=[^\[\{\(]|$)/eval(defined(eval($1.$2))?eval('$1.$2.$3'):'$1.$2.$3')/seg;
  }
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>