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

Re: [wml] Problems with define-tag



On Mon, Jul 17, 2000 at 11:05:31PM +0200, Fritz Zaucker wrote:

> On Mon, 17 Jul 2000, Denis Barbier wrote:
> 
> Hmm, this didn't really help. And I think that the group-tags are
> needed, there are several lines belonging to the <ifeq clauses.

But there is only one token in each clause: <navbar:define>...</navbar:define>

> Did you try to compile other.wml? index.wml is less of a problem.

Not this one. and to be honest i do not see how it could work.  This mix
of pass 2 and pass 3 is a must :-)
Well, you have to protect the quotes needed in pass 3.  I did not pay
enough attention to this point, it will be documented in next release.

Fortunately, your MAGICK macro is divided into 2 parts: initialization
of Perl variables, and processing.  The latter may be protected with
<protect pass=2>...</protect>.  In the former, replace quotes by qq
Perl operator:
   <define-tag MAGICK endtag=required>
   <preserve chro>
     ...
   <set-var %attributes>
   <:
   BEGIN{unshift @INC, qq(/usr/pack/imagemagick-4.2.9-to/solaris/perl/)};
   use Image::Magick;
   my $fontpath = qq($(ROOT)/.ttf);
   umask 022;
   my $chro = qq(<get-var chro>);
     ...
   my $deff = qq(<get-var file>);
   <protect pass=2>
   my $text = <<'sdosidufgtjseflsdj';
     ...
   print  "$(ROOT)/.img/$file.gif" if $deff =~ /^\s*$/s;
   </protect>
   :>
     ...
   <restore chro>
   </define-tag>

-- 
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