[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: [BUG REPORT] WML 1.7.2 and current CVS snapshot, SunOS 5.5.1
- From: Denis Barbier <nospam@thanx>
- Date: Wed, 30 Jun 1999 22:58:01 +0200 (CET)
On Tue, 29 Jun 1999 simes@bpfh.net wrote:
> BUG REPORT
>
> Package: WML 1.7.2 and current CVS snapshot
> Operating System: SunOS 5.5.1
>
> Problem Description:
> | The processing of the -D option always strips off a
> | trailing " on the option, even if that quote has been
> | escaped by a \. Thus the option
> |
> | -DFOO="moo \"bar\""
> |
> | Results in things like
> |
> | --set "FOO" "moo \"bar\"
> |
> | Being sent into meta-html. The problem was with the
> | regex which splits the values from @opt_D up for the
> | backends which use it. The regex was:
> |
> | ($var, $val) = ($d =~ m|^(.+?)="?(.*?)"?$|);
> |
> | I have corrected this to the following, which handles
> | trailing " correctly and leaves escaped " along so that
> | the correct thing happens. The new regex is:
> |
> | ($var, $val) = ($d =~ m|^(.+?)="?(.*?(?:\\")?)"?$|);
It's much more complicated :-(
In all versions, spaces and quotes are invalid when defining variables.
One problem is that command-line arguments are parsed by the shell
whereas .wmlrc and shebang-line are parsed by Perl by something like
split(' ', $string);
Then your example is split into
-DFOO="moo
\"bar\""
I have no solution, sorry.
Denis
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com