The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use strict;
use warnings;

use Test::More tests => 1;

use Text::Caml;

my $renderer = Text::Caml->new;

my $output = $renderer->render(
    '{{foo}}',
    {   foo => sub {'bar'}
    }
);
is $output => 'bar', 'sub returning "bar" renders as "bar"';