Subject: | Incorrect output position of the nested tags |
Date: | Thu, 19 Jul 2007 15:42:39 +0800 |
To: | bug-template-declare [...] rt.cpan.org |
From: | "Agent Zhang" <agentzh [...] gmail.com> |
See the following script:
####################################
package MyApp::Templates;
use Template::Declare::Tags;
use base 'Template::Declare';
template simple => sub {
html {
body {
p { attr { class => 'greeting' }; 'Hello, world wide web!' }; };
p {}
}
};
package main;
use Template::Declare;
Template::Declare->init( roots => ['MyApp::Templates']);
print Template::Declare->show( 'simple');
#####################################
It produced the following on ActivePerl 5.8.7:
######################################
E:\agentz>perl test.pl
<html>
<body>
<p class="greeting">Hello, world wide web!</p>
</body>
<p></p>
</html>
######################################
the second "p" tag is inserted *after* </body>, which is incorrect. Am
I missing anything obvious here? Thanks!
agentz