[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Nested eperl tags
- From: Petr Andreyev <nospam@thanx>
- Date: Tue, 20 Feb 2001 12:39:58 +0100 (=?koi8-r?Q?Westeurop=E4ische_Normalzeit?=)
Hi Denis,
i'm glad that WML will be developed further. What are the directions of the
future WML development, except for fixing existing problems?
===
We have discovered a couple of bugs in embedded eperl tags construction.
Here is an example:
========= code ====================================
#use wml::std::tags
<define-tag extern endtag=required>
<perl>
{
my $body;
<perl:print> BEFORE BODY\n </perl:print>
<perl:assign $body>%body</perl:assign>
<perl:print> YET BEFORE BODY\n </perl:print>
<perl:print: $body />
}
</perl>
</define-tag>
<define-tag intern whitespace=delete>
<perl>
{
<perl:print> BODY %0 </perl:print>
}
</perl>
</define-tag>
<extern>
BEGIN BODY
<intern 1 />
MID MODY
<intern 2 />
END BODY
</extern>
===============================================
====== output with wml -p 1,2,3,8 ============
BEFORE BODY
BEGIN BODY
BODY 1
MID MODY
YET BEFORE BODY
BODY 2
END BODY
==============================================
===== the same with our tags.wml====
BEFORE BODY
YET BEFORE BODY
BEGIN BODY
BODY 1
MID MODY
BODY 2
END BODY
===============================
This demonstrates one bug. The another one is that there is two printing
modes: "double quoted" and 'single quoted'. But when when an inner printing
finishes and we are in an outer printing again, the double quoted mode is
always assumed.
I can propose a fix for both, the diff with the november version is attached.
It allows for using <perl tags inside other <perl tags as well, but I don't
know wheter this is very useful - probably for defining some tags working
inside <perl and outside.
Greetings
--
Petr
diff