#!/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
OHNOES: } : for $moos -> $moo {
<: $moo :>
: }