[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Praise and a question



On Fri, Aug 04, 2000 at 05:11:53PM -0600, Joey Smith wrote:
[...]
> I want to do something like:
> $(some_var:-"$php_var")

Are you sure you need these quotes?

> ie, if some_var is not set from WML, I want it to default to a string
> containing a $, but this just seems to hang WML indefinitely...I'm
> resonably sure it's trying to resolve the php_var part.
> 
> Is there any way to do this? It does not seem to be honoring the
> backslash escape...

Here is the patch i applied to wml_p1_ipp:

--- wml_backend/p1_ipp/ipp.src	2000/08/02 20:23:53	1.33
+++ wml_backend/p1_ipp/ipp.src	2000/08/05 09:03:15
@@ -423,7 +423,7 @@
                 }
                 #   Escape special characters
                 $op =~ s/([?+*])/\\$1/;
-                my $subst = '((?!\\\\).|^)\\$\\(' . $name . $op . $str . '\\)';
+                my $subst = '((?!\\\\).|^)\\$\\(' . $name . $op . '(?:[^()]*)\\)';
 
                 if ($op eq '=') {
                     #   Assign

-- 
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com