Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: dwheeler [...] cpan.org
Cc:
AdminCc:

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



Subject: smart_tab_wrapper clears %ATTRIBUTES Too late
Date: Fri, 11 Jul 2008 10:57:43 -0700
To: bug-template-declare [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
If I have this wrapper sub: sub wrap(&) { my $code = shift; smart_tag_wrapper { my %p = @_; html { head { title { outs $p{title} }; }; $code->(); div { outs 'Page last generated at ', scalar gmtime, '.'; }; } }; } And then I call it like this: with( title => 'Book List' ), wrap { h1 { 'Hello, world!' } }; Then I end up with output like this: <html title="Book List"> <head> <title>Book List</title> </head> <h1>Hello, world!</h1> <div>Page last generated at Fri Jul 11 17:55:56 2008.</div> </html> Note the 'title="Book List"' attribute in the <html> tag. That shouldn't be there. I can get around it by calling with() before I call html{}, but should I have to? Thanks, David
Resolved in r5643. Thanks a lot!