The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!perl
use strict;
use warnings;
use Test::More;
use Text::Xslate;

my $tx = Text::Xslate->new();

is $tx->render_string('<: __ROOT__["foo"] :>', { foo => 42 }), '42';
is $tx->render_string('<: __ROOT__.foo :>',    { foo => 42 }), '42';

is $tx->render_string(
    '<: __ROOT__.merge({ foo => "bar"}).foo ~ __ROOT__.foo :>', { foo => 42 }),
    'bar42';

done_testing;