#!/usr/bin/env perl use strictures; use Text::Xslate; use Data::Section::Simple; my $vpath = Data::Section::Simple->new()->get_data_section(); my $tx = Text::Xslate->new( path => [ $vpath ] ); my @moos = join("", "A".."L") =~ /\w\w\w/g; print $tx->render("base.tx", { moos => rand(1) > .5 ? \@moos : [] }); __DATA__ @@ base.tx OHAI</tile> </head> <body> <h1>MOOS</h1> : if ! $moos.0 { <blockquote>OHNOES</blockquote> : } : for $moos -> $moo { <p><: $moo :></p> : } </body> </html>