From: jj v. a. <we...@ma...> - 2005-08-26 14:05:29
|
Log Message: ----------- Fix bug where perl functions which may need parentheses by forcing them when the function starts Parser::Function->. This seems to work, but there might be a better way to do it, or need other cleaning up. Modified Files: -------------- pg/lib/Parser: Function.pm Revision Data ------------- Index: Function.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Function.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -Llib/Parser/Function.pm -Llib/Parser/Function.pm -u -r1.15 -r1.16 --- lib/Parser/Function.pm +++ lib/Parser/Function.pm @@ -284,7 +284,7 @@ my $fn = $self->{def}; my @p = (); my $perl; foreach my $x (@{$self->{params}}) {push(@p,$x->perl)} if ($fn->{perl}) {$perl = $fn->{perl}.'('.join(',',@p).')'} - else {$perl = 'Parser::Function->call('.join(',',"'$self->{name}'",@p).')'} + else {return('(Parser::Function->call('.join(',',"'$self->{name}'",@p).'))')} $perl = '('.$perl.')' if $parens == 1; return $perl; } |