Skip Menu |

This queue is for tickets about the Template-Declare CPAN distribution.

Report information
The Basics
Id: 28376
Status: resolved
Priority: 0/
Queue: Template-Declare

People
Owner: Nobody in particular
Requestors: agentzh [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Subject: Re: [rt.cpan.org #28376] Incorrect output position of the nested tags
Date: Thu, 19 Jul 2007 14:35:13 -0400
To: bug-Template-Declare [...] rt.cpan.org
From: Jesse Vincent <jesse [...] fsck.com>
FWIW, I can replicate this my 5.8.8 with latest svn version. On Jul 19, 2007, at 3:43 AM, agentzh@gmail.com via RT wrote: Show quoted text
> > Thu Jul 19 03:43:00 2007: Request 28376 was acted upon. > Transaction: Ticket created by agentzh@gmail.com > Queue: Template-Declare > Subject: Incorrect output position of the nested tags > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: agentzh@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=28376 > > > > 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 >
Download PGP.sig
application/pgp-signature 186b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #28376] Incorrect output position of the nested tags
Date: Thu, 19 Jul 2007 18:08:34 -0400
To: bug-Template-Declare [...] rt.cpan.org
From: Jesse Vincent <jesse [...] fsck.com>
On Jul 19, 2007, at 3:43 AM, agentzh@gmail.com via RT wrote: Show quoted text
> ###### > > the second "p" tag is inserted *after* </body>, which is incorrect. Am > I missing anything obvious here? Thanks! >
I didn't think so until after I wrote the test script. Then I ran perltidy on your example: template simple => sub { html { body { p { attr { class => 'greeting' }; 'Hello, world wide web!' }; }; p {}; } }; So. I think T::D is doing what you ask it to. Do you agree or disagree? -j Show quoted text
> agentz >
Download PGP.sig
application/pgp-signature 186b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #28376] Incorrect output position of the nested tags
Date: Fri, 20 Jul 2007 10:37:27 +0800
To: bug-Template-Declare [...] rt.cpan.org
From: "Agent Zhang" <agentzh [...] gmail.com>
<URL: http://rt.cpan.org/Ticket/Display.html?id=28376 > On 7/20/07, Jesse via RT <bug-Template-Declare@rt.cpan.org> wrote: Show quoted text
> > So. I think T::D is doing what you ask it to. Do you agree or disagree? >
Oh, my bad...Thanks, Jesse :) agentz