#!perl -w use strict; use Test::More; use Text::Xslate; use t::lib::Util; { package BlogEntry; use Any::Moose; has title => (is => 'rw'); has body => (is => 'rw'); } my @blog_entries = map{ BlogEntry->new($_) } ( { title => 'Entry one', body => 'This is my first entry.', }, { title => 'Entry two', body => 'This is my second entry.', }, ); my $tx = Text::Xslate->new( cache => 0, path => [path], ); my $gold = <<'T'; My amazing blog

Entry one

This is my first entry.

Entry two

This is my second entry.

T is $tx->render('eg/child.tx', { blog_entries => \@blog_entries }), $gold, 'example/cascade.pl' for 1 .. 2; done_testing;