Created
February 9, 2010 11:50
-
-
Save fujiwara/299119 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use Template::Semantic; | |
print Template::Semantic->process( | |
\*DATA, { | |
"ul.outer li" => [ | |
{ | |
span => "1", | |
"ul.inner li" => [ | |
{ li => "1-1" }, | |
{ li => "1-2" }, | |
], | |
}, | |
{ | |
span => "2", | |
"ul.inner li" => [ | |
{ li => "2-1" }, | |
{ li => "2-2" }, | |
], | |
}, | |
], | |
}); | |
__DATA__ | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<ul class="outer"> | |
<li> | |
<span>XXX</span> | |
<ul class="inner"> | |
<li>YYY</li> | |
</ul> | |
</li> | |
</ul> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment